23#ifndef VCL_ALGORITHMS_MESH_CREATE_HEXAHEDRON_H
24#define VCL_ALGORITHMS_MESH_CREATE_HEXAHEDRON_H
26#include <vclib/mesh/requirements.h>
32template<FaceMeshConcept MeshType>
33void fillHexahedronTriangles(MeshType& m)
50template<FaceMeshConcept MeshType>
51void fillHexahedronQuads(MeshType& m)
54 m.addFace(2, 3, 1, 0);
55 m.addFace(4, 6, 2, 0);
56 m.addFace(1, 5, 4, 0);
57 m.addFace(6, 4, 5, 7);
58 m.addFace(3, 2, 6, 7);
59 m.addFace(5, 1, 3, 7);
76template<FaceMeshConcept MeshType>
79 using CoordType = MeshType::Vertex::CoordType;
82 CoordType(-1, -1, -1), CoordType(1, 1, 1));
97template<FaceMeshConcept MeshType, Po
int3Concept CoordType>
115 detail::fillHexahedronTriangles(
m);
118 detail::fillHexahedronQuads(
m);
135template<FaceMeshConcept MeshType, Po
int3Concept CoordType>
153template<FaceMeshConcept MeshType>
156 using CoordType = MeshType::Vertex::CoordType;
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
MeshType createCube()
Creates and returns a Cube having (-0.5, -0.5, -0.5) as minimum extreme and 1 length.
Definition hexahedron.h:154
MeshType createHexahedron()
Creates and returns a hexahedron having as extremes the points (-1, -1, -1) and (1,...
Definition hexahedron.h:77
constexpr auto max(const T &p1, const T &p2)
Returns the maximum between the two parameters.
Definition min_max.h:83
constexpr auto min(const T &p1, const T &p2)
Returns the minimum between the two parameters.
Definition min_max.h:42