Helper class to generate vertex buffers for standard geometric shapes, such as cylinders, cones, boxes, spheres, elipsoids ... .
More...
#include <StandardShapes.h>
|
static void | MakeCircle (ai_real radius, unsigned int tess, std::vector< aiVector3D > &positions) |
| Generates a flat circle. More...
|
|
static void | MakeCone (ai_real height, ai_real radius1, ai_real radius2, unsigned int tess, std::vector< aiVector3D > &positions, bool bOpen=false) |
| Generates a cone or a cylinder, either open or closed. More...
|
|
static unsigned int | MakeDodecahedron (std::vector< aiVector3D > &positions, bool polygons=false) |
| Generates a dodecahedron. More...
|
|
static unsigned int | MakeHexahedron (std::vector< aiVector3D > &positions, bool polygons=false) |
| Generates a hexahedron (cube) More...
|
|
static unsigned int | MakeIcosahedron (std::vector< aiVector3D > &positions) |
| Generates an icosahedron. More...
|
|
static aiMesh * | MakeMesh (const std::vector< aiVector3D > &positions, unsigned int numIndices) |
| Generates a mesh from an array of vertex positions. More...
|
|
static aiMesh * | MakeMesh (unsigned int n, void(*GenerateFunc)(unsigned int, std::vector< aiVector3D > &)) |
|
static aiMesh * | MakeMesh (unsigned int(*GenerateFunc)(std::vector< aiVector3D > &)) |
|
static aiMesh * | MakeMesh (unsigned int(*GenerateFunc)(std::vector< aiVector3D > &, bool)) |
|
static unsigned int | MakeOctahedron (std::vector< aiVector3D > &positions) |
| Generates an octahedron. More...
|
|
static void | MakeSphere (unsigned int tess, std::vector< aiVector3D > &positions) |
| Generates a sphere. More...
|
|
static unsigned int | MakeTetrahedron (std::vector< aiVector3D > &positions) |
| Generates a tetrahedron. More...
|
|
Helper class to generate vertex buffers for standard geometric shapes, such as cylinders, cones, boxes, spheres, elipsoids ... .
◆ MakeCircle()
static void Assimp::StandardShapes::MakeCircle |
( |
ai_real |
radius, |
|
|
unsigned int |
tess, |
|
|
std::vector< aiVector3D > & |
positions |
|
) |
| |
|
static |
Generates a flat circle.
The circle is constructed in the planned formed by the x,z axes of the cartesian coordinate system.
- Parameters
-
radius | Radius of the circle |
tess | Number of segments. |
positions | Receives output triangles. |
◆ MakeCone()
static void Assimp::StandardShapes::MakeCone |
( |
ai_real |
height, |
|
|
ai_real |
radius1, |
|
|
ai_real |
radius2, |
|
|
unsigned int |
tess, |
|
|
std::vector< aiVector3D > & |
positions, |
|
|
bool |
bOpen = false |
|
) |
| |
|
static |
Generates a cone or a cylinder, either open or closed.
|-----| <- radius 1
__x__ <- ] ^
/ \ | height |
/ \ | Y
/ \ |
/ \ |
/______x______\ <- ] <- end cap
|-------------| <- radius 2
- Parameters
-
height | Height of the cone |
radius1 | First radius |
radius2 | Second radius |
tess | Number of triangles. |
bOpened | true for an open cone/cylinder. An open shape has no 'end caps' |
positions | Receives output triangles |
◆ MakeDodecahedron()
static unsigned int Assimp::StandardShapes::MakeDodecahedron |
( |
std::vector< aiVector3D > & |
positions, |
|
|
bool |
polygons = false |
|
) |
| |
|
static |
Generates a dodecahedron.
- Parameters
-
positions | Receives output triangles |
polygons | If you pass true here pentagons will be returned |
- Returns
- Number of vertices per face
◆ MakeHexahedron()
static unsigned int Assimp::StandardShapes::MakeHexahedron |
( |
std::vector< aiVector3D > & |
positions, |
|
|
bool |
polygons = false |
|
) |
| |
|
static |
Generates a hexahedron (cube)
Hexahedrons can be scaled on all axes.
- Parameters
-
positions | Receives output triangles. |
polygons | If you pass true here quads will be returned |
- Returns
- Number of vertices per face
◆ MakeIcosahedron()
static unsigned int Assimp::StandardShapes::MakeIcosahedron |
( |
std::vector< aiVector3D > & |
positions | ) |
|
|
static |
Generates an icosahedron.
- Parameters
-
positions | Receives output triangles. |
- Returns
- Number of vertices per face
◆ MakeMesh() [1/4]
static aiMesh * Assimp::StandardShapes::MakeMesh |
( |
const std::vector< aiVector3D > & |
positions, |
|
|
unsigned int |
numIndices |
|
) |
| |
|
static |
Generates a mesh from an array of vertex positions.
- Parameters
-
positions | List of vertex positions |
numIndices | Number of indices per primitive |
- Returns
- Output mesh
◆ MakeMesh() [2/4]
static aiMesh * Assimp::StandardShapes::MakeMesh |
( |
unsigned int |
n, |
|
|
void(*)(unsigned int, std::vector< aiVector3D > &) |
GenerateFunc |
|
) |
| |
|
static |
◆ MakeMesh() [3/4]
static aiMesh * Assimp::StandardShapes::MakeMesh |
( |
unsigned int(*)(std::vector< aiVector3D > &) |
GenerateFunc | ) |
|
|
static |
◆ MakeMesh() [4/4]
static aiMesh * Assimp::StandardShapes::MakeMesh |
( |
unsigned int(*)(std::vector< aiVector3D > &, bool) |
GenerateFunc | ) |
|
|
static |
◆ MakeOctahedron()
static unsigned int Assimp::StandardShapes::MakeOctahedron |
( |
std::vector< aiVector3D > & |
positions | ) |
|
|
static |
Generates an octahedron.
- Parameters
-
positions | Receives output triangles. |
- Returns
- Number of vertices per face
◆ MakeSphere()
static void Assimp::StandardShapes::MakeSphere |
( |
unsigned int |
tess, |
|
|
std::vector< aiVector3D > & |
positions |
|
) |
| |
|
static |
Generates a sphere.
- Parameters
-
tess | Number of subdivions - 0 generates a octahedron |
positions | Receives output triangles. |
◆ MakeTetrahedron()
static unsigned int Assimp::StandardShapes::MakeTetrahedron |
( |
std::vector< aiVector3D > & |
positions | ) |
|
|
static |
Generates a tetrahedron.
- Parameters
-
positions | Receives output triangles. |
- Returns
- Number of vertices per face
The documentation for this class was generated from the following file: