RaydiumWikiNi

ApiCameraDetails

PagePrincipale :: DerniersChangements :: ParametresUtilisateur :: Vous êtes ec2-3-22-100-180.us-east-2.compute.amazonaws.com
Ceci est une version archivée de ApiCameraDetails à 2005-01-15 23:17:00.

22.2 Details



22.2.1 void raydium_camera_place(GLfloat x, GLfloat y, GLfloat z, GLfloat lacet, GLfloat tangage, GLfloat roulis)


Sets the camera at (x,y,z) position, and using (lacet,tangage,roulis) as rotation angles.


22.2.2 void raydium_camera_look_at(GLfloat x, GLfloat y, GLfloat z, GLfloat x_to, GLfloat y_to, GLfloat z_to)


Sets the camera at (x,y,z) position, and looks at (x_to,y_to,z_to).


22.2.3 void raydium_camera_replace(void)


You'll need to reset camera position and orientation after each object drawing. If this is unclear to you, read the "example" section, below.

You will need to make your own 3D transformations (GLRotate, GLTranslate, ...) to draw your objects, or you can use the following function.


22.2.4 raydium_camera_replace_go(GLfloat *pos, GLfloat *R)


This function will replace the camera, as "raydium_camera_replace()", but will place "3D drawing cursor" at position "pos" (3 GLfloat) with rotation "R" (4 GLfloat quaternion).

No eulers (rotx, roty, rotz) version of this function is provided for now.. do you really need it ?


22.2.5 Example:


1. place camera
2. move "drawing cursor" to object's place
3. draw object
4. reset camera to initial place (the one given at step 1)
5. move "drawing cursor" to another object's place
6. draw another object
7. [...]

Steps 4 and 5 can be done with raydium_camera_replace_go().


22.2.6 void raydium_camera_vectors(GLfloat *res3)


This function will return two vectors (2 * 3 * GLfloat), giving the camera orientation (front vector and up vector). At this day, the up vector is always the same as the world up vector, even if the camera is rotated or upside down (and yes, this MUST be corrected :).




Return to RaydiumApiReference index.