GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
mesh_collide.c File Reference
+ Include dependency graph for mesh_collide.c:

Data Structures

struct  AABSplitParams
 

Functions

static void update_node_bounds (GF_Mesh *mesh, AABBNode *node)
 
static u32 gf_vec_main_axis (SFVec3f v)
 
static Fixed tri_get_center (GF_Mesh *mesh, u32 tri_idx, u32 axis)
 
static u32 aabb_split (GF_Mesh *mesh, AABBNode *node, u32 axis)
 
static void mesh_subdivide_aabbtree (GF_Mesh *mesh, AABBNode *node, AABSplitParams *aab_par)
 
void gf_mesh_build_aabbtree (GF_Mesh *mesh)
 
static void ray_hit_triangle_get_u_v (GF_Ray *ray, GF_Vec *v0, GF_Vec *v1, GF_Vec *v2, Fixed *u, Fixed *v)
 
Bool gf_mesh_aabb_ray_hit (GF_Mesh *mesh, AABBNode *n, GF_Ray *ray, Fixed *closest, SFVec3f *outPoint, SFVec3f *outNormal, SFVec2f *outTexCoords)
 
Bool gf_mesh_intersect_ray (GF_Mesh *mesh, GF_Ray *ray, SFVec3f *outPoint, SFVec3f *outNormal, SFVec2f *outTexCoords)
 
static Bool mesh_collide_triangle (GF_Ray *ray, SFVec3f *v0, SFVec3f *v1, SFVec3f *v2, Fixed *dist)
 
static Bool sphere_box_overlap (SFVec3f sc, Fixed sq_rad, SFVec3f bmin, SFVec3f bmax)
 
Bool gf_mesh_closest_face_aabb (GF_Mesh *mesh, AABBNode *node, SFVec3f pos, Fixed min_dist, Fixed min_sq_dist, Fixed *min_col_dist, SFVec3f *outPoint)
 
Bool gf_mesh_closest_face (GF_Mesh *mesh, SFVec3f pos, Fixed min_dist, SFVec3f *outPoint)
 

Data Structure Documentation

struct AABSplitParams
+ Collaboration diagram for AABSplitParams:
Data Fields
u32 max_depth
u32 min_tri_limit
u32 split_type
u32 depth
u32 nb_nodes

Function Documentation

static void update_node_bounds ( GF_Mesh mesh,
AABBNode node 
)
static

+ Here is the caller graph for this function:

static u32 gf_vec_main_axis ( SFVec3f  v)
static

+ Here is the caller graph for this function:

static Fixed tri_get_center ( GF_Mesh mesh,
u32  tri_idx,
u32  axis 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 aabb_split ( GF_Mesh mesh,
AABBNode node,
u32  axis 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mesh_subdivide_aabbtree ( GF_Mesh mesh,
AABBNode node,
AABSplitParams aab_par 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gf_mesh_build_aabbtree ( GF_Mesh mesh)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ray_hit_triangle_get_u_v ( GF_Ray ray,
GF_Vec v0,
GF_Vec v1,
GF_Vec v2,
Fixed u,
Fixed v 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Bool gf_mesh_aabb_ray_hit ( GF_Mesh mesh,
AABBNode n,
GF_Ray ray,
Fixed closest,
SFVec3f outPoint,
SFVec3f outNormal,
SFVec2f outTexCoords 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Bool gf_mesh_intersect_ray ( GF_Mesh mesh,
GF_Ray ray,
SFVec3f outPoint,
SFVec3f outNormal,
SFVec2f outTexCoords 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool mesh_collide_triangle ( GF_Ray ray,
SFVec3f v0,
SFVec3f v1,
SFVec3f v2,
Fixed dist 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool sphere_box_overlap ( SFVec3f  sc,
Fixed  sq_rad,
SFVec3f  bmin,
SFVec3f  bmax 
)
static

+ Here is the caller graph for this function:

Bool gf_mesh_closest_face_aabb ( GF_Mesh mesh,
AABBNode node,
SFVec3f  pos,
Fixed  min_dist,
Fixed  min_sq_dist,
Fixed min_col_dist,
SFVec3f outPoint 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Bool gf_mesh_closest_face ( GF_Mesh mesh,
SFVec3f  pos,
Fixed  min_dist,
SFVec3f outPoint 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: