Trees | Indices | Toggle frames |
---|
Camera used in every CocosNode. 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.
__init__(self) | |
get_z_eye(cls)
Returns the best distance for the camera for the current window size
|
|
restore(self)
Restore the camera to the initial position
and sets it's dirty attribute in False and once in true.
|
|
locate(self,
force=False)
Sets the camera using gluLookAt using its eye, center and up_vector
|
flaat,float,float |
eye
Eye of the camera in x,y,z coordinates
|
flaat,float,float |
center
Center of the camera in x,y,z coordinates
|
flaat,float,float |
up_vector
Up vector of the camera in x,y,z coordinates
|
dirty
whether or not the camera is 'dirty'
It is dirty if it is not in the original position
|
|
once
optimization.
|
Returns the best distance for the camera for the current window size
cocos2d uses a Filed Of View (fov) of 60
Restore the camera to the initial position and sets it's dirty attribute in False and once in true.
If you use the camera, for a while and you want to stop using it call this method.
Trees | Indices | Toggle frames |
---|
Generated by Epydoc 3.0beta1 on Wed Oct 26 10:00:13 2011 | http://epydoc.sourceforge.net |