libgpac
Documentation of the core library of GPAC
camera.h File Reference
+ Include dependency graph for camera.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  GF_Camera
 

Enumerations

enum  { CAM_IS_DIRTY = 1 , CAM_HAS_VIEWPORT = 1<<2 , CAM_NO_LOOKAT = 1<<3 }
 
enum  { CULL_NOT_SET = 0 , CULL_OUTSIDE , CULL_INSIDE , CULL_INTERSECTS }
 
enum  { NAV_HEADLIGHT = 1 , NAV_SELECTABLE = 1<<1 , NAV_ANY = 1<<2 }
 
enum  {
  FRUS_NEAR_PLANE = 0 , FRUS_FAR_PLANE , FRUS_LEFT_PLANE , FRUS_RIGHT_PLANE ,
  FRUS_BOTTOM_PLANE , FRUS_TOP_PLANE
}
 
enum  {
  CF_NONE = 0 , CF_COLLISION = 1 , CF_DO_GRAVITY = (1<<1) , CF_GRAVITY = (1<<2) ,
  CF_STORE_VP = (1<<3)
}
 

Functions

void camera_invalidate (GF_Camera *cam)
 
void camera_update (GF_Camera *cam, GF_Matrix2D *user_transform, Bool center_coords)
 
void camera_update_stereo (GF_Camera *cam, GF_Matrix2D *user_transform, Bool center_coords, Fixed horizontal_shift, Fixed viewing_distance, Fixed viewing_distance_offset, u32 camlay)
 
void camera_reset_viewpoint (GF_Camera *cam, Bool animate)
 
void camera_move_to (GF_Camera *cam, SFVec3f pos, SFVec3f target, SFVec3f up)
 
Bool camera_animate (GF_Camera *cam, void *compositor)
 
void camera_stop_anim (GF_Camera *cam)
 
void camera_jump (GF_Camera *cam)
 
void camera_set_vectors (GF_Camera *cam, SFVec3f pos, SFRotation ori, Fixed fov)
 
SFRotation camera_get_orientation (SFVec3f pos, SFVec3f target, SFVec3f up)
 
SFVec3f camera_get_pos_dir (GF_Camera *cam)
 
SFVec3f camera_get_target_dir (GF_Camera *cam)
 
SFVec3f camera_get_right_dir (GF_Camera *cam)
 
void camera_set_2d (GF_Camera *cam)
 

Data Structure Documentation

◆ GF_Camera

struct GF_Camera
+ Collaboration diagram for GF_Camera:
Data Fields
Bool is_3D
u32 flags
GF_Rect vp
GF_Rect proj_vp
Fixed width
Fixed height
Fixed z_near
Fixed z_far
Fixed fieldOfView
SFVec3f up
SFVec3f position
SFVec3f target
SFVec3f vp_position
SFRotation vp_orientation
Fixed vp_fov
Fixed vp_dist
SFVec3f start_pos
SFVec3f end_pos
SFRotation start_ori
SFRotation end_ori
Fixed start_fov
Fixed end_fov
Fixed start_zoom
Fixed end_zoom
SFVec2f start_trans
SFVec2f start_rot
SFVec3f examine_center
u32 anim_len
u32 anim_start
Bool jumping
Fixed dheight
u32 navigation_flags
u32 navigate_mode
SFVec3f avatar_size
Fixed visibility
Fixed speed
Bool had_nav_info
u32 had_viewpoint
SFVec3f last_pos
u32 collide_flags
SFVec3f collide_point
Fixed collide_dist
SFVec3f ground_point
Fixed ground_dist
Bool last_had_ground
Bool last_had_col
GF_Matrix projection
GF_Matrix modelview
GF_Matrix unprojection
GF_Matrix viewport
GF_Plane planes[6]
u32 p_idx[6]
SFVec3f center
Fixed radius
GF_BBox world_bbox

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CAM_IS_DIRTY 
CAM_HAS_VIEWPORT 
CAM_NO_LOOKAT 

◆ anonymous enum

anonymous enum
Enumerator
CULL_NOT_SET 
CULL_OUTSIDE 
CULL_INSIDE 
CULL_INTERSECTS 

◆ anonymous enum

anonymous enum
Enumerator
NAV_HEADLIGHT 
NAV_SELECTABLE 
NAV_ANY 

◆ anonymous enum

anonymous enum
Enumerator
FRUS_NEAR_PLANE 
FRUS_FAR_PLANE 
FRUS_LEFT_PLANE 
FRUS_RIGHT_PLANE 
FRUS_BOTTOM_PLANE 
FRUS_TOP_PLANE 

◆ anonymous enum

anonymous enum
Enumerator
CF_NONE 
CF_COLLISION 
CF_DO_GRAVITY 
CF_GRAVITY 
CF_STORE_VP 

Function Documentation

◆ camera_invalidate()

void camera_invalidate ( GF_Camera cam)
+ Here is the caller graph for this function:

◆ camera_update()

void camera_update ( GF_Camera cam,
GF_Matrix2D user_transform,
Bool  center_coords 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ camera_update_stereo()

void camera_update_stereo ( GF_Camera cam,
GF_Matrix2D user_transform,
Bool  center_coords,
Fixed  horizontal_shift,
Fixed  viewing_distance,
Fixed  viewing_distance_offset,
u32  camlay 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ camera_reset_viewpoint()

void camera_reset_viewpoint ( GF_Camera cam,
Bool  animate 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ camera_move_to()

void camera_move_to ( GF_Camera cam,
SFVec3f  pos,
SFVec3f  target,
SFVec3f  up 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ camera_animate()

Bool camera_animate ( GF_Camera cam,
void *  compositor 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ camera_stop_anim()

void camera_stop_anim ( GF_Camera cam)
+ Here is the caller graph for this function:

◆ camera_jump()

void camera_jump ( GF_Camera cam)
+ Here is the caller graph for this function:

◆ camera_set_vectors()

void camera_set_vectors ( GF_Camera cam,
SFVec3f  pos,
SFRotation  ori,
Fixed  fov 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ camera_get_orientation()

SFRotation camera_get_orientation ( SFVec3f  pos,
SFVec3f  target,
SFVec3f  up 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ camera_get_pos_dir()

SFVec3f camera_get_pos_dir ( GF_Camera cam)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ camera_get_target_dir()

SFVec3f camera_get_target_dir ( GF_Camera cam)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ camera_get_right_dir()

SFVec3f camera_get_right_dir ( GF_Camera cam)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ camera_set_2d()

void camera_set_2d ( GF_Camera cam)
+ Here is the caller graph for this function: