/// @brief Check collision between two OBB and return the overlap part. For OBB, the overlap_part return value is NOT used as the overlap part of two obbs usually is not an obb.
/// @brief distance between two RSS bounding volumes
/// P and Q (optional return values) are the closest points in the rectangles, not the RSS. But the direction P - Q is the correct direction for cloest points
/// Notice that P and Q are both in the local frame of the first RSS (not global frame and not even the local frame of object 1)
/// @brief 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.
intbeginUpdateModel();
...
...
@@ -186,7 +208,7 @@ public:
/// @brief Check the number of memory used
intmemUsage(intmsg)const;
/// @brief 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
/// @brief 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.
voidmakeParentRelative()
{
...
...
@@ -244,32 +266,6 @@ public:
returnC.trace()*Matrix3f::Identity()-C;
}
public:
/// @brief Geometry point data
Vec3f*vertices;
/// @brief Geometry triangle index data, will be NULL for point clouds
Triangle*tri_indices;
/// @brief Geometry point data in previous frame
Vec3f*prev_vertices;
/// @brief Number of triangles
intnum_tris;
/// @brief Number of points
intnum_vertices;
/// @brief The state of BVH building process
BVHBuildStatebuild_state;
/// @brief Split rule to split one BV node into two children
boost::shared_ptr<BVSplitterBase<BV>>bv_splitter;
/// @brief Fitting rule to fit a BV node to a set of geometry primitives
/// @brief Compute the sqrt of Sigma matrix based on the eigen decomposition result, this is useful when the uncertainty matrix is initialized as a square variation matrix