| DART 6.12.2
    | 
This class represents triangle meshes. More...
#include <TriMesh.hpp>
 
  
| Public Types | |
| using | S = S_ | 
| using | Base = Mesh< S > | 
| using | Index = typename Base::Index | 
| using | Vector3 = typename Base::Vector3 | 
| using | Triangle = Eigen::Matrix< Index, 3, 1 > | 
| using | Vertices = typename Base::Vertices | 
| using | Normals = typename Base::Normals | 
| using | Triangles = std::vector< Triangle > | 
| using | Indices = std::vector< Index > | 
| Public Member Functions | |
| TriMesh () | |
| Default constructor. | |
| ~TriMesh () override=default | |
| Destructor. | |
| void | setTriangles (const Vertices &vertices, const Triangles &triangles) | 
| Sets vertices and triangles. | |
| void | computeVertexNormals () | 
| Computes vertex normals. | |
| bool | hasTriangles () const | 
| Returns true if the mesh contains triangles. | |
| bool | hasTriangleNormals () const | 
| Returns true if the mesh contains triangle normals. | |
| const Triangles & | getTriangles () const | 
| Returns the triangles of the mesh. | |
| const Normals & | getTriangleNormals () const | 
| Returns the triangle normals of the mesh. | |
| void | clear () override | 
| Clears all the data in the trimesh. | |
| TriMesh | operator+ (const TriMesh &other) const | 
| Addition operator. | |
| TriMesh & | operator+= (const TriMesh &other) | 
| Addition assignment operator. | |
| std::shared_ptr< TriMesh< S > > | generateConvexHull (bool optimize=true) const | 
| Generates a convex hull that encloses the trimesh. | |
| bool | hasVertices () const | 
| Returns true if the mesh contains vertices. | |
| bool | hasVertexNormals () const | 
| Returns true if the mesh contains vertex normals. | |
| const Vertices & | getVertices () const | 
| Returns the vertices of the mesh. | |
| const Normals & | getVertexNormals () const | 
| Returns the vertex normals of the mesh. | |
| bool | isEmpty () const | 
| Returns true if the mesh has no vertices. | |
| void | translate (const Vector3 &translation) | 
| Translates the mesh vertices by adding translationto the vertices. | |
| Mesh | operator+ (const Mesh &other) const | 
| Addition operator. | |
| Mesh & | operator+= (const Mesh &other) | 
| Addition assignment operator. | |
| Protected Member Functions | |
| void | computeTriangleNormals () | 
| Computes triangle normals. | |
| void | normalizeTriangleNormals () | 
| Normalizes triangle normals. | |
| void | normalizeVertexNormals () | 
| Normalizes the vertex normals. | |
| Protected Attributes | |
| Triangles | mTriangles | 
| Triangle indices of the mesh. | |
| Normals | mTriangleNormals | 
| Triangle normals of the mesh. | |
| Vertices | mVertices | 
| Vertices of the mesh. | |
| Normals | mVertexNormals | 
| Vertex normals of the mesh. | |
This class represents triangle meshes.
| using dart::math::TriMesh< S_ >::Base = Mesh<S> | 
| using dart::math::TriMesh< S_ >::Index = typename Base::Index | 
| 
 | inherited | 
| using dart::math::TriMesh< S_ >::Normals = typename Base::Normals | 
| using dart::math::TriMesh< S_ >::S = S_ | 
| using dart::math::TriMesh< S_ >::Triangle = Eigen::Matrix<Index, 3, 1> | 
| using dart::math::TriMesh< S_ >::Triangles = std::vector<Triangle> | 
| using dart::math::TriMesh< S_ >::Vector3 = typename Base::Vector3 | 
| using dart::math::TriMesh< S_ >::Vertices = typename Base::Vertices | 
| dart::math::TriMesh< S >::TriMesh | ( | ) | 
Default constructor.
| 
 | overridedefault | 
Destructor.
| 
 | overridevirtual | 
Clears all the data in the trimesh.
Reimplemented from dart::math::Mesh< S_ >.
| 
 | protected | 
Computes triangle normals.
| void dart::math::TriMesh< S >::computeVertexNormals | ( | ) | 
Computes vertex normals.
| std::shared_ptr< TriMesh< S > > dart::math::TriMesh< S >::generateConvexHull | ( | bool | optimize = true | ) | const | 
Generates a convex hull that encloses the trimesh.
| [in] | optimize | (Optional) Whether to discard vertices that are not used in the convex hull. | 
| const TriMesh< S >::Normals & dart::math::TriMesh< S >::getTriangleNormals | ( | ) | const | 
Returns the triangle normals of the mesh.
| const TriMesh< S >::Triangles & dart::math::TriMesh< S >::getTriangles | ( | ) | const | 
Returns the triangles of the mesh.
| 
 | inherited | 
Returns the vertex normals of the mesh.
| 
 | inherited | 
Returns the vertices of the mesh.
| bool dart::math::TriMesh< S >::hasTriangleNormals | ( | ) | const | 
Returns true if the mesh contains triangle normals.
| bool dart::math::TriMesh< S >::hasTriangles | ( | ) | const | 
Returns true if the mesh contains triangles.
| 
 | inherited | 
Returns true if the mesh contains vertex normals.
| 
 | inherited | 
Returns true if the mesh contains vertices.
| 
 | inherited | 
Returns true if the mesh has no vertices.
| 
 | protected | 
Normalizes triangle normals.
| 
 | protectedinherited | 
Normalizes the vertex normals.
| 
 | inherited | 
Addition operator.
| TriMesh< S > dart::math::TriMesh< S >::operator+ | ( | const TriMesh< S_ > & | other | ) | const | 
Addition operator.
| 
 | inherited | 
Addition assignment operator.
| TriMesh< S > & dart::math::TriMesh< S >::operator+= | ( | const TriMesh< S_ > & | other | ) | 
Addition assignment operator.
| void dart::math::TriMesh< S >::setTriangles | ( | const Vertices & | vertices, | 
| const Triangles & | triangles | ||
| ) | 
Sets vertices and triangles.
| 
 | inherited | 
Translates the mesh vertices by adding translation to the vertices. 
| 
 | protected | 
Triangle normals of the mesh.
| 
 | protected | 
Triangle indices of the mesh.
| 
 | protectedinherited | 
Vertex normals of the mesh.
| 
 | protectedinherited | 
Vertices of the mesh.