std::cerr<<"Split method not supported"<<std::endl;
}
}
/// @brief Apply the split rule on a given point
boolapply(constVec3f&q)const
{
returnq[split_axis]>split_value;
}
/// @brief Clear the geometry data set before
voidclear()
{
vertices=NULL;
tri_indices=NULL;
type=BVH_MODEL_UNKNOWN;
}
private:
/// @brief The axis based on which the split decision is made. For most BV, the axis is aligned with one of the world coordinate, so only split_axis is needed.
/// For oriented node, we can use a vector to make a better split decision.
intsplit_axis;
Vec3fsplit_vector;
/// @brief The split threshold, different primitives are splitted according whether their projection on the split_axis is larger or smaller than the threshold
FCL_REALsplit_value;
/// @brief The mesh vertices or points handled by the splitter
Vec3f*vertices;
/// @brief The triangles handled by the splitter
Triangle*tri_indices;
/// @brief Whether the geometry is mesh or point cloud
BVHModelTypetype;
/// @brief The split algorithm used
SplitMethodTypesplit_method;
/// @brief Split algorithm 1: Split the node from center