#import <CC3Billboard.h>
Instance Methods | |
(CGRect) | - measureBoundingBoxInPixels |
Properties | |
CGFloat | billboard3DContentScaleFactor |
CCNode extension to support embedding 2D CCNodes in the 3D scene.
- (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.
|
readnonatomicassign |
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.