38#ifndef HPP_FCL_BV_FITTER_H
39#define HPP_FCL_BV_FITTER_H
56 for(
unsigned int i = 0; i < n; ++i)
90 tri_indices = tri_indices_;
98 prev_vertices = prev_vertices_;
99 tri_indices = tri_indices_;
104 virtual BV
fit(
unsigned int* primitive_indices,
unsigned int num_primitives) = 0;
110 prev_vertices = NULL;
131 BV
fit(
unsigned int* primitive_indices,
unsigned int num_primitives)
137 for(
unsigned int i = 0; i < num_primitives; ++i)
139 Triangle t = tri_indices[primitive_indices[i]];
140 bv += vertices[t[0]];
141 bv += vertices[t[1]];
142 bv += vertices[t[2]];
146 bv += prev_vertices[t[0]];
147 bv += prev_vertices[t[1]];
148 bv += prev_vertices[t[2]];
154 for(
unsigned int i = 0; i < num_primitives; ++i)
156 bv += vertices[primitive_indices[i]];
160 bv += prev_vertices[primitive_indices[i]];
169 using Base::vertices;
170 using Base::prev_vertices;
171 using Base::tri_indices;
182 OBB fit(
unsigned int* primitive_indices,
unsigned int num_primitives);
192 RSS fit(
unsigned int* primitive_indices,
unsigned int num_primitives);
202 kIOS fit(
unsigned int* primitive_indices,
unsigned int num_primitives);
212 OBBRSS fit(
unsigned int* primitive_indices,
unsigned int num_primitives);
222 AABB fit(
unsigned int* primitive_indices,
unsigned int num_primitives);
A class describing the AABB collision structure, which is a box in 3D space determined by two diagona...
Definition: AABB.h:56
The class for the default algorithm fitting a bounding volume to a set of points.
Definition: BV_fitter.h:80
BVHModelType type
Definition: BV_fitter.h:120
Vec3f * vertices
Definition: BV_fitter.h:117
void set(Vec3f *vertices_, Vec3f *prev_vertices_, Triangle *tri_indices_, BVHModelType type_)
Prepare the geometry primitive data for fitting, for deformable mesh.
Definition: BV_fitter.h:95
void clear()
Clear the geometry primitive data.
Definition: BV_fitter.h:107
Triangle * tri_indices
Definition: BV_fitter.h:119
Vec3f * prev_vertices
Definition: BV_fitter.h:118
void set(Vec3f *vertices_, Triangle *tri_indices_, BVHModelType type_)
Prepare the geometry primitive data for fitting.
Definition: BV_fitter.h:86
virtual BV fit(unsigned int *primitive_indices, unsigned int num_primitives)=0
Compute the fitting BV.
virtual ~BVFitterTpl()
default deconstructor
Definition: BV_fitter.h:83
AABB 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...
OBB 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...
kIOS 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...
The class for the default algorithm fitting a bounding volume to a set of points.
Definition: BV_fitter.h:126
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...
Definition: BV_fitter.h:131
Triangle with 3 indices for points.
Definition: data_types.h:77
A class describing the kIOS collision structure, which is a set of spheres.
Definition: kIOS.h:56
#define HPP_FCL_DLLAPI
Definition: config.hh:64
void fit< RSS >(Vec3f *ps, unsigned int n, RSS &bv)
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:67
BVHModelType
BVH model type.
Definition: BVH_internal.h:78
@ BVH_MODEL_POINTCLOUD
triangle model
Definition: BVH_internal.h:81
@ BVH_MODEL_UNKNOWN
Definition: BVH_internal.h:79
@ BVH_MODEL_TRIANGLES
unknown model type
Definition: BVH_internal.h:80
void fit(Vec3f *ps, unsigned int n, BV &bv)
Compute a bounding volume that fits a set of n points.
Definition: BV_fitter.h:54
void fit< AABB >(Vec3f *ps, unsigned int n, AABB &bv)
void fit< OBB >(Vec3f *ps, unsigned int n, OBB &bv)
void fit< OBBRSS >(Vec3f *ps, unsigned int n, OBBRSS &bv)
void fit< kIOS >(Vec3f *ps, unsigned int n, kIOS &bv)
Main namespace.
Definition: AABB.h:44
Oriented bounding box class.
Definition: OBB.h:55