Cocos2d-x  v3.12
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
OrbitCamera Class Reference

OrbitCamera action. More...

Inherits ActionCamera.

Public Member Functions

void sphericalRadius (float *r, float *zenith, float *azimuth)
 Positions the camera according to spherical coordinates. More...
 
OrbitCameraclone () const override
 override Action.
 
- Public Member Functions inherited from ActionCamera
virtual ActionCamerareverse () const override
 override Action.
 
- Public Member Functions inherited from ActionInterval
float getElapsed (void)
 How many seconds had elapsed since the actions started to run. More...
 
void setAmplitudeRate (float amp)
 Sets the amplitude rate, extension in GridAction. More...
 
float getAmplitudeRate (void)
 Gets the ampliture rate, extension in GridAction. More...
 
virtual bool isDone (void) const override
 override Action.
 

Static Public Member Functions

static OrbitCameracreate (float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX)
 Creates a OrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX. More...
 

Protected Member Functions

bool initWithDuration (float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX)
 Initializes a OrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX.
 
- Protected Member Functions inherited from ActionInterval
bool initWithDuration (float d)
 initializes the action with the duration. More...
 

Detailed Description

OrbitCamera action.

Orbits the camera around the center of the screen using spherical coordinates.

Member Function Documentation

static OrbitCamera* create ( float  t,
float  radius,
float  deltaRadius,
float  angleZ,
float  deltaAngleZ,
float  angleX,
float  deltaAngleX 
)
static

Creates a OrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX.

Duration in seconds. The start radius. The delta radius. The start angle in Z. The delta angle in Z. The start angle in X. The delta angle in X. An OrbitCamera.

void sphericalRadius ( float *  r,
float *  zenith,
float *  azimuth 
)

Positions the camera according to spherical coordinates.

The spherical radius. The spherical zenith. The spherical azimuth.


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