Class CCCamera

#include <Geode/cocos/CCCamera.h>
classCCCamera:publiccocos2d::CCObject{ ... }

A CCCamera is used in every CCNode. Useful to look at the object from different views. The OpenGL gluLookAt() function is used to locate the camera. If the object is transformed by any of the scale, rotation or position attributes, then they will override the camera. IMPORTANT: Either your use the camera or the rotation/scale/position properties. You can’t use both. World coordinates won’t work if you use the camera. Limitations:

  • Some nodes, like CCParallaxNode, CCParticle uses world node coordinates, and they won’t work properly if you move them (or any of their ancestors) using the camera.
  • It doesn’t work on batched nodes like CCSprite objects when they are parented to a CCSpriteBatchNode object.
  • It is recommended to use it ONLY if you are going to create 3D effects. For 2D effects, use the action CCFollow or position/scale/rotate.
Examples0
Public static methods1
staticfloatgetZEye()

returns the Z eye

Public member functions12
voidinit()
No description provided
charconst*description()
No description provided
voidsetDirty(
boolbValue
)

sets the dirty value

boolisDirty()

get the dirty value

voidrestore()

sets the camera in the default position

voidlocate()

Sets the camera using gluLookAt using its eye, center and up_vector

voidsetEyeXYZ(
floatfEyeX
,
floatfEyeY
,
floatfEyeZ
)

sets the eye values in points

voidsetCenterXYZ(
floatfCenterX
,
floatfCenterY
,
floatfCenterZ
)

sets the center values in points

voidsetUpXYZ(
floatfUpX
,
floatfUpY
,
floatfUpZ
)

sets the up values

voidgetEyeXYZ(
float*pEyeX
,
float*pEyeY
,
float*pEyeZ
)

get the eye vector values in points

voidgetCenterXYZ(
float*pCenterX
,
float*pCenterY
,
float*pCenterZ
)

get the center vector values int points

voidgetUpXYZ(
float*pUpX
,
float*pUpY
,
float*pUpZ
)

get the up vector values

Fields0
Protected member functions0
Protected fields11
floatm_fEyeX
;
No description provided
floatm_fEyeY
;
No description provided
floatm_fEyeZ
;
No description provided
floatm_fCenterX
;
No description provided
floatm_fCenterY
;
No description provided
floatm_fCenterZ
;
No description provided
floatm_fUpX
;
No description provided
floatm_fUpY
;
No description provided
floatm_fUpZ
;
No description provided
boolm_bDirty
;
No description provided
_::kmMat4m_lookupMatrix
;
No description provided