Workspace 6.21.5
|
Creates a mesh for a rod. More...
#include <Rendering/SceneComponents/Models/rodmesher.h>
Public Member Functions | |
Mesh::Vector3d | baseModelDirection () const |
bool | meshRod (double radius, double halfLength, double tipLength, int levelOfDetail, Mesh::MeshModelInterface &model, bool generateHemisphericalCaps=true, bool includeTipsInLength=false) |
Create a mesh of a rod, which is essentially a long cylinder with hemispherical caps at the end. Its shape is determined by the following parameters:
The mesher does not presently support the addition of texture coordinates.
Vector3d baseModelDirection | ( | ) | const |
bool meshRod | ( | double | radius, |
double | halfLengthIn, | ||
double | tipLengthIn, | ||
int | levelOfDetail, | ||
Mesh::MeshModelInterface & | model, | ||
bool | generateHemisphericalCaps = true , |
||
bool | includeTipsInLength = false |
||
) |
radius | The radius of the cylinder, and the hemispherical domes at each end. |
halfLengthIn | Half the length of the cylinder in the z-dimension, excluding one of the hemispherical domes. 2 * halfLength == totalCylinderLength (excluding hemispherical domes) |
tipLengthIn | The tip length |
levelOfDetail | Controls the number of elements in the mesh. Increases exponentially. |
model | The model to generate the mesh data inside. |
generateHemisphericalCaps | If true (default), the rods will be capped with hemispheres |
includeTipsInLength | If true, the distance between the tips / caps of the rod glypher will be the length. If false, the distance between the ends of the cylinder part will be the length. |
Generates a rod mesh in the target mesh model using the input radius, halfLength and level-of-detail.