Functions
GenerateBVHModel

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...
 

Detailed Description

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.

Note
All functions in this group have a common sub-set of parameters (listed below). In addition, each has unique parameters related to the geometry type being added and how it should be tessellated. These additional parameters are documented with their corresponding function
Warning
If this function is used to create a BVHModel containing multiple geometric primitives, the BVHModel inherently represents the union of those primitives. The BVHModel structure does not retain any notion of the original geometric primitive.
Parameters
[out]modelThe BVHModel to be generated or added to
[in]shapeThe geometric object to be added to the BVHModel
[in]poseThe pose of the geometric object
[in]finalize_modelan enum indicating whether the model is final or more submodels can be added later
Returns
Return code (as defined by BVHReturnCode) indicating the success of the operation

Function Documentation

◆ generateBVHModel() [1/9]

template<typename BV >
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.

◆ generateBVHModel() [2/9]

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.

Parameters
[in]circle_split_totThe number of segments the bottom plate is split into
[in]h_numan 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.

◆ generateBVHModel() [3/9]

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.

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.

Parameters
[in]circle_split_tot_for_unit_coneThe 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.

◆ generateBVHModel() [4/9]

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.

Parameters
[in]circle_split_totThe number of segments the bottom plate of the cylinder is split into
[in]h_numThe number of segments along the axis the cylinder is split into

Definition at line 277 of file geometric_shape_to_BVH_model-inl.h.

◆ generateBVHModel() [5/9]

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.

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.

Parameters
[in]circle_split_tot_for_unit_cylinderThe 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.

◆ generateBVHModel() [6/9]

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.

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

Parameters
[in]n_faces_for_unit_ellipsoidThe number of faces a unit ellipsoid would have

Definition at line 256 of file geometric_shape_to_BVH_model-inl.h.

◆ generateBVHModel() [7/9]

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.

Parameters
[in]segThe number of segments along longitude
[in]ringThe number of rings along latitude

Definition at line 189 of file geometric_shape_to_BVH_model-inl.h.

◆ generateBVHModel() [8/9]

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.

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.

Parameters
[in]n_faces_for_unit_sphereThe number of triangles for a unit-sized sphere

Definition at line 175 of file geometric_shape_to_BVH_model-inl.h.

◆ generateBVHModel() [9/9]

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.

Parameters
[in]segThe number of segments along longitude
[in]ringThe number of rings along latitude

Definition at line 111 of file geometric_shape_to_BVH_model-inl.h.



fcl
Author(s):
autogenerated on Fri Apr 2 2021 02:38:02