R2::CallSegment


void R2::CallSegment(unsigned SegmentIdentity)

This method calls a segment.

Parameters

unsigned SegmentIdentity

The identity of the segment to be called.

Notes

The segment being called should be unchained.

The transformation in effect inside the called segment is the viewing transform, concatenated with the current segment transform, concatenated with the unchained segment's transform. If further nested calls are made, the current transform in effect continues to be multiplied. A stack of transforms is used to achieve this effect.

Setting the transform of a segment is a retained operation. So if a transform is set inside the called segment, it will not be recognised until that order is executed. The method SetSegmentTransform - Identity may be used to set the transform of a segment to be called, prior to calling it. The given transform will then be concatened with the viewing transform and the transform of the calling segment. If an unchained segment calls another unchained segment, the concatenation of transforms continues. When the segment call is complete, the original transform is reinstated.