Static Public Member Functions | Properties

CC3DirectionMarkerNode Class Reference

CC3DirectionMarkerNode is a type of CC3LineNode specialized for drawing a line from the pivot point 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) + directionMarkerScale
(void) + setDirectionMarkerScale:

Properties

CC3Vector markerDirection

Detailed Description

CC3DirectionMarkerNode is a type of CC3LineNode specialized for drawing a line from the pivot point 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) 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 pivot point (local origin) of the parent node to the side of the bounding box through which the line is protruding.

The default value of this property is 1.5.

+ (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 pivot point (local origin) of the parent node to the side of the bounding box through which the line is protruding.

The default 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 pivot point (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: