hpp-fcl: hpp::fcl::BVSplitter< BV > Class Template Reference

hpp-fcl 1.8.0 HPP fork of FCL -- The Flexible Collision Library

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
hpp::fcl::BVSplitter< BV > Class Template Reference
Construction of BVHModel

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

`#include <hpp/fcl/internal/BV_splitter.h>`

Inheritance diagram for hpp::fcl::BVSplitter< BV >:

## Public Member Functions
| BVSplitter (SplitMethodType method)
virtual | ~BVSplitter ()
| Default deconstructor. More...
void | set (Vec3f *vertices_, Triangle *tri_indices_, BVHModelType type_)
| Set the geometry data needed by the split rule. More...
void | computeRule (const BV &bv, unsigned int *primitive_indices, unsigned int num_primitives)
| Compute the split rule according to a subset of geometry and the corresponding BV node. More...
bool | apply (const Vec3f &q) const
| Apply the split rule on a given point. More...
void | clear ()
| Clear the geometry data set before. More...
bool | apply (const Vec3f &q) const
bool | apply (const Vec3f &q) const
bool | apply (const Vec3f &q) const
bool | apply (const Vec3f &q) const

## Protected Member Functions
void | computeRule_bvcenter (const BV &bv, unsigned int *, unsigned int)
| Split algorithm 1: Split the node from center. More...
void | computeRule_mean (const BV &bv, unsigned int *primitive_indices, unsigned 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, unsigned int num_primitives)
| Split algorithm 3: Split the node according to the median of the data contained. More...
void | computeRule_bvcenter (const OBB &bv, unsigned int *primitive_indices, unsigned int num_primitives)
void | computeRule_mean (const OBB &bv, unsigned int *primitive_indices, unsigned int num_primitives)
void | computeRule_median (const OBB &bv, unsigned int *primitive_indices, unsigned int num_primitives)
void | computeRule_bvcenter (const RSS &bv, unsigned int *primitive_indices, unsigned int num_primitives)
void | computeRule_mean (const RSS &bv, unsigned int *primitive_indices, unsigned int num_primitives)
void | computeRule_median (const RSS &bv, unsigned int *primitive_indices, unsigned int num_primitives)
void | computeRule_bvcenter (const kIOS &bv, unsigned int *primitive_indices, unsigned int num_primitives)
void | computeRule_mean (const kIOS &bv, unsigned int *primitive_indices, unsigned int num_primitives)
void | computeRule_median (const kIOS &bv, unsigned int *primitive_indices, unsigned int num_primitives)
void | computeRule_bvcenter (const OBBRSS &bv, unsigned int *primitive_indices, unsigned int num_primitives)
void | computeRule_mean (const OBBRSS &bv, unsigned int *primitive_indices, unsigned int num_primitives)
void | computeRule_median (const OBBRSS &bv, unsigned int *primitive_indices, unsigned int num_primitives)

## Protected 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...
Vec3f | split_vector
FCL_REAL | 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...
Vec3f * | vertices
| The mesh vertices or points handled by the splitter. More...
Triangle * | tri_indices
| The triangles handled by the splitter. More...
BVHModelType | type
| Whether the geometry is mesh or point cloud. More...
SplitMethodType | split_method
| The split algorithm used. More...

## Detailed Description

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

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

## Constructor & Destructor Documentation

## ◆ BVSplitter()

template<typename BV >

hpp::fcl::BVSplitter< BV >::BVSplitter | ( | SplitMethodType | method | ) |
| inline

## ◆ ~BVSplitter()

template<typename BV >

virtual hpp::fcl::BVSplitter< BV >::~BVSplitter | ( |  | ) |
| inlinevirtual

Default deconstructor.

## Member Function Documentation

## ◆ apply() [1/5]

template<typename BV >

bool hpp::fcl::BVSplitter< BV >::apply | ( | const Vec3f & | q | ) | const
| inline

Apply the split rule on a given point.

## ◆ apply() [2/5]

bool hpp::fcl::BVSplitter< OBB >::apply | ( | const Vec3f & | q | ) | const

## ◆ apply() [3/5]

bool hpp::fcl::BVSplitter< RSS >::apply | ( | const Vec3f & | q | ) | const

## ◆ apply() [4/5]

bool hpp::fcl::BVSplitter< kIOS >::apply | ( | const Vec3f & | q | ) | const

## ◆ apply() [5/5]

bool hpp::fcl::BVSplitter< OBBRSS >::apply | ( | const Vec3f & | q | ) | const

## ◆ clear()

template<typename BV >

void hpp::fcl::BVSplitter< BV >::clear | ( |  | ) |
| inline

