33#ifndef DART_MATH_TRIMESH_HPP_
34#define DART_MATH_TRIMESH_HPP_
83 void clear()
override;
Base class for meshes.
Definition Mesh.hpp:46
Eigen::Matrix< S, 3, 1 > Vector3
Definition Mesh.hpp:51
std::vector< Vector3 > Normals
Definition Mesh.hpp:53
std::size_t Index
Definition Mesh.hpp:50
std::vector< Vector3 > Vertices
Definition Mesh.hpp:52
This class represents triangle meshes.
Definition TriMesh.hpp:46
std::vector< Triangle > Triangles
Definition TriMesh.hpp:56
TriMesh & operator+=(const TriMesh &other)
Addition assignment operator.
Definition TriMesh-impl.hpp:128
void clear() override
Clears all the data in the trimesh.
Definition TriMesh-impl.hpp:112
const Triangles & getTriangles() const
Returns the triangles of the mesh.
Definition TriMesh-impl.hpp:98
TriMesh operator+(const TriMesh &other) const
Addition operator.
Definition TriMesh-impl.hpp:121
void computeTriangleNormals()
Computes triangle normals.
Definition TriMesh-impl.hpp:179
typename Base::Index Index
Definition TriMesh.hpp:51
void normalizeTriangleNormals()
Normalizes triangle normals.
Definition TriMesh-impl.hpp:198
Triangles mTriangles
Triangle indices of the mesh.
Definition TriMesh.hpp:105
void setTriangles(const Vertices &vertices, const Triangles &triangles)
Sets vertices and triangles.
Definition TriMesh-impl.hpp:53
const Normals & getTriangleNormals() const
Returns the triangle normals of the mesh.
Definition TriMesh-impl.hpp:105
typename Base::Vertices Vertices
Definition TriMesh.hpp:54
bool hasTriangles() const
Returns true if the mesh contains triangles.
Definition TriMesh-impl.hpp:84
std::shared_ptr< TriMesh< S > > generateConvexHull(bool optimize=true) const
Generates a convex hull that encloses the trimesh.
Definition TriMesh-impl.hpp:164
typename Base::Normals Normals
Definition TriMesh.hpp:55
S_ S
Definition TriMesh.hpp:49
TriMesh()
Default constructor.
Definition TriMesh-impl.hpp:46
Normals mTriangleNormals
Triangle normals of the mesh.
Definition TriMesh.hpp:108
bool hasTriangleNormals() const
Returns true if the mesh contains triangle normals.
Definition TriMesh-impl.hpp:91
void computeVertexNormals()
Computes vertex normals.
Definition TriMesh-impl.hpp:64
typename Base::Vector3 Vector3
Definition TriMesh.hpp:52
Eigen::Matrix< Index, 3, 1 > Triangle
Definition TriMesh.hpp:53
~TriMesh() override=default
Destructor.
Definition BulletCollisionDetector.cpp:60