libgpac
Documentation of the core library of GPAC
visual_manager_3d.c File Reference
#include "visual_manager.h"
#include "texturing.h"
#include "nodes_stacks.h"
+ Include dependency graph for visual_manager_3d.c:

Functions

Drawable3Ddrawable_3d_new (GF_Node *node)
 
void drawable_3d_del (GF_Node *n)
 
void drawable3d_check_focus_highlight (GF_Node *node, GF_TraverseState *tr_state, GF_BBox *orig_bounds)
 
static void visual_3d_setup_traversing_state (GF_VisualManager *visual, GF_TraverseState *tr_state)
 
void visual_3d_viewpoint_change (GF_TraverseState *tr_state, GF_Node *vp, Bool animate_change, Fixed fieldOfView, SFVec3f position, SFRotation orientation, SFVec3f local_center)
 
void visual_3d_setup_projection (GF_TraverseState *tr_state, Bool is_layer)
 
static void visual_3d_draw_background (GF_TraverseState *tr_state, u32 layer_type)
 
static void visual_3d_draw_background_on_axis (GF_TraverseState *tr_state, u32 layer_type)
 
void visual_3d_init_draw (GF_TraverseState *tr_state, u32 layer_type)
 
static GFINLINE Bool visual_3d_has_alpha (GF_TraverseState *tr_state, GF_Node *geom)
 
void visual_3d_register_context (GF_TraverseState *tr_state, GF_Node *geometry)
 
void visual_3d_flush_contexts (GF_VisualManager *visual, GF_TraverseState *tr_state)
 
static void visual_3d_draw_node (GF_TraverseState *tr_state, GF_Node *root_node)
 
void visual_3d_setup_clipper (GF_VisualManager *visual, GF_TraverseState *tr_state)
 
Bool visual_3d_draw_frame (GF_VisualManager *visual, GF_Node *root, GF_TraverseState *tr_state, Bool is_root_visual)
 
static void reset_collide_cursor (GF_Compositor *compositor)
 
void visual_3d_check_collisions (GF_TraverseState *tr_state, GF_Node *on_node, GF_ChildNodeItem *node_list)
 
Bool visual_3d_node_cull (GF_TraverseState *tr_state, GF_BBox *bbox, Bool skip_near)
 
Bool visual_3d_setup_ray (GF_VisualManager *visual, GF_TraverseState *tr_state, s32 ix, s32 iy)
 
void visual_3d_pick_node (GF_VisualManager *visual, GF_TraverseState *tr_state, GF_Event *ev, GF_ChildNodeItem *children)
 
void visual_3d_vrml_drawable_pick (GF_Node *n, GF_TraverseState *tr_state, GF_Mesh *mesh, Drawable *drawable)
 
void visual_3d_vrml_drawable_collide (GF_Node *node, GF_TraverseState *tr_state)
 
static GF_TextureHandlervisual_3d_setup_texture_2d (GF_TraverseState *tr_state, DrawAspect2D *asp, GF_Mesh *mesh)
 
void visual_3d_set_2d_strike (GF_TraverseState *tr_state, DrawAspect2D *asp)
 
void visual_3d_draw_2d_with_aspect (Drawable *st, GF_TraverseState *tr_state, DrawAspect2D *asp)
 
void visual_3d_draw_2d (Drawable *st, GF_TraverseState *tr_state)
 
void visual_3d_draw_from_context (DrawableContext *ctx, GF_TraverseState *tr_state)
 
static GFINLINE Bool visual_3d_setup_material (GF_TraverseState *tr_state, u32 mesh_type, Fixed *diffuse_alpha)
 
Bool visual_3d_setup_texture (GF_TraverseState *tr_state, Fixed diffuse_alpha)
 
void visual_3d_disable_texture (GF_TraverseState *tr_state)
 
Bool visual_3d_setup_appearance (GF_TraverseState *tr_state)
 
void visual_3d_draw (GF_TraverseState *tr_state, GF_Mesh *mesh)
 
void visual_3d_projection_matrix_modified (GF_VisualManager *visual)
 
void visual_3d_enable_headlight (GF_VisualManager *visual, Bool bOn, GF_Camera *cam)
 
void visual_3d_set_material_2d (GF_VisualManager *visual, SFColor col, Fixed alpha)
 
void visual_3d_set_material_2d_argb (GF_VisualManager *visual, u32 col)
 
void visual_3d_set_clipper_2d (GF_VisualManager *visual, GF_Rect clip, GF_Matrix *mx_at_clipper)
 
void visual_3d_reset_clipper_2d (GF_VisualManager *visual)
 
void visual_3d_set_clip_plane (GF_VisualManager *visual, GF_Plane p, GF_Matrix *mx_at_clipper, Bool is_2d_clip)
 
void visual_3d_reset_clip_plane (GF_VisualManager *visual)
 
void visual_3d_set_material (GF_VisualManager *visual, u32 material_type, Fixed *rgba)
 
void visual_3d_set_shininess (GF_VisualManager *visual, Fixed shininess)
 
void visual_3d_set_state (GF_VisualManager *visual, u32 flag_mask, Bool setOn)
 
void visual_3d_set_texture_matrix (GF_VisualManager *visual, GF_Matrix *mx)
 
void visual_3d_has_inactive_light (GF_VisualManager *visual)
 
Bool visual_3d_add_point_light (GF_VisualManager *visual, Fixed ambientIntensity, SFVec3f attenuation, SFColor color, Fixed intensity, SFVec3f location, GF_Matrix *light_mx)
 
Bool visual_3d_add_spot_light (GF_VisualManager *visual, Fixed ambientIntensity, SFVec3f attenuation, Fixed beamWidth, SFColor color, Fixed cutOffAngle, SFVec3f direction, Fixed intensity, SFVec3f location, GF_Matrix *light_mx)
 
Bool visual_3d_add_directional_light (GF_VisualManager *visual, Fixed ambientIntensity, SFColor color, Fixed intensity, SFVec3f direction, GF_Matrix *light_mx)
 
void visual_3d_remove_last_light (GF_VisualManager *visual)
 
void visual_3d_clear_all_lights (GF_VisualManager *visual)
 
void visual_3d_set_fog (GF_VisualManager *visual, const char *type, SFColor color, Fixed density, Fixed visibility)
 

Variables

static const char * szPlaneNames []
 

Function Documentation

◆ drawable_3d_new()

Drawable3D* drawable_3d_new ( GF_Node node)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawable_3d_del()

void drawable_3d_del ( GF_Node n)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawable3d_check_focus_highlight()

void drawable3d_check_focus_highlight ( GF_Node node,
GF_TraverseState *  tr_state,
GF_BBox orig_bounds 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_setup_traversing_state()

static void visual_3d_setup_traversing_state ( GF_VisualManager *  visual,
GF_TraverseState *  tr_state 
)
static
+ Here is the caller graph for this function:

◆ visual_3d_viewpoint_change()

void visual_3d_viewpoint_change ( GF_TraverseState *  tr_state,
GF_Node vp,
Bool  animate_change,
Fixed  fieldOfView,
SFVec3f  position,
SFRotation  orientation,
SFVec3f  local_center 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_setup_projection()

void visual_3d_setup_projection ( GF_TraverseState *  tr_state,
Bool  is_layer 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_draw_background()

static void visual_3d_draw_background ( GF_TraverseState *  tr_state,
u32  layer_type 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_draw_background_on_axis()

static void visual_3d_draw_background_on_axis ( GF_TraverseState *  tr_state,
u32  layer_type 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_init_draw()

void visual_3d_init_draw ( GF_TraverseState *  tr_state,
u32  layer_type 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_has_alpha()

static GFINLINE Bool visual_3d_has_alpha ( GF_TraverseState *  tr_state,
GF_Node geom 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_register_context()

void visual_3d_register_context ( GF_TraverseState *  tr_state,
GF_Node geometry 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_flush_contexts()

void visual_3d_flush_contexts ( GF_VisualManager *  visual,
GF_TraverseState *  tr_state 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_draw_node()

static void visual_3d_draw_node ( GF_TraverseState *  tr_state,
GF_Node root_node 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_setup_clipper()

void visual_3d_setup_clipper ( GF_VisualManager *  visual,
GF_TraverseState *  tr_state 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_draw_frame()

Bool visual_3d_draw_frame ( GF_VisualManager *  visual,
GF_Node root,
GF_TraverseState *  tr_state,
Bool  is_root_visual 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset_collide_cursor()

static void reset_collide_cursor ( GF_Compositor *  compositor)
static
+ Here is the caller graph for this function:

◆ visual_3d_check_collisions()

void visual_3d_check_collisions ( GF_TraverseState *  tr_state,
GF_Node on_node,
GF_ChildNodeItem node_list 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_node_cull()

Bool visual_3d_node_cull ( GF_TraverseState *  tr_state,
GF_BBox bbox,
Bool  skip_near 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_setup_ray()

Bool visual_3d_setup_ray ( GF_VisualManager *  visual,
GF_TraverseState *  tr_state,
s32  ix,
s32  iy 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_pick_node()

void visual_3d_pick_node ( GF_VisualManager *  visual,
GF_TraverseState *  tr_state,
GF_Event ev,
GF_ChildNodeItem children 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_vrml_drawable_pick()

void visual_3d_vrml_drawable_pick ( GF_Node n,
GF_TraverseState *  tr_state,
GF_Mesh mesh,
Drawable *  drawable 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_vrml_drawable_collide()

void visual_3d_vrml_drawable_collide ( GF_Node node,
GF_TraverseState *  tr_state 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_setup_texture_2d()

static GF_TextureHandler* visual_3d_setup_texture_2d ( GF_TraverseState *  tr_state,
DrawAspect2D *  asp,
GF_Mesh mesh 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_set_2d_strike()

void visual_3d_set_2d_strike ( GF_TraverseState *  tr_state,
DrawAspect2D *  asp 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_draw_2d_with_aspect()

void visual_3d_draw_2d_with_aspect ( Drawable *  st,
GF_TraverseState *  tr_state,
DrawAspect2D *  asp 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_draw_2d()

void visual_3d_draw_2d ( Drawable *  st,
GF_TraverseState *  tr_state 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_draw_from_context()

void visual_3d_draw_from_context ( DrawableContext *  ctx,
GF_TraverseState *  tr_state 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_setup_material()

static GFINLINE Bool visual_3d_setup_material ( GF_TraverseState *  tr_state,
u32  mesh_type,
Fixed diffuse_alpha 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_setup_texture()

Bool visual_3d_setup_texture ( GF_TraverseState *  tr_state,
Fixed  diffuse_alpha 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_disable_texture()

void visual_3d_disable_texture ( GF_TraverseState *  tr_state)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_setup_appearance()

Bool visual_3d_setup_appearance ( GF_TraverseState *  tr_state)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_draw()

void visual_3d_draw ( GF_TraverseState *  tr_state,
GF_Mesh mesh 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_projection_matrix_modified()

void visual_3d_projection_matrix_modified ( GF_VisualManager *  visual)
+ Here is the caller graph for this function:

◆ visual_3d_enable_headlight()

void visual_3d_enable_headlight ( GF_VisualManager *  visual,
Bool  bOn,
GF_Camera cam 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_set_material_2d()

void visual_3d_set_material_2d ( GF_VisualManager *  visual,
SFColor  col,
Fixed  alpha 
)
+ Here is the caller graph for this function:

◆ visual_3d_set_material_2d_argb()

void visual_3d_set_material_2d_argb ( GF_VisualManager *  visual,
u32  col 
)
+ Here is the caller graph for this function:

◆ visual_3d_set_clipper_2d()

void visual_3d_set_clipper_2d ( GF_VisualManager *  visual,
GF_Rect  clip,
GF_Matrix mx_at_clipper 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_reset_clipper_2d()

void visual_3d_reset_clipper_2d ( GF_VisualManager *  visual)
+ Here is the caller graph for this function:

◆ visual_3d_set_clip_plane()

void visual_3d_set_clip_plane ( GF_VisualManager *  visual,
GF_Plane  p,
GF_Matrix mx_at_clipper,
Bool  is_2d_clip 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visual_3d_reset_clip_plane()

void visual_3d_reset_clip_plane ( GF_VisualManager *  visual)
+ Here is the caller graph for this function:

◆ visual_3d_set_material()

void visual_3d_set_material ( GF_VisualManager *  visual,
u32  material_type,
Fixed rgba 
)
+ Here is the caller graph for this function:

◆ visual_3d_set_shininess()

void visual_3d_set_shininess ( GF_VisualManager *  visual,
Fixed  shininess 
)
+ Here is the caller graph for this function:

◆ visual_3d_set_state()

void visual_3d_set_state ( GF_VisualManager *  visual,
u32  flag_mask,
Bool  setOn 
)
+ Here is the caller graph for this function:

◆ visual_3d_set_texture_matrix()

void visual_3d_set_texture_matrix ( GF_VisualManager *  visual,
GF_Matrix mx 
)
+ Here is the caller graph for this function:

◆ visual_3d_has_inactive_light()

void visual_3d_has_inactive_light ( GF_VisualManager *  visual)
+ Here is the caller graph for this function:

◆ visual_3d_add_point_light()

Bool visual_3d_add_point_light ( GF_VisualManager *  visual,
Fixed  ambientIntensity,
SFVec3f  attenuation,
SFColor  color,
Fixed  intensity,
SFVec3f  location,
GF_Matrix light_mx 
)
+ Here is the caller graph for this function:

◆ visual_3d_add_spot_light()

Bool visual_3d_add_spot_light ( GF_VisualManager *  visual,
Fixed  ambientIntensity,
SFVec3f  attenuation,
Fixed  beamWidth,
SFColor  color,
Fixed  cutOffAngle,
SFVec3f  direction,
Fixed  intensity,
SFVec3f  location,
GF_Matrix light_mx 
)
+ Here is the caller graph for this function:

◆ visual_3d_add_directional_light()

Bool visual_3d_add_directional_light ( GF_VisualManager *  visual,
Fixed  ambientIntensity,
SFColor  color,
Fixed  intensity,
SFVec3f  direction,
GF_Matrix light_mx 
)
+ Here is the caller graph for this function:

◆ visual_3d_remove_last_light()

void visual_3d_remove_last_light ( GF_VisualManager *  visual)
+ Here is the caller graph for this function:

◆ visual_3d_clear_all_lights()

void visual_3d_clear_all_lights ( GF_VisualManager *  visual)
+ Here is the caller graph for this function:

◆ visual_3d_set_fog()

void visual_3d_set_fog ( GF_VisualManager *  visual,
const char *  type,
SFColor  color,
Fixed  density,
Fixed  visibility 
)
+ Here is the caller graph for this function:

Variable Documentation

◆ szPlaneNames

const char* szPlaneNames[]
static
Initial value:
=
{
"Near", "Far", "Left", "Right", "Bottom", "Top"
}