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;
124 template<
typename BV>
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);
void fit< AABB >(Vec3f *ps, unsigned int n, AABB &bv)
Vec3f * vertices
Definition: BV_fitter.h:117
void fit< kIOS >(Vec3f *ps, unsigned int n, kIOS &bv)
Main namespace.
Definition: AABB.h:43
Definition: BVH_internal.h:79
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 * tri_indices
Definition: BV_fitter.h:119
The class for the default algorithm fitting a bounding volume to a set of points. ...
Definition: BV_fitter.h:79
void clear()
Clear the geometry primitive data.
Definition: BV_fitter.h:107
A class describing the kIOS collision structure, which is a set of spheres.
Definition: kIOS.h:55
virtual ~BVFitterTpl()
default deconstructor
Definition: BV_fitter.h:83
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< OBB >(Vec3f *ps, unsigned int n, OBB &bv)
BVHModelType
BVH model type.
Definition: BVH_internal.h:77
A class describing the AABB collision structure, which is a box in 3D space determined by two diagona...
Definition: AABB.h:55
Triangle with 3 indices for points.
Definition: data_types.h:76
Vec3f * prev_vertices
Definition: BV_fitter.h:118
The class for the default algorithm fitting a bounding volume to a set of points. ...
Definition: BVH_model.h:58
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:67
void fit< RSS >(Vec3f *ps, unsigned int n, RSS &bv)
triangle model
Definition: BVH_internal.h:81
void fit< OBBRSS >(Vec3f *ps, unsigned int n, OBBRSS &bv)
BVHModelType type
Definition: BV_fitter.h:120
#define HPP_FCL_DLLAPI
Definition: config.hh:64
Oriented bounding box class.
Definition: OBB.h:54