Static Public Member Functions | Properties

CC3DirectionMarkerNode Class Reference

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. More...

#import <CC3MeshNode.h>

Inheritance diagram for CC3DirectionMarkerNode:
Inheritance graph
[legend]
Collaboration diagram for CC3DirectionMarkerNode:
Collaboration graph
[legend]

List of all members.

Static Public Member Functions

(GLfloat) + directionMarkerMinimumLength
(GLfloat) + directionMarkerScale
(void) + setDirectionMarkerMinimumLength:
(void) + setDirectionMarkerScale:

Properties

CC3Vector markerDirection

Detailed Description

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.


Member Function Documentation

+ (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.


Property Documentation

- (CC3Vector) markerDirection [read, write, assign]

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.


The documentation for this class was generated from the following file: