Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
fcl::detail::BVSplitter< BV > Class Template Reference

A class describing the split rule that splits each BV node. More...

#include <BV_splitter.h>

Inheritance diagram for fcl::detail::BVSplitter< BV >:
Inheritance graph
[legend]

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< Ssplit_vector
 
Triangletri_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
 

Detailed Description

template<typename BV>
class fcl::detail::BVSplitter< BV >

A class describing the split rule that splits each BV node.

Definition at line 65 of file BV_splitter.h.

Member Typedef Documentation

◆ S

template<typename BV >
using fcl::detail::BVSplitter< BV >::S = typename BV::S

Definition at line 69 of file BV_splitter.h.

Constructor & Destructor Documentation

◆ BVSplitter()

template<typename BV >
fcl::detail::BVSplitter< BV >::BVSplitter ( SplitMethodType  method)

Definition at line 53 of file BV_splitter-inl.h.

◆ ~BVSplitter()

template<typename BV >
fcl::detail::BVSplitter< BV >::~BVSplitter
virtual

Default deconstructor.

Definition at line 61 of file BV_splitter-inl.h.

Member Function Documentation

◆ apply()

template<typename BV >
bool fcl::detail::BVSplitter< BV >::apply ( const Vector3< S > &  q) const
virtual

Apply the split rule on a given point.

Implements fcl::detail::BVSplitterBase< BV >.

Definition at line 110 of file BV_splitter-inl.h.

◆ clear()

template<typename BV >
void fcl::detail::BVSplitter< BV >::clear
virtual

Clear the geometry data set before.

Implements fcl::detail::BVSplitterBase< BV >.

Definition at line 504 of file BV_splitter-inl.h.

◆ computeRule()

template<typename BV >
void fcl::detail::BVSplitter< BV >::computeRule ( const BV &  bv,
unsigned int *  primitive_indices,
int  num_primitives 
)
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.

◆ computeRule_bvcenter()

template<typename BV >
void fcl::detail::BVSplitter< BV >::computeRule_bvcenter ( const BV &  bv,
unsigned int *  primitive_indices,
int  num_primitives 
)
private

Split algorithm 1: Split the node from center.

Definition at line 140 of file BV_splitter-inl.h.

◆ computeRule_mean()

template<typename BV >
void fcl::detail::BVSplitter< BV >::computeRule_mean ( const BV &  bv,
unsigned int *  primitive_indices,
int  num_primitives 
)
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.

◆ computeRule_median()

template<typename BV >
void fcl::detail::BVSplitter< BV >::computeRule_median ( const BV &  bv,
unsigned int *  primitive_indices,
int  num_primitives 
)
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.

◆ set()

template<typename BV >
void fcl::detail::BVSplitter< BV >::set ( Vector3< S > *  vertices_,
Triangle tri_indices_,
BVHModelType  type_ 
)
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.

Friends And Related Function Documentation

◆ ApplyImpl

template<typename BV >
template<typename , typename >
friend struct ApplyImpl
friend

Definition at line 132 of file BV_splitter.h.

◆ ComputeRuleCenterImpl

template<typename BV >
template<typename , typename >
friend struct ComputeRuleCenterImpl
friend

Definition at line 135 of file BV_splitter.h.

◆ ComputeRuleMeanImpl

template<typename BV >
template<typename , typename >
friend struct ComputeRuleMeanImpl
friend

Definition at line 138 of file BV_splitter.h.

◆ ComputeRuleMedianImpl

template<typename BV >
template<typename , typename >
friend struct ComputeRuleMedianImpl
friend

Definition at line 141 of file BV_splitter.h.

Member Data Documentation

◆ split_axis

template<typename BV >
int fcl::detail::BVSplitter< BV >::split_axis
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.

◆ split_method

template<typename BV >
SplitMethodType fcl::detail::BVSplitter< BV >::split_method
private

The split algorithm used.

Definition at line 115 of file BV_splitter.h.

◆ split_value

template<typename BV >
S fcl::detail::BVSplitter< BV >::split_value
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.

◆ split_vector

template<typename BV >
Vector3<S> fcl::detail::BVSplitter< BV >::split_vector
private

Definition at line 98 of file BV_splitter.h.

◆ tri_indices

template<typename BV >
Triangle* fcl::detail::BVSplitter< BV >::tri_indices
private

The triangles handled by the splitter.

Definition at line 109 of file BV_splitter.h.

◆ type

template<typename BV >
BVHModelType fcl::detail::BVSplitter< BV >::type
private

Whether the geometry is mesh or point cloud.

Definition at line 112 of file BV_splitter.h.

◆ vertices

template<typename BV >
Vector3<S>* fcl::detail::BVSplitter< BV >::vertices
private

The mesh vertices or points handled by the splitter.

Definition at line 106 of file BV_splitter.h.


The documentation for this class was generated from the following files:


fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:50