Macros | Functions
Camera Object

The Evas_Canvas3D_Camera structure defines properties used to generate 2D pictures of a given scene graph, similar in concept to focus length and film size for a real world camera. More...

Macros

#define EVAS_CANVAS3D_CAMERA_CLASS   evas_canvas3d_camera_class_get()
 Evas 3D canvas camera class.
 

Functions

EOAPI void evas_canvas3d_camera_projection_matrix_set (Eo *obj, const Evas_Real *matrix)
 Set the projection matrix of the given camera. More...
 
EOAPI void evas_canvas3d_camera_projection_matrix_get (const Eo *obj, Evas_Real *matrix)
 Get the projection matrix of the given camera. More...
 
EOAPI void evas_canvas3d_camera_projection_perspective_set (Eo *obj, Evas_Real fovy, Evas_Real aspect, Evas_Real dnear, Evas_Real dfar)
 Set the projection matrix of the given camera with perspective projection. More...
 
EOAPI void evas_canvas3d_camera_projection_frustum_set (Eo *obj, Evas_Real left, Evas_Real right, Evas_Real bottom, Evas_Real top, Evas_Real dnear, Evas_Real dfar)
 Set the projection matrix of the given camera with frustum projection. More...
 
EOAPI void evas_canvas3d_camera_projection_ortho_set (Eo *obj, Evas_Real left, Evas_Real right, Evas_Real bottom, Evas_Real top, Evas_Real dnear, Evas_Real dfar)
 Set the projection matrix of the given camera with orthogonal projection. More...
 
EOAPI Eina_Bool evas_canvas3d_camera_node_visible_get (Eo *obj, Evas_Canvas3D_Node *camera_node, Evas_Canvas3D_Node *node, Evas_Canvas3D_Frustum_Mode key)
 Check is bounding sphere of given node inside frustum of camera node. More...
 

Detailed Description

The Evas_Canvas3D_Camera structure defines properties used to generate 2D pictures of a given scene graph, similar in concept to focus length and film size for a real world camera.

A given camera definition can be used to take multiple pictures of the scene by establishing multiple nodes for the Evas_Canvas3D_Camera, each of which are located at different positions and with different orientations. Convenience routines evas_canvas3d_node_position_set() and evas_canvas3d_node_look_at_set() are provided to adjust the position and viewing direction for these nodes.

Function Documentation

◆ evas_canvas3d_camera_projection_matrix_set()

EOAPI void evas_canvas3d_camera_projection_matrix_set ( Eo obj,
const Evas_Real matrix 
)

Set the projection matrix of the given camera.

Default projection matrix is identity matrix.

See also evas_canvas3d_camera_projection_perspective_set, evas_canvas3d_camera_projection_ortho_set and evas_canvas3d_camera_projection_frustum_set.

Parameters
[in]objThe object.
[in]matrixProjection Matrix

◆ evas_canvas3d_camera_projection_matrix_get()

EOAPI void evas_canvas3d_camera_projection_matrix_get ( const Eo obj,
Evas_Real matrix 
)

Get the projection matrix of the given camera.

See also evas_canvas3d_camera_projection_matrix_set.

Parameters
[in]objThe object.
[out]matrixProjection Matrix

◆ evas_canvas3d_camera_projection_perspective_set()

EOAPI void evas_canvas3d_camera_projection_perspective_set ( Eo obj,
Evas_Real  fovy,
Evas_Real  aspect,
Evas_Real  dnear,
Evas_Real  dfar 
)

Set the projection matrix of the given camera with perspective projection.

See also evas_canvas3d_camera_projection_matrix_set.

Parameters
[in]objThe object.
[in]fovyField of view angle in Y direction.
[in]aspectAspect ratio.
[in]dnearDistance to near clipping plane.
[in]dfarDistance to far clipping plane.

◆ evas_canvas3d_camera_projection_frustum_set()

EOAPI void evas_canvas3d_camera_projection_frustum_set ( Eo obj,
Evas_Real  left,
Evas_Real  right,
Evas_Real  bottom,
Evas_Real  top,
Evas_Real  dnear,
Evas_Real  dfar 
)

Set the projection matrix of the given camera with frustum projection.

See also evas_canvas3d_camera_projection_matrix_set.

Parameters
[in]objThe object.
[in]leftLeft X coordinate of the near clipping plane.
[in]rightRight X coordinate of the near clipping plane..
[in]bottomBottom Y coordinate of the near clipping plane.
[in]topTop Y coordinate of the near clipping plane
[in]dnearDistance to near clipping plane.
[in]dfarDistance to far clipping plane.

◆ evas_canvas3d_camera_projection_ortho_set()

EOAPI void evas_canvas3d_camera_projection_ortho_set ( Eo obj,
Evas_Real  left,
Evas_Real  right,
Evas_Real  bottom,
Evas_Real  top,
Evas_Real  dnear,
Evas_Real  dfar 
)

Set the projection matrix of the given camera with orthogonal projection.

See also evas_canvas3d_camera_projection_matrix_set.

Parameters
[in]objThe object.
[in]leftLeft X coordinate of the near clipping plane.
[in]rightRight X coordinate of the near clipping plane..
[in]bottomBottom Y coordinate of the near clipping plane.
[in]topTop Y coordinate of the near clipping plane
[in]dnearDistance to near clipping plane.
[in]dfarDistance to far clipping plane.

◆ evas_canvas3d_camera_node_visible_get()

EOAPI Eina_Bool evas_canvas3d_camera_node_visible_get ( Eo obj,
Evas_Canvas3D_Node *  camera_node,
Evas_Canvas3D_Node *  node,
Evas_Canvas3D_Frustum_Mode  key 
)

Check is bounding sphere of given node inside frustum of camera node.

If the nodes are null or nodes type mismatch error wrong type of nodes will be generated and returned false.

Parameters
[in]objThe object.
[in]camera_nodeThe given camera node.
[in]nodeThe given node.
[in]keyThe given key
Returns
true in frustum, false otherwise