A class describing the split rule that splits each BV node. More...
#include <BV_splitter.h>
Public Types | |
using | S = typename BV::S |
Public Types inherited from fcl::detail::BVSplitterBase< BV > | |
using | S = typename BV::S |
Public Member Functions | |
bool | apply (const Vector3< S > &q) const |
Apply the split rule on a given point. More... | |
BVSplitter (SplitMethodType method) | |
void | clear () |
Clear the geometry data set before. More... | |
void | computeRule (const BV &bv, unsigned int *primitive_indices, int num_primitives) |
Compute the split rule according to a subset of geometry and the corresponding BV node. More... | |
void | set (Vector3< S > *vertices_, Triangle *tri_indices_, BVHModelType type_) |
Set the geometry data needed by the split rule. More... | |
virtual | ~BVSplitter () |
Default deconstructor. More... | |
Private Member Functions | |
void | computeRule_bvcenter (const BV &bv, unsigned int *primitive_indices, int num_primitives) |
Split algorithm 1: Split the node from center. More... | |
void | computeRule_mean (const BV &bv, unsigned int *primitive_indices, int num_primitives) |
Split algorithm 2: Split the node according to the mean of the data contained. More... | |
void | computeRule_median (const BV &bv, unsigned int *primitive_indices, int num_primitives) |
Split algorithm 3: Split the node according to the median of the data contained. More... | |
Private Attributes | |
int | split_axis |
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. More... | |
SplitMethodType | split_method |
The split algorithm used. More... | |
S | split_value |
The split threshold, different primitives are splitted according whether their projection on the split_axis is larger or smaller than the threshold. More... | |
Vector3< S > | split_vector |
Triangle * | tri_indices |
The triangles handled by the splitter. More... | |
BVHModelType | type |
Whether the geometry is mesh or point cloud. More... | |
Vector3< S > * | vertices |
The mesh vertices or points handled by the splitter. More... | |
Friends | |
template<typename , typename > | |
struct | ApplyImpl |
template<typename , typename > | |
struct | ComputeRuleCenterImpl |
template<typename , typename > | |
struct | ComputeRuleMeanImpl |
template<typename , typename > | |
struct | ComputeRuleMedianImpl |
A class describing the split rule that splits each BV node.
Definition at line 65 of file BV_splitter.h.
using fcl::detail::BVSplitter< BV >::S = typename BV::S |
Definition at line 69 of file BV_splitter.h.
fcl::detail::BVSplitter< BV >::BVSplitter | ( | SplitMethodType | method | ) |
Definition at line 53 of file BV_splitter-inl.h.
|
virtual |
Default deconstructor.
Definition at line 61 of file BV_splitter-inl.h.
|
virtual |
Apply the split rule on a given point.
Implements fcl::detail::BVSplitterBase< BV >.
Definition at line 110 of file BV_splitter-inl.h.
|
virtual |
Clear the geometry data set before.
Implements fcl::detail::BVSplitterBase< BV >.
Definition at line 504 of file BV_splitter-inl.h.
|
virtual |
Compute the split rule according to a subset of geometry and the corresponding BV node.
Implements fcl::detail::BVSplitterBase< BV >.
Definition at line 78 of file BV_splitter-inl.h.
|
private |
Split algorithm 1: Split the node from center.
Definition at line 140 of file BV_splitter-inl.h.
|
private |
Split algorithm 2: Split the node according to the mean of the data contained.
Definition at line 193 of file BV_splitter-inl.h.
|
private |
Split algorithm 3: Split the node according to the median of the data contained.
Definition at line 251 of file BV_splitter-inl.h.
|
virtual |
Set the geometry data needed by the split rule.
Implements fcl::detail::BVSplitterBase< BV >.
Definition at line 68 of file BV_splitter-inl.h.
Definition at line 132 of file BV_splitter.h.
Definition at line 135 of file BV_splitter.h.
Definition at line 138 of file BV_splitter.h.
Definition at line 141 of file BV_splitter.h.
|
private |
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.
Definition at line 97 of file BV_splitter.h.
|
private |
The split algorithm used.
Definition at line 115 of file BV_splitter.h.
|
private |
The split threshold, different primitives are splitted according whether their projection on the split_axis is larger or smaller than the threshold.
Definition at line 103 of file BV_splitter.h.
|
private |
Definition at line 98 of file BV_splitter.h.
|
private |
The triangles handled by the splitter.
Definition at line 109 of file BV_splitter.h.
|
private |
Whether the geometry is mesh or point cloud.
Definition at line 112 of file BV_splitter.h.
|
private |
The mesh vertices or points handled by the splitter.
Definition at line 106 of file BV_splitter.h.