PagePrincipale :: DerniersChangements :: ParametresUtilisateur :: Vous êtes ec2-3-94-21-209.compute-1.amazonaws.com

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 :).

void raydium_camera_internal (GLfloat x, GLfloat y, GLfloat z);
void raydium_camera_smooth (GLfloat px, GLfloat py, GLfloat pz, GLfloat lx, GLfloat ly, GLfloat lz, GLfloat zoom, GLfloat roll, GLfloat step);
void raydium_camera_path_init (int p);
void raydium_camera_path_init_all (void);
int raydium_camera_path_find (char *name);
int raydium_camera_path_load (char *filename);
void raydium_camera_path_draw (int p);
void raydium_camera_path_draw_name (char *path);
char raydium_camera_smooth_path (char *path, GLfloat step, GLfloat * x, GLfloat * y, GLfloat * z, GLfloat * zoom, GLfloat * roll);
void raydium_camera_smooth_path_to_pos (char *path, GLfloat lx, GLfloat ly, GLfloat lz, GLfloat path_step, GLfloat smooth_step);
void raydium_camera_smooth_pos_to_path (GLfloat lx, GLfloat ly, GLfloat lz, char *path, GLfloat path_step, GLfloat smooth_step);
void raydium_camera_smooth_path_to_path (char *path_from, GLfloat path_step_from, char *path_to, GLfloat path_step_to, GLfloat smooth_step);

Return to RaydiumApiReference index.