Instance Methods | Properties | List of all members
CCNode(CC3Billboard) Category Reference

#import <CC3Billboard.h>

Instance Methods

(CGRect) - measureBoundingBoxInPixels


CGFloat billboard3DContentScaleFactor

Detailed Description

CCNode extension to support embedding 2D CCNodes in the 3D scene.

Method Documentation

- (CGRect) measureBoundingBoxInPixels

Returns the bounding box of this node in pixels, measuring it if necessary.

The default behaviour for CCNode is simply to return the value of the boundingBoxInPixels property. However, some subclasses, notably CCParticleSystem and its subclasses, do not maintain a fixed bounding box boundary, and it must be measured directly from the particle vertices. Such subclasses will override this method to return a value different than the value in the boundingBoxInPixels property.

When overriding this method for a subclass, it is understood that the execution of this method may be computationally expensive. It is not the responsibility of this method to cache the returned value, or otherwise attempt to short-circuit the calculation. That is handled in the CC3Billboard.

Property Documentation

- (CGFloat) billboard3DContentScaleFactor

Returns a scaling factor to be applied to this node when it is set as the 2D billboard in a CC3Billboard.

The value returned depends on the version of Cocos2D that is linked and whether the app is rendering in high-resolution for a Retina display on iOS.

If the app is using Cocos2D 1.x and is rendering in high-resolution to a Retina display on an iOS device, this property returns 0.5. Otherwise it returns 1.0.

Subclasses may override.

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