Top | ![]() |
![]() |
![]() |
![]() |
MiaCamera * | mia_camera_new () |
gboolean | mia_camera_test () |
gfloat | mia_camera_get_zoom () |
void | mia_camera_set_zoom () |
MiaVector3d * | mia_camera_get_location () |
void | mia_camera_set_location () |
MiaQuaternion * | mia_camera_get_rotation () |
void | mia_camera_set_rotation () |
gfloat | mia_camera_get_dist () |
void | mia_camera_set_dist () |
MiaCamera * | mia_camera_dup () |
MiaCamera * | mia_camera_copy () |
gboolean | mia_camera_xmlio_write () |
MiaCamera descibes a point of view within a 3D volume, i.e. camera location, view direction, and zoom are stored within this class and manipulated by the corresponding functions.
MiaCamera * mia_camera_new (MiaVector3d *loc
,MiaQuaternion *rot
,gfloat zoom
);
Create a camera defined by its position, heading, distance and
zoom. The created object must be destroyed by calling g_object_unref()
For some reason I can not remember, the location z value is ignored and the distance value is given separately.
gfloat
mia_camera_get_zoom (const MiaCamera *self
);
Get the current zoom value of the camera
void mia_camera_set_zoom (MiaCamera *self
,gfloat zoom
);
sets the new zoom of the camera (i.e. change field of view)
MiaVector3d *
mia_camera_get_location (const MiaCamera *self
);
get current location of the camera (note that the z value is equal to the distance)
void mia_camera_set_location (MiaCamera *self
,MiaVector3d *loc
);
Set the new location of the camera
MiaQuaternion *
mia_camera_get_rotation (const MiaCamera *self
);
get the current view directopn of the camera as a rotation described by a MiaQuaternion
void mia_camera_set_rotation (MiaCamera *self
,MiaQuaternion *rot
);
sets the current view direction of the camera as a rotation described by a MiaQuaternion
gfloat
mia_camera_get_dist (const MiaCamera *self
);
Evaluate the distance of the camera from the center of the universe (0,0,0)
void mia_camera_set_dist (MiaCamera *self
,gfloat dist
);
Sets the new distance to the center (0,0,0), can also be achieved by setting the full location
MiaCamera *
mia_camera_dup (MiaCamera *orig
);
Create a newly created duplicate of a MiaCamera. The returned camera
must be freed by calling g_object_unref()
MiaCamera * mia_camera_copy (MiaCamera *dest
,const MiaCamera *orig
);
Copy a MiaCamera to an already created instance,
gboolean mia_camera_xmlio_write (xmlNodePtr root
,xmlNsPtr ns
,const gchar *tag
,const MiaCamera *c
);
Write the MiaCamera instance to an XML node