$search

collision_checking::BVHModel< BV > Class Template Reference

A class describing the bounding hierarchy of a mesh model. More...

#include <BVH_model.h>

List of all members.

Public Member Functions

int addSubModel (const std::vector< Vec3f > &ps)
 Add a set of points in the new BVH model.
int addSubModel (const std::vector< Vec3f > &ps, const std::vector< Triangle > &ts)
 Add a set of triangles in the new BVH model.
int addTriangle (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3)
 Add one triangle in the new BVH model.
int addVertex (const Vec3f &p)
 Add one point in the new BVH model.
int beginModel (int num_tris=0, int num_vertices=0)
 Begin a new BVH model.
int beginReplaceModel ()
 Replace the geometry information of current frame (i.e. should have the same mesh topology with the previous frame).
int beginUpdateModel ()
 Replace the geometry information of current frame (i.e. should have the same mesh topology with the previous frame). The current frame will be saved as the previous frame in prev_vertices.
 BVHModel ()
int endModel ()
 End BVH model construction, will build the bounding volume hierarchy.
int endReplaceModel (bool refit=true, bool bottomup=true)
 End BVH model replacement, will also refit or rebuild the bounding volume hierarchy.
int endUpdateModel (bool refit=true, bool bottomup=true)
 End BVH model update, will also refit or rebuild the bounding volume hierarchy.
BVHModelType getModelType () const
 Model type.
int memUsage (int msg) const
 Check the number of memory used.
int replaceSubModel (const std::vector< Vec3f > &ps)
 Replace a set of points in the old BVH model.
int replaceTriangle (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3)
 Replace one triangle in the old BVH model.
int replaceVertex (const Vec3f &p)
 Replace one point in the old BVH model.
int updateSubModel (const std::vector< Vec3f > &ps)
 Update a set of points in the old BVH model.
int updateTriangle (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3)
 Update one triangle in the old BVH model.
int updateVertex (const Vec3f &p)
 Update one point in the old BVH model.
 ~BVHModel ()

Public Attributes

BVHBuildState build_state
 The state of BVH building process.
BVFitter< BV > bv_fitter
 Fitting rule to fit a BV node to a set of geometry primitives.
BVSplitRule< BV > bv_splitter
 Split rule to split one BV node into two children.
BVNode< BV > * bvs
 Bounding volume hierarchy.
int num_bvs
 Number of BV nodes in bounding volume hierarchy.
int num_tris
 Number of triangles.
int num_vertices
 Number of points.
Vec3fprev_vertices
 Geometry point data in previous frame.
Triangletri_indices
 Geometry triangle index data, will be NULL for point clouds.
Vec3fvertices
 Geometry point data.

Private Member Functions

int buildTree ()
 Build the bounding volume hierarchy.
int recursiveBuildTree (int bv_id, int first_primitive, int num_primitives)
 Recursive kernel for hierarchy construction.
int recursiveRefitTree_bottomup (int bv_id)
 Recursive kernel for bottomup refitting.
int refitTree (bool bottomup)
 Refit the bounding volume hierarchy.
int refitTree_bottomup ()
 Refit the bounding volume hierarchy in a bottom-up way (fast but less compact).
int refitTree_topdown ()
 Refit the bounding volume hierarchy in a top-down way (slow but more compact).

Private Attributes

int num_bvs_allocated
int num_tris_allocated
int num_vertex_updated
int num_vertices_allocated
unsigned int * primitive_indices

Detailed Description

template<typename BV>
class collision_checking::BVHModel< BV >

A class describing the bounding hierarchy of a mesh model.

Definition at line 104 of file BVH_model.h.


Constructor & Destructor Documentation

template<typename BV>
collision_checking::BVHModel< BV >::BVHModel (  )  [inline]

Definition at line 155 of file BVH_model.h.

template<typename BV>
collision_checking::BVHModel< BV >::~BVHModel (  )  [inline]

Definition at line 176 of file BVH_model.h.


Member Function Documentation

template<typename BV >
int collision_checking::BVHModel< BV >::addSubModel ( const std::vector< Vec3f > &  ps  )  [inline]

Add a set of points in the new BVH model.

Definition at line 177 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::addSubModel ( const std::vector< Vec3f > &  ps,
const std::vector< Triangle > &  ts 
) [inline]

Add a set of triangles in the new BVH model.

Definition at line 212 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::addTriangle ( const Vec3f p1,
const Vec3f p2,
const Vec3f p3 
) [inline]

Add one triangle in the new BVH model.

Definition at line 124 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::addVertex ( const Vec3f p  )  [inline]

Add one point in the new BVH model.

Definition at line 94 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::beginModel ( int  num_tris = 0,
int  num_vertices = 0 
) [inline]

Begin a new BVH model.

Definition at line 47 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::beginReplaceModel (  )  [inline]

Replace the geometry information of current frame (i.e. should have the same mesh topology with the previous frame).

Definition at line 345 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::beginUpdateModel (  )  [inline]

Replace the geometry information of current frame (i.e. should have the same mesh topology with the previous frame). The current frame will be saved as the previous frame in prev_vertices.

Definition at line 443 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::buildTree (  )  [inline, private]

Build the bounding volume hierarchy.

Definition at line 575 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::endModel (  )  [inline]

End BVH model construction, will build the bounding volume hierarchy.

Definition at line 274 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::endReplaceModel ( bool  refit = true,
bool  bottomup = true 
) [inline]

End BVH model replacement, will also refit or rebuild the bounding volume hierarchy.

Definition at line 410 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::endUpdateModel ( bool  refit = true,
bool  bottomup = true 
) [inline]

End BVH model update, will also refit or rebuild the bounding volume hierarchy.

Definition at line 518 of file BVH_model.cpp.

template<typename BV>
BVHModelType collision_checking::BVHModel< BV >::getModelType (  )  const [inline]

Model type.

Definition at line 145 of file BVH_model.h.

template<typename BV >
int collision_checking::BVHModel< BV >::memUsage ( int  msg  )  const [inline]

Check the number of memory used.

Definition at line 555 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::recursiveBuildTree ( int  bv_id,
int  first_primitive,
int  num_primitives 
) [inline, private]

Recursive kernel for hierarchy construction.

Definition at line 611 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::recursiveRefitTree_bottomup ( int  bv_id  )  [inline, private]

Recursive kernel for bottomup refitting.

Definition at line 708 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::refitTree ( bool  bottomup  )  [inline, private]

Refit the bounding volume hierarchy.

Definition at line 690 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::refitTree_bottomup (  )  [inline, private]

Refit the bounding volume hierarchy in a bottom-up way (fast but less compact).

Definition at line 699 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::refitTree_topdown (  )  [inline, private]

Refit the bounding volume hierarchy in a top-down way (slow but more compact).

Definition at line 781 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::replaceSubModel ( const std::vector< Vec3f > &  ps  )  [inline]

Replace a set of points in the old BVH model.

Definition at line 393 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::replaceTriangle ( const Vec3f p1,
const Vec3f p2,
const Vec3f p3 
) [inline]

Replace one triangle in the old BVH model.

Definition at line 378 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::replaceVertex ( const Vec3f p  )  [inline]

Replace one point in the old BVH model.

Definition at line 363 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::updateSubModel ( const std::vector< Vec3f > &  ps  )  [inline]

Update a set of points in the old BVH model.

Definition at line 501 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::updateTriangle ( const Vec3f p1,
const Vec3f p2,
const Vec3f p3 
) [inline]

Update one triangle in the old BVH model.

Definition at line 486 of file BVH_model.cpp.

template<typename BV >
int collision_checking::BVHModel< BV >::updateVertex ( const Vec3f p  )  [inline]

Update one point in the old BVH model.

Definition at line 471 of file BVH_model.cpp.


Member Data Documentation

The state of BVH building process.

Definition at line 136 of file BVH_model.h.

template<typename BV>
BVFitter<BV> collision_checking::BVHModel< BV >::bv_fitter

Fitting rule to fit a BV node to a set of geometry primitives.

Definition at line 142 of file BVH_model.h.

template<typename BV>
BVSplitRule<BV> collision_checking::BVHModel< BV >::bv_splitter

Split rule to split one BV node into two children.

Definition at line 139 of file BVH_model.h.

template<typename BV>
BVNode<BV>* collision_checking::BVHModel< BV >::bvs

Bounding volume hierarchy.

Definition at line 124 of file BVH_model.h.

template<typename BV>
int collision_checking::BVHModel< BV >::num_bvs

Number of BV nodes in bounding volume hierarchy.

Definition at line 133 of file BVH_model.h.

template<typename BV>
int collision_checking::BVHModel< BV >::num_bvs_allocated [private]

Definition at line 109 of file BVH_model.h.

template<typename BV>
int collision_checking::BVHModel< BV >::num_tris

Number of triangles.

Definition at line 127 of file BVH_model.h.

template<typename BV>
int collision_checking::BVHModel< BV >::num_tris_allocated [private]

Definition at line 107 of file BVH_model.h.

template<typename BV>
int collision_checking::BVHModel< BV >::num_vertex_updated [private]

Definition at line 110 of file BVH_model.h.

template<typename BV>
int collision_checking::BVHModel< BV >::num_vertices

Number of points.

Definition at line 130 of file BVH_model.h.

template<typename BV>
int collision_checking::BVHModel< BV >::num_vertices_allocated [private]

Definition at line 108 of file BVH_model.h.

template<typename BV>
Vec3f* collision_checking::BVHModel< BV >::prev_vertices

Geometry point data in previous frame.

Definition at line 121 of file BVH_model.h.

template<typename BV>
unsigned int* collision_checking::BVHModel< BV >::primitive_indices [private]

Definition at line 111 of file BVH_model.h.

template<typename BV>
Triangle* collision_checking::BVHModel< BV >::tri_indices

Geometry triangle index data, will be NULL for point clouds.

Definition at line 118 of file BVH_model.h.

template<typename BV>
Vec3f* collision_checking::BVHModel< BV >::vertices

Geometry point data.

Definition at line 115 of file BVH_model.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


collision_checking
Author(s): Jia Pan, Dinesh Manocha (UNC, Chapel Hill)
autogenerated on Fri Mar 1 14:57:00 2013