cocos3d  2.0.0
Instance Methods | Class Methods | Properties | List of all members
CC3ControllableLayer Class Reference

#import <CC3ControllableLayer.h>

Inheritance diagram for CC3ControllableLayer:
Inheritance graph
[legend]

Instance Methods

(void) - didUpdateContentSizeFrom:
 
(id) - initWithColor:
 
(id) - initWithController:
 

Class Methods

(id) + layer
 
(id) + layerWithColor:
 
(id) + layerWithController:
 

Properties

BOOL
alignContentSizeWithDeviceOrientation 
DEPRECATED_ATTRIBUTE
 
BOOL isColored DEPRECATED_ATTRIBUTE
 
BOOL isOverlayingDeviceCamera
 

Detailed Description

A CCLayer that keeps track of the CC3ViewController that is controlling the CC3GLView, and provides support for overlaying the device camera, and adapting to changes to the device orientation.

Method Documentation

- (void) didUpdateContentSizeFrom: (CGSize)  oldSize

This callback method is invoked automatically whenever the contentSize property of this layer is changed.

This method is not invoked if the contentSize property is set to its current value.

Default implementation does nothing. Subclasses can override this method to organize child nodes or perspective to the new contentSize.

When the device orientation changes, the CC3UIViewController will set the contentSize of the CCNode in its controlledNode property to match the new view size and shape. If the node being controlled is an instance of CC3ControllableLayer, this method will therefore automatically be invoked. Subclasses can use this to adapt to the new size caused by the device orientation change.

- (id) initWithColor: (ccColor4B)  DEPRECATED_ATTRIBUTE
Deprecated:
Use init instead.
- (id) initWithController: (CC3ViewController *)  DEPRECATED_ATTRIBUTE
Deprecated:
Use init instead. The controller property is set automatically when the layer, or an ancestor is assigned to a controller.
+ (id) layer

Allocates and initializes a layer.

+ (id) layerWithColor: (ccColor4B)  DEPRECATED_ATTRIBUTE
Deprecated:
Use layer instead.
+ (id) layerWithController: (CC3ViewController *)  DEPRECATED_ATTRIBUTE
Deprecated:
Use layer instead. The controller property is set automatically when the layer, or an ancestor is assigned to a controller.

Property Documentation

- (BOOL alignContentSizeWithDeviceOrientation) DEPRECATED_ATTRIBUTE
readwritenonatomicassign
Deprecated:
CC3ControllableLayer no longer automatically resizes on device orientation. This property always returns NO, and setting this property has no effect. When the device is rotated, the contentSize property of the CCNode held in the controlledNode property of the CC3UIViewController is set to match the new orientation. Override didUpdateContentSizeFrom: to react to this change.
- (BOOL isColored) DEPRECATED_ATTRIBUTE
readnonatomicassign
Deprecated:
CC3ControllableLayer no longer draws a backdrop. Use CC3Scene backdrop property instead.
- (BOOL) isOverlayingDeviceCamera
readnonatomicassign

Indicates whether this layer is currently overlaying the view of the device camera, permitting an augmented reality view.

This property is readonly and is retrieved by this node from its controller. If no controller has been assigned, this property will default to NO. When this property is YES, this layer will generally behave in a way that is friendly to a background device camera image. When true, this layer will set its background GL color to transparent, and will not draw a background color or texture.


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