Create a BVHModel using geometric primitives. More...
Functions | |
template<typename BV > | |
int | fcl::generateBVHModel (BVHModel< BV > &model, const Box< typename BV::S > &shape, const Transform3< typename BV::S > &pose, FinalizeModel finalize_model=FinalizeModel::DO) |
Generate BVH model from box. More... | |
template<typename BV > | |
int | fcl::generateBVHModel (BVHModel< BV > &model, const Cone< typename BV::S > &shape, const Transform3< typename BV::S > &pose, unsigned int circle_split_tot, unsigned int h_num, FinalizeModel finalize_model=FinalizeModel::DO) |
Generate BVH model from cone. More... | |
template<typename BV > | |
int | fcl::generateBVHModel (BVHModel< BV > &model, const Cone< typename BV::S > &shape, const Transform3< typename BV::S > &pose, unsigned int circle_split_tot_for_unit_cone, FinalizeModel finalize_model=FinalizeModel::DO) |
Generate BVH model from cone. More... | |
template<typename BV > | |
int | fcl::generateBVHModel (BVHModel< BV > &model, const Cylinder< typename BV::S > &shape, const Transform3< typename BV::S > &pose, unsigned int circle_split_tot, unsigned int h_num, FinalizeModel finalize_model=FinalizeModel::DO) |
Generate BVH model from cylinder, given the number of segments along circle and the number of segments along axis. More... | |
template<typename BV > | |
int | fcl::generateBVHModel (BVHModel< BV > &model, const Cylinder< typename BV::S > &shape, const Transform3< typename BV::S > &pose, unsigned int circle_split_tot_for_unit_cylinder, FinalizeModel finalize_model=FinalizeModel::DO) |
Generate BVH model from cylinder. More... | |
template<typename BV > | |
int | fcl::generateBVHModel (BVHModel< BV > &model, const Ellipsoid< typename BV::S > &shape, const Transform3< typename BV::S > &pose, unsigned int n_faces_for_unit_ellipsoid, FinalizeModel finalize_model=FinalizeModel::DO) |
Generate BVH model from ellipsoid. More... | |
template<typename BV > | |
int | fcl::generateBVHModel (BVHModel< BV > &model, const Ellipsoid< typename BV::S > &shape, const Transform3< typename BV::S > &pose, unsigned int seg, unsigned int ring, FinalizeModel finalize_model=FinalizeModel::DO) |
Generate BVH model from ellipsoid. More... | |
template<typename BV > | |
int | fcl::generateBVHModel (BVHModel< BV > &model, const Sphere< typename BV::S > &shape, const Transform3< typename BV::S > &pose, unsigned int n_faces_for_unit_sphere, FinalizeModel finalize_model=FinalizeModel::DO) |
Generate BVH model from sphere. More... | |
template<typename BV > | |
int | fcl::generateBVHModel (BVHModel< BV > &model, const Sphere< typename BV::S > &shape, const Transform3< typename BV::S > &pose, unsigned int seg, unsigned int ring, FinalizeModel finalize_model=FinalizeModel::DO) |
Generate BVH model from sphere. More... | |
Create a BVHModel using geometric primitives.
The functions in this group can be used to add geometric primitives (Box, Sphere, Ellipsoid, Cylinder, Cone) to a BVHModel. It can either close off the model or leave it unfinalized in order to add more primitives later.
[out] | model | The BVHModel to be generated or added to |
[in] | shape | The geometric object to be added to the BVHModel |
[in] | pose | The pose of the geometric object |
[in] | finalize_model | an enum indicating whether the model is final or more submodels can be added later |
int fcl::generateBVHModel | ( | BVHModel< BV > & | model, |
const Box< typename BV::S > & | shape, | ||
const Transform3< typename BV::S > & | pose, | ||
FinalizeModel | finalize_model | ||
) |
Generate BVH model from box.
Definition at line 69 of file geometric_shape_to_BVH_model-inl.h.
int fcl::generateBVHModel | ( | BVHModel< BV > & | model, |
const Cone< typename BV::S > & | shape, | ||
const Transform3< typename BV::S > & | pose, | ||
unsigned int | circle_split_tot, | ||
unsigned int | h_num, | ||
FinalizeModel | finalize_model = FinalizeModel::DO |
||
) |
Generate BVH model from cone.
[in] | circle_split_tot | The number of segments the bottom plate is split into |
[in] | h_num | an The number of segments along the axis the cone is split into |
Definition at line 361 of file geometric_shape_to_BVH_model-inl.h.
int fcl::generateBVHModel | ( | BVHModel< BV > & | model, |
const Cone< typename BV::S > & | shape, | ||
const Transform3< typename BV::S > & | pose, | ||
unsigned int | circle_split_tot_for_unit_cone, | ||
FinalizeModel | finalize_model = FinalizeModel::DO |
||
) |
Generate BVH model from cone.
Difference from generateBVHModel: is that it gives the circle split number tot for a cylinder with unit radius. For cone with larger radius, the number of circle split number is r * tot.
[in] | circle_split_tot_for_unit_cone | The number of segments the bottom plate of an equivalent unit-sized cone would be split into |
Definition at line 427 of file geometric_shape_to_BVH_model-inl.h.
int fcl::generateBVHModel | ( | BVHModel< BV > & | model, |
const Cylinder< typename BV::S > & | shape, | ||
const Transform3< typename BV::S > & | pose, | ||
unsigned int | circle_split_tot, | ||
unsigned int | h_num, | ||
FinalizeModel | finalize_model = FinalizeModel::DO |
||
) |
Generate BVH model from cylinder, given the number of segments along circle and the number of segments along axis.
[in] | circle_split_tot | The number of segments the bottom plate of the cylinder is split into |
[in] | h_num | The number of segments along the axis the cylinder is split into |
Definition at line 277 of file geometric_shape_to_BVH_model-inl.h.
int fcl::generateBVHModel | ( | BVHModel< BV > & | model, |
const Cylinder< typename BV::S > & | shape, | ||
const Transform3< typename BV::S > & | pose, | ||
unsigned int | circle_split_tot_for_unit_cylinder, | ||
FinalizeModel | finalize_model = FinalizeModel::DO |
||
) |
Generate BVH model from cylinder.
Difference from generateBVHModel: is that it gives the circle split number tot for a cylinder with unit radius. For cylinder with larger radius, the number of circle split number is r * tot.
[in] | circle_split_tot_for_unit_cylinder | The number of segments the bottom plate of an equivalent unit-sized cylinder would be split into |
Definition at line 342 of file geometric_shape_to_BVH_model-inl.h.
int fcl::generateBVHModel | ( | BVHModel< BV > & | model, |
const Ellipsoid< typename BV::S > & | shape, | ||
const Transform3< typename BV::S > & | pose, | ||
unsigned int | n_faces_for_unit_ellipsoid, | ||
FinalizeModel | finalize_model = FinalizeModel::DO |
||
) |
Generate BVH model from ellipsoid.
The difference between generateBVHModel is that it gives the number of triangles faces N for an ellipsoid with unit radii (1, 1, 1). For ellipsoid of radii (a, b, c), then the number of triangles is ((a^p * b^p + b^p * c^p + c^p * a^p)/3)^(1/p) * N, where p is 1.6075, so that the area represented by a single triangle is approximately the same. Reference: https://en.wikipedia.org/wiki/Ellipsoid#Approximate_formula
[in] | n_faces_for_unit_ellipsoid | The number of faces a unit ellipsoid would have |
Definition at line 256 of file geometric_shape_to_BVH_model-inl.h.
int fcl::generateBVHModel | ( | BVHModel< BV > & | model, |
const Ellipsoid< typename BV::S > & | shape, | ||
const Transform3< typename BV::S > & | pose, | ||
unsigned int | seg, | ||
unsigned int | ring, | ||
FinalizeModel | finalize_model = FinalizeModel::DO |
||
) |
Generate BVH model from ellipsoid.
[in] | seg | The number of segments along longitude |
[in] | ring | The number of rings along latitude |
Definition at line 189 of file geometric_shape_to_BVH_model-inl.h.
int fcl::generateBVHModel | ( | BVHModel< BV > & | model, |
const Sphere< typename BV::S > & | shape, | ||
const Transform3< typename BV::S > & | pose, | ||
unsigned int | n_faces_for_unit_sphere, | ||
FinalizeModel | finalize_model = FinalizeModel::DO |
||
) |
Generate BVH model from sphere.
The difference between generateBVHModel is that it gives the number of triangles faces N for a sphere with unit radius. For sphere of radius r, then the number of triangles is r * r * N so that the area represented by a single triangle is approximately the same.
[in] | n_faces_for_unit_sphere | The number of triangles for a unit-sized sphere |
Definition at line 175 of file geometric_shape_to_BVH_model-inl.h.
int fcl::generateBVHModel | ( | BVHModel< BV > & | model, |
const Sphere< typename BV::S > & | shape, | ||
const Transform3< typename BV::S > & | pose, | ||
unsigned int | seg, | ||
unsigned int | ring, | ||
FinalizeModel | finalize_model = FinalizeModel::DO |
||
) |
Generate BVH model from sphere.
[in] | seg | The number of segments along longitude |
[in] | ring | The number of rings along latitude |
Definition at line 111 of file geometric_shape_to_BVH_model-inl.h.