Clear the geometry data set before.

## ◆ computeRule()

template<typename BV >

void hpp::fcl::BVSplitter< BV >::computeRule | ( | const BV & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| inline

Compute the split rule according to a subset of geometry and the corresponding BV node.

## ◆ computeRule_bvcenter() [1/5]

template<typename BV >

void hpp::fcl::BVSplitter< BV >::computeRule_bvcenter | ( | const BV & | bv,
|  | unsigned int * | ,
|  | unsigned int |
| ) |  |
| inlineprotected

Split algorithm 1: Split the node from center.

## ◆ computeRule_bvcenter() [2/5]

void hpp::fcl::BVSplitter< kIOS >::computeRule_bvcenter | ( | const kIOS & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| protected

## ◆ computeRule_bvcenter() [3/5]

void hpp::fcl::BVSplitter< OBB >::computeRule_bvcenter | ( | const OBB & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| protected

## ◆ computeRule_bvcenter() [4/5]

void hpp::fcl::BVSplitter< OBBRSS >::computeRule_bvcenter | ( | const OBBRSS & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| protected

## ◆ computeRule_bvcenter() [5/5]

void hpp::fcl::BVSplitter< RSS >::computeRule_bvcenter | ( | const RSS & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| protected

## ◆ computeRule_mean() [1/5]

template<typename BV >

void hpp::fcl::BVSplitter< BV >::computeRule_mean | ( | const BV & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| inlineprotected

Split algorithm 2: Split the node according to the mean of the data contained.

## ◆ computeRule_mean() [2/5]

void hpp::fcl::BVSplitter< kIOS >::computeRule_mean | ( | const kIOS & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| protected

## ◆ computeRule_mean() [3/5]

void hpp::fcl::BVSplitter< OBB >::computeRule_mean | ( | const OBB & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| protected

## ◆ computeRule_mean() [4/5]

void hpp::fcl::BVSplitter< OBBRSS >::computeRule_mean | ( | const OBBRSS & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| protected

## ◆ computeRule_mean() [5/5]

void hpp::fcl::BVSplitter< RSS >::computeRule_mean | ( | const RSS & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| protected

## ◆ computeRule_median() [1/5]

template<typename BV >

void hpp::fcl::BVSplitter< BV >::computeRule_median | ( | const BV & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| inlineprotected

Split algorithm 3: Split the node according to the median of the data contained.

## ◆ computeRule_median() [2/5]

void hpp::fcl::BVSplitter< kIOS >::computeRule_median | ( | const kIOS & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| protected

## ◆ computeRule_median() [3/5]

void hpp::fcl::BVSplitter< OBB >::computeRule_median | ( | const OBB & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| protected

## ◆ computeRule_median() [4/5]

void hpp::fcl::BVSplitter< OBBRSS >::computeRule_median | ( | const OBBRSS & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| protected

## ◆ computeRule_median() [5/5]

void hpp::fcl::BVSplitter< RSS >::computeRule_median | ( | const RSS & | bv,
|  | unsigned int * | primitive_indices,
|  | unsigned int | num_primitives
| ) |  |
| protected

## ◆ set()

template<typename BV >

void hpp::fcl::BVSplitter< BV >::set | ( | Vec3f * | vertices_,
|  | Triangle * | tri_indices_,
|  | BVHModelType | type_
| ) |  |
| inline

Set the geometry data needed by the split rule.

## Member Data Documentation

## ◆ split_axis

template<typename BV >

int hpp::fcl::BVSplitter< BV >::split_axis
| protected

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.

## ◆ split_method

template<typename BV >

SplitMethodType hpp::fcl::BVSplitter< BV >::split_method
| protected

The split algorithm used.

## ◆ split_value

template<typename BV >

FCL_REAL hpp::fcl::BVSplitter< BV >::split_value
| protected

The split threshold, different primitives are splitted according whether their projection on the split_axis is larger or smaller than the threshold.

## ◆ split_vector

template<typename BV >

Vec3f hpp::fcl::BVSplitter< BV >::split_vector
| protected

## ◆ tri_indices

template<typename BV >

Triangle* hpp::fcl::BVSplitter< BV >::tri_indices
| protected

The triangles handled by the splitter.

## ◆ type

template<typename BV >

BVHModelType hpp::fcl::BVSplitter< BV >::type
| protected

Whether the geometry is mesh or point cloud.

## ◆ vertices

template<typename BV >

Vec3f* hpp::fcl::BVSplitter< BV >::vertices
| protected

The mesh vertices or points handled by the splitter.

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

- include/hpp/fcl/BVH/BVH_model.h
- include/hpp/fcl/internal/BV_splitter.h