Inherits from CC3WireframeBoundingBoxNode : CC3LineNode : CC3MeshNode : CC3LocalContentNode : CC3Node : CC3Identifiable : NSObject
Declared in CC3UtilityMeshNodes.h

Overview

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.

Properties

markerDirection

Indicates the unit direction towards which this line marker will point from the origin of the parent node.

@property (nonatomic, assign) CC3Vector markerDirection

Discussion

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.

Declared In

CC3UtilityMeshNodes.h

Class Methods

directionMarkerMinimumLength

Returns the minimum length of a direction marker line, expressed in the global coordinate system.

+ (GLfloat)directionMarkerMinimumLength

Discussion

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.

Declared In

CC3UtilityMeshNodes.h

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.

+ (GLfloat)directionMarkerScale

Discussion

The initial value of this property is 1.5.

Declared In

CC3UtilityMeshNodes.h

setDirectionMarkerMinimumLength:

Sets the minimum length of a direction marker line, expressed in the global coordinate system.

+ (void)setDirectionMarkerMinimumLength:(GLfloat)len

Discussion

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.

Declared In

CC3UtilityMeshNodes.h

setDirectionMarkerScale:

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.

+ (void)setDirectionMarkerScale:(GLfloat)scale

Discussion

The initial value of this property is 1.5.

Declared In

CC3UtilityMeshNodes.h