Go to the documentation of this file.
38 #ifndef HPP_FCL_BV_FITTER_H
39 #define HPP_FCL_BV_FITTER_H
51 template <
typename BV>
53 for (
unsigned int i = 0; i < n; ++i)
76 template <
typename BV>
86 tri_indices = tri_indices_;
95 prev_vertices = prev_vertices_;
96 tri_indices = tri_indices_;
101 virtual BV
fit(
unsigned int* primitive_indices,
102 unsigned int num_primitives) = 0;
107 prev_vertices = NULL;
121 template <
typename BV>
129 BV
fit(
unsigned int* primitive_indices,
unsigned int num_primitives) {
134 for (
unsigned int i = 0; i < num_primitives; ++i) {
135 Triangle t = tri_indices[primitive_indices[i]];
136 bv += vertices[
t[0]];
137 bv += vertices[
t[1]];
138 bv += vertices[
t[2]];
142 bv += prev_vertices[
t[0]];
143 bv += prev_vertices[
t[1]];
144 bv += prev_vertices[
t[2]];
149 for (
unsigned int i = 0; i < num_primitives; ++i) {
150 bv += vertices[primitive_indices[i]];
154 bv += prev_vertices[primitive_indices[i]];
163 using Base::prev_vertices;
164 using Base::tri_indices;
166 using Base::vertices;
176 OBB fit(
unsigned int* primitive_indices,
unsigned int num_primitives);
186 RSS fit(
unsigned int* primitive_indices,
unsigned int num_primitives);
196 kIOS fit(
unsigned int* primitive_indices,
unsigned int num_primitives);
206 OBBRSS fit(
unsigned int* primitive_indices,
unsigned int num_primitives);
216 AABB fit(
unsigned int* primitive_indices,
unsigned int num_primitives);
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
The class for the default algorithm fitting a bounding volume to a set of points.
void set(Vec3f *vertices_, Vec3f *prev_vertices_, Triangle *tri_indices_, BVHModelType type_)
Prepare the geometry primitive data for fitting, for deformable mesh.
void clear()
Clear the geometry primitive data.
A class describing the kIOS collision structure, which is a set of spheres.
void fit(Vec3f *ps, unsigned int n, BV &bv)
Compute a bounding volume that fits a set of n points.
void fit< OBBRSS >(Vec3f *ps, unsigned int n, OBBRSS &bv)
void set(Vec3f *vertices_, Triangle *tri_indices_, BVHModelType type_)
Prepare the geometry primitive data for fitting.
@ BVH_MODEL_TRIANGLES
unknown model type
void fit< OBB >(Vec3f *ps, unsigned int n, OBB &bv)
BVHModelType
BVH model type.
Oriented bounding box class.
A class describing the AABB collision structure, which is a box in 3D space determined by two diagona...
The class for the default algorithm fitting a bounding volume to a set of points.
BV fit(unsigned int *primitive_indices, unsigned int num_primitives)
Compute a bounding volume that fits a set of primitives (points or triangles). The primitive data was...
void fit< kIOS >(Vec3f *ps, unsigned int n, kIOS &bv)
void fit< AABB >(Vec3f *ps, unsigned int n, AABB &bv)
Triangle with 3 indices for points.
@ BVH_MODEL_POINTCLOUD
triangle model
void fit< RSS >(Vec3f *ps, unsigned int n, RSS &bv)
virtual ~BVFitterTpl()
default deconstructor
hpp-fcl
Author(s):
autogenerated on Fri Aug 2 2024 02:45:13