#import <CC3UtilityMeshNodes.h>
Class Methods | |
(GLfloat) | + directionMarkerMinimumLength |
(GLfloat) | + directionMarkerScale |
(void) | + setDirectionMarkerMinimumLength: |
(void) | + setDirectionMarkerScale: |
Additional Inherited Members | |
Instance Methods inherited from CC3WireframeBoundingBoxNode | |
(void) | - updateFromParentBoundingBox |
CC3DirectionMarkerNode is a type of CC3LineNode specialized for drawing a line from the origin of its parent node to a point outside the bounding box of the parent node, in a particular direction.
A CC3DirectionMarkerNode is typically added as a child node to the node to visibly indicate the orientation of the parent node.
The CC3DirectionMarkerNode node can be set to automatically track the dynamic nature of the boundingBox of the parent node by setting the shouldAlwaysMeasureParentBoundingBox property to YES.
Since we don't want to add descriptor labels or wireframe boxes to direction marker nodes, the shouldDrawDescriptor, shouldDrawWireframeBox, and shouldDrawLocalContentWireframeBox properties are overridden to do nothing when set, and to always return YES.
Similarly, CC3DirectionMarkerNode node does not participate in calculating the bounding box of the node whose bounding box it is drawing, since, as a child of that node, it would interfere with accurate measurement of the bounding box.
The shouldIncludeInDeepCopy property returns YES by default, so that the CC3DirectionMarkerNode will be copied when the parent node is copied.
A CC3DirectionMarkerNode will continue to be visible even when its ancestor nodes are invisible, unless the CC3DirectionMarkerNode itself is made invisible.
+ (GLfloat) directionMarkerMinimumLength |
Returns the minimum length of a direction marker line, expressed in the global coordinate system.
Setting a value for this property can be useful for adding direction markers to very small nodes, or nodes that do not have volume, such as a camera or light.
The initial value of this property is zero.
+ (GLfloat) directionMarkerScale |
Returns the proportional distance that the direction marker line should protrude from the parent node.
This is measured in proportion to the distance from the origin of the parent node to the side of the bounding box through which the line is protruding.
The initial value of this property is 1.5.
+ (void) setDirectionMarkerMinimumLength: | (GLfloat) | len |
Sets the minimum length of a direction marker line, expressed in the global coordinate system.
Setting a value for this property can be useful for adding direction markers to very small nodes, or nodes that do not have volume, such as a camera or light.
The initial value of this property is zero.
+ (void) setDirectionMarkerScale: | (GLfloat) | scale |
Sets the proportional distance that the direction marker line should protrude from the parent node.
This is measured in proportion to the distance from the origin of the parent node to the side of the bounding box through which the line is protruding.
The initial value of this property is 1.5.
|
readwritenonatomicassign |
Indicates the unit direction towards which this line marker will point from the origin of the parent node.
When setting the value of this property, the incoming vector will be normalized to a unit vector.
The value of this property defaults to kCC3VectorUnitZNegative, a unit vector in the direction of the negative Z-axis, which is the OpenGL ES default direction.