A class describing the bounding hierarchy of a mesh model or a point cloud model (which is viewed as a degraded version of mesh)
More...
|
| BVHModel () |
| Default constructor to build an empty BVH.
|
|
| BVHModel (const BVHModel &other) |
| Copy constructor from another BVH.
|
|
virtual BVHModel< BV > * | clone () const |
| Clone *this into a new BVHModel.
|
|
| ~BVHModel () |
| deconstruction, delete mesh data related.
|
|
const BVNode< BV > & | getBV (unsigned int i) const |
| We provide getBV() and getNumBVs() because BVH may be compressed (in future), so we must provide some flexibility here.
|
|
BVNode< BV > & | getBV (unsigned int i) |
| Access the bv giving the its index.
|
|
unsigned int | getNumBVs () const |
| Get the number of bv in the BVH.
|
|
NODE_TYPE | getNodeType () const |
| Get the BV type: default is unknown.
|
|
int | memUsage (const bool msg) const |
| Check the number of memory used.
|
|
void | makeParentRelative () |
| This is a special acceleration: BVH_model default stores the BV's transform in world coordinate. However, we can also store each BV's transform related to its parent BV node. When traversing the BVH, this can save one matrix transformation.
|
|
NODE_TYPE | getNodeType () const |
| Specialization of getNodeType() for BVHModel with different BV types.
|
|
NODE_TYPE | getNodeType () const |
| get the node type
|
|
NODE_TYPE | getNodeType () const |
| get the node type
|
|
NODE_TYPE | getNodeType () const |
| get the node type
|
|
NODE_TYPE | getNodeType () const |
| get the node type
|
|
NODE_TYPE | getNodeType () const |
| get the node type
|
|
NODE_TYPE | getNodeType () const |
| get the node type
|
|
NODE_TYPE | getNodeType () const |
| get the node type
|
|
BVHModelType | getModelType () const |
| Model type described by the instance.
|
|
| BVHModelBase () |
| Constructing an empty BVH.
|
|
| BVHModelBase (const BVHModelBase &other) |
| copy from another BVH
|
|
virtual | ~BVHModelBase () |
| deconstruction, delete mesh data related.
|
|
OBJECT_TYPE | getObjectType () const |
| Get the object type: it is a BVH.
|
|
void | computeLocalAABB () |
| Compute the AABB for the BVH, used for broad-phase collision.
|
|
int | beginModel (unsigned int num_tris=0, unsigned int num_vertices=0) |
| Begin a new BVH model.
|
|
int | addVertex (const Vec3s &p) |
| Add one point in the new BVH model.
|
|
int | addVertices (const MatrixX3s &points) |
| Add points in the new BVH model.
|
|
int | addTriangles (const Matrixx3i &triangles) |
| Add triangles in the new BVH model.
|
|
int | addTriangle (const Vec3s &p1, const Vec3s &p2, const Vec3s &p3) |
| Add one triangle in the new BVH model.
|
|
int | addSubModel (const std::vector< Vec3s > &ps, const std::vector< Triangle32 > &ts) |
| Add a set of triangles in the new BVH model.
|
|
int | addSubModel (const std::vector< Vec3s > &ps) |
| Add a set of points in the new BVH model.
|
|
int | endModel () |
| End BVH model construction, will build the bounding volume hierarchy.
|
|
int | beginReplaceModel () |
| Replace the geometry information of current frame (i.e. should have the same mesh topology with the previous frame)
|
|
int | replaceVertex (const Vec3s &p) |
| Replace one point in the old BVH model.
|
|
int | replaceTriangle (const Vec3s &p1, const Vec3s &p2, const Vec3s &p3) |
| Replace one triangle in the old BVH model.
|
|
int | replaceSubModel (const std::vector< Vec3s > &ps) |
| Replace a set of points in the old BVH model.
|
|
int | endReplaceModel (bool refit=true, bool bottomup=true) |
| End BVH model replacement, will also refit or rebuild the bounding volume hierarchy.
|
|
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.
|
|
int | updateVertex (const Vec3s &p) |
| Update one point in the old BVH model.
|
|
int | updateTriangle (const Vec3s &p1, const Vec3s &p2, const Vec3s &p3) |
| Update one triangle in the old BVH model.
|
|
int | updateSubModel (const std::vector< Vec3s > &ps) |
| Update a set of points in the old BVH model.
|
|
int | endUpdateModel (bool refit=true, bool bottomup=true) |
| End BVH model update, will also refit or rebuild the bounding volume hierarchy.
|
|
void | buildConvexRepresentation (bool share_memory) |
| Build this Convex<Triangle> representation of this model. The result is stored in attribute convex.
|
|
bool | buildConvexHull (bool keepTriangle, const char *qhullCommand=NULL) |
| Build a convex hull and store it in attribute convex.
|
|
Vec3s | computeCOM () const |
| compute center of mass
|
|
Scalar | computeVolume () const |
| compute the volume
|
|
Matrix3s | computeMomentofInertia () const |
| compute the inertia matrix, related to the origin
|
|
| CollisionGeometry () |
|
| CollisionGeometry (const CollisionGeometry &other)=default |
| Copy constructor.
|
|
virtual | ~CollisionGeometry () |
|
bool | operator== (const CollisionGeometry &other) const |
| Equality operator.
|
|
bool | operator!= (const CollisionGeometry &other) const |
| Difference operator.
|
|
void * | getUserData () const |
| get user data in geometry
|
|
void | setUserData (void *data) |
| set user data in geometry
|
|
bool | isOccupied () const |
| whether the object is completely occupied
|
|
bool | isFree () const |
| whether the object is completely free
|
|
bool | isUncertain () const |
| whether the object has some uncertainty
|
|
virtual Matrix3s | computeMomentofInertiaRelatedToCOM () const |
| compute the inertia matrix, related to the com
|
|
|
void | deleteBVs () |
|
bool | allocateBVs () |
|
int | buildTree () |
| Build the bounding volume hierarchy.
|
|
int | refitTree (bool bottomup) |
| Refit the bounding volume hierarchy.
|
|
int | refitTree_topdown () |
| Refit the bounding volume hierarchy in a top-down way (slow but more compact)
|
|
int | refitTree_bottomup () |
| Refit the bounding volume hierarchy in a bottom-up way (fast but less compact)
|
|
int | recursiveBuildTree (int bv_id, unsigned int first_primitive, unsigned int num_primitives) |
| Recursive kernel for hierarchy construction.
|
|
int | recursiveRefitTree_bottomup (int bv_id) |
| Recursive kernel for bottomup refitting.
|
|
void | makeParentRelativeRecurse (int bv_id, Matrix3s &parent_axes, const Vec3s &parent_c) |
|
void | makeParentRelativeRecurse (int bv_id, Matrix3s &parent_axes, const Vec3s &parent_c) |
|
void | makeParentRelativeRecurse (int bv_id, Matrix3s &parent_axes, const Vec3s &parent_c) |
|
void | makeParentRelativeRecurse (int bv_id, Matrix3s &parent_axes, const Vec3s &parent_c) |
|
template<typename BV>
class coal::BVHModel< BV >
A class describing the bounding hierarchy of a mesh model or a point cloud model (which is viewed as a degraded version of mesh)
- Template Parameters
-