Properties

CC3WireframeBoundingBoxNode Class Reference

CC3WireframeBoundingBoxNode is a type of CC3LineNode specialized for drawing a wireframe bounding box around another node. More...

#import <CC3MeshNode.h>

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

List of all members.

Properties

BOOL shouldAlwaysMeasureParentBoundingBox

Detailed Description

CC3WireframeBoundingBoxNode is a type of CC3LineNode specialized for drawing a wireframe bounding box around another node.

A CC3WireframeBoundingBoxNode is typically added as a child node to the node whose bounding box is to be displayed.

The CC3WireframeBoundingBoxNode 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 wireframe nodes, the shouldDrawDescriptor, shouldDrawWireframeBox, and shouldDrawLocalContentWireframeBox properties are overridden to do nothing when set, and to always return YES.

Similarly, CC3WireframeBoundingBoxNode 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 NO, so that the CC3WireframeBoundingBoxNode will not be copied when the parent node is copied. A bounding box node for the copy will be created automatically when each of the shouldDrawLocalContentWireframeBox and shouldDrawWireframeBox properties are copied, if they are set to YES on the original node that is copied.

A CC3WireframeBoundingBoxNode will continue to be visible even when its ancestor nodes are invisible, unless the CC3WireframeBoundingBoxNode itself is made invisible.


Property Documentation

- (BOOL) shouldAlwaysMeasureParentBoundingBox [read, write, assign]

Indicates whether the dimensions of this node should automatically be remeasured on each update pass.

If this property is set to YES, the box will automatically be resized to account for movements by any descendant nodes of the parent node. For bounding box nodes that track the overall boundingBox of a parent node, this property should be set to YES.

It is not necessary to set this property to YES to account for changes in the transform properties of the parent node itself, or if this node is tracking the bounding box of local content of the parent node. Generally, changes to that will automatically be handled by the transform updates.

When setting this property, be aware that measuring the bounding box of the parent node can be an expensive operation.

The initial value of this property is NO.


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