Visual Computing Library
Loading...
Searching...
No Matches
Mesh Creation Algorithms

List of Mesh Creation algorithms. More...

Collaboration diagram for Mesh Creation Algorithms:

Classes

struct  vcl::CreateSphereArgs
 The CreateSphereArgs structs contains a series of parameters to generate a sphere. More...
 

Functions

template<PolygonMeshConcept MeshType, LoggerConcept LogType = NullLogger>
MeshType vcl::createDodecahedron (LogType &log=nullLogger)
 Creates and returns a Polygon Mesh containing a Dodecahedron.
 
template<FaceMeshConcept MeshType>
MeshType vcl::createHexahedron ()
 Creates and returns a hexahedron having as extremes the points (-1, -1, -1) and (1, 1, 1).
 
template<FaceMeshConcept MeshType, Point3Concept CoordType>
MeshType vcl::createHexahedron (const CoordType &min, const CoordType &max)
 Creates and returns a Hexahedron having as extremes points min and max given as arguments.
 
template<FaceMeshConcept MeshType, Point3Concept CoordType>
MeshType vcl::createCube (const CoordType &min, double edgeLength)
 Creates and returns a Cube having min as minimum extreme and the given edge length.
 
template<FaceMeshConcept MeshType>
MeshType vcl::createCube ()
 Creates and returns a Cube having (-0.5, -0.5, -0.5) as minimum extreme and 1 length.
 
template<FaceMeshConcept MeshType>
MeshType vcl::createIcosahedron (bool normalizeVertices=false)
 Creates and returns an icosahedron mesh.
 
template<FaceMeshConcept MeshType>
MeshType vcl::createSphereUV (const SphereConcept auto &sp, uint parallels=10, uint meridians=20)
 Creates and returns a sphere mesh using the UV mode, starting from a sphere object.
 
template<FaceMeshConcept MeshType>
MeshType vcl::createSphereNormalizedCube (const SphereConcept auto &sp, uint divisions)
 Creates and returns a sphere mesh using the normalized cube mode, starting from a sphere object.
 
template<FaceMeshConcept MeshType>
MeshType vcl::createSphereSpherifiedCube (const SphereConcept auto &sp, uint divisions)
 Creates and returns a sphere mesh using the spherified cube mode, starting from a sphere object.
 
template<FaceMeshConcept MeshType>
MeshType vcl::createSphereIcosahedron (const SphereConcept auto &sp, uint divisions)
 Creates and returns a sphere mesh using the icosahedron mode, starting from a sphere object.
 
template<FaceMeshConcept MeshType>
MeshType vcl::createSphere (const SphereConcept auto &sp, const CreateSphereArgs &args=CreateSphereArgs())
 Creates a Sphere Mesh starting from a sphere object, using the generation method given in the argument args.mode (see https://github.com/caosdoar/spheres for more details).
 
template<FaceMeshConcept MeshType>
MeshType vcl::createSphere ()
 Creates a Sphere Mesh using the UV mode (https://github.com/caosdoar/spheres), centered in (0, 0, 0), having radius 1, with 10 parallels and 20 meridias.
 
template<FaceMeshConcept MeshType>
MeshType vcl::createTetrahedron ()
 Creates a simple tetrahedron mesh with the following point coordinates:
 
template<FaceMeshConcept MeshType, Point3Concept CoordType>
MeshType vcl::createTetrahedron (const CoordType &p0, const CoordType &p1, const CoordType &p2, const CoordType &p3)
 createTetrahedron createTetrahedron creates a simple tetrahedron mesh with the given points. The function assumes that the points p0, p1 and p2 are in counterclockwise order, and does not perform any sanity check about the validity of the points.
 

Detailed Description

List of Mesh Creation algorithms.

You can access these algorithms by including #include <vclib/algorithms/mesh/create.h>

Function Documentation

◆ createCube() [1/2]

template<FaceMeshConcept MeshType>
MeshType vcl::createCube ( )

Creates and returns a Cube having (-0.5, -0.5, -0.5) as minimum extreme and 1 length.

If the mesh is composed of triangles, the the returned mesh is already triangulated. If the mesh is composed of quads or polygons, a mesh containing 6 quads will be returned.

Returns
A Cube centered in (0, 0, 0) and with edge length 1.

◆ createCube() [2/2]

template<FaceMeshConcept MeshType, Point3Concept CoordType>
MeshType vcl::createCube ( const CoordType &  min,
double  edgeLength 
)

Creates and returns a Cube having min as minimum extreme and the given edge length.

If the mesh is composed of triangles, the the returned mesh is already triangulated. If the mesh is composed of quads or polygons, a mesh containing 6 quads will be returned.

Returns
A Mesh containing a [min, min+edgeLength] Cube.

◆ createDodecahedron()

template<PolygonMeshConcept MeshType, LoggerConcept LogType = NullLogger>
MeshType vcl::createDodecahedron ( LogType log = nullLogger)

Creates and returns a Polygon Mesh containing a Dodecahedron.

Creates and returns a Triangle Mesh containing a triangulated Dodecahedron.

The returned mesh will contain 12 pentagons.

Returns
A Mesh containing a dodecahedron.

If the mesh is composed of triangles, the the returned mesh is already triangulated. If the mesh is polygonal, a mesh containing 12 pentagons will be returned.

Returns
A Mesh containing a dodecahedron.

◆ createHexahedron() [1/2]

template<FaceMeshConcept MeshType>
MeshType vcl::createHexahedron ( )

Creates and returns a hexahedron having as extremes the points (-1, -1, -1) and (1, 1, 1).

If the mesh is composed of triangles, the the returned mesh is already triangulated. If the mesh is composed of quads or polygons, a mesh containing 6 quads will be returned.

Returns
A Mesh containing a [(-1, -1, -1), (1, 1, 1)]Hexahedron .

◆ createHexahedron() [2/2]

template<FaceMeshConcept MeshType, Point3Concept CoordType>
MeshType vcl::createHexahedron ( const CoordType &  min,
const CoordType &  max 
)

Creates and returns a Hexahedron having as extremes points min and max given as arguments.

If the mesh is composed of triangles, the the returned mesh is already triangulated. If the mesh is composed of quads or polygons, a mesh containing 6 quads will be returned.

Returns
A Mesh containing a [min, max]Hexahedron.

◆ createIcosahedron()

template<FaceMeshConcept MeshType>
MeshType vcl::createIcosahedron ( bool  normalizeVertices = false)

Creates and returns an icosahedron mesh.

Template Parameters
MeshTypeThe type of the mesh to create, it must satisfy the FaceMeshConcept.
Parameters
[in]normalizeVerticesIf true, the vertices are normalized.
Returns
The icosahedron mesh.

◆ createSphere() [1/2]

template<FaceMeshConcept MeshType>
MeshType vcl::createSphere ( )

Creates a Sphere Mesh using the UV mode (https://github.com/caosdoar/spheres), centered in (0, 0, 0), having radius 1, with 10 parallels and 20 meridias.

Template Parameters
MeshTypethe type of the mesh to be generated, it must satisfy the FaceMeshConcept.
Returns
A sphere mesh.

◆ createSphere() [2/2]

template<FaceMeshConcept MeshType>
MeshType vcl::createSphere ( const SphereConcept auto sp,
const CreateSphereArgs args = CreateSphereArgs() 
)

Creates a Sphere Mesh starting from a sphere object, using the generation method given in the argument args.mode (see https://github.com/caosdoar/spheres for more details).

Template Parameters
MeshTypethe type of the mesh to be generated, it must satisfy the FaceMeshConcept.
Parameters
[in]spA sphere object (its type must satisfy the SphereConcept).
[in]argsArguments for the sphere generation.
Returns
A sphere mesh.

◆ createSphereIcosahedron()

template<FaceMeshConcept MeshType>
MeshType vcl::createSphereIcosahedron ( const SphereConcept auto sp,
uint  divisions 
)

Creates and returns a sphere mesh using the icosahedron mode, starting from a sphere object.

Template Parameters
MeshTypeThe type of the mesh to create, it must satisfy the FaceMeshConcept.
Parameters
[in]spA sphere object (its type must satisfy the SphereConcept).
[in]divisionsThe number of divisions in the returned sphere mesh.
Returns
A sphere mesh.

◆ createSphereNormalizedCube()

template<FaceMeshConcept MeshType>
MeshType vcl::createSphereNormalizedCube ( const SphereConcept auto sp,
uint  divisions 
)

Creates and returns a sphere mesh using the normalized cube mode, starting from a sphere object.

Template Parameters
MeshTypeThe type of the mesh to create, it must satisfy the FaceMeshConcept.
Parameters
[in]spA sphere object (its type must satisfy the SphereConcept).
[in]divisionsThe number of divisions in the returned sphere mesh.
Returns
A sphere mesh.

◆ createSphereSpherifiedCube()

template<FaceMeshConcept MeshType>
MeshType vcl::createSphereSpherifiedCube ( const SphereConcept auto sp,
uint  divisions 
)

Creates and returns a sphere mesh using the spherified cube mode, starting from a sphere object.

Template Parameters
MeshTypeThe type of the mesh to create, it must satisfy the FaceMeshConcept.
Parameters
[in]spA sphere object (its type must satisfy the SphereConcept).
[in]divisionsThe number of divisions in the returned sphere mesh.
Returns
A sphere mesh.

◆ createSphereUV()

template<FaceMeshConcept MeshType>
MeshType vcl::createSphereUV ( const SphereConcept auto sp,
uint  parallels = 10,
uint  meridians = 20 
)

Creates and returns a sphere mesh using the UV mode, starting from a sphere object.

Template Parameters
MeshTypeThe type of the mesh to create, it must satisfy the FaceMeshConcept.
Parameters
[in]spA sphere object (its type must satisfy the SphereConcept).
[in]parallelsThe number of parallels in the returned sphere mesh.
[in]meridiansThe number of meridians in the returned sphere mesh.
Returns
A sphere mesh.

◆ createTetrahedron() [1/2]

template<FaceMeshConcept MeshType>
MeshType vcl::createTetrahedron ( )

Creates a simple tetrahedron mesh with the following point coordinates:

( 1, 1, 1),
(-1, 1, -1),
(-1, -1, 1),
( 1, -1, -1)
Template Parameters
MeshTypethe type of the mesh to be generated, it must satisfy the FaceMeshConcept.
Returns
a Mesh containing a Tetrahedron.

◆ createTetrahedron() [2/2]

template<FaceMeshConcept MeshType, Point3Concept CoordType>
MeshType vcl::createTetrahedron ( const CoordType &  p0,
const CoordType &  p1,
const CoordType &  p2,
const CoordType &  p3 
)

createTetrahedron createTetrahedron creates a simple tetrahedron mesh with the given points. The function assumes that the points p0, p1 and p2 are in counterclockwise order, and does not perform any sanity check about the validity of the points.

Template Parameters
MeshTypethe type of the mesh to be generated, it must satisfy the FaceMeshConcept.
CoordTypethe type of the coordinates of the points, it must satisfy the Point3Concept.
Parameters
[in]p0the first point of the tetrahedron.
[in]p1the second point of the tetrahedron.
[in]p2the third point of the tetrahedron.
[in]p3the fourth point of the tetrahedron.
Returns
a Mesh containing a Tetrahedron.