29 #ifndef CDPL_VIS_TRIANGLEMESH3D_HPP
30 #define CDPL_VIS_TRIANGLEMESH3D_HPP
140 void addFace(
unsigned long v1_idx,
unsigned long v2_idx,
unsigned long v3_idx);
Definition of class CDPL::Vis::Shape3D.
Definition of class CDPL::Math::VectorArray.
Definition of the preprocessor macro CDPL_VIS_API.
#define CDPL_VIS_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
The base of all Vis::Shape3D visitor implementations [VPTN].
Definition: Shape3DVisitor.hpp:49
The abstract base of all classes describing the geometric shape of 3D objects.
Definition: Shape3D.hpp:50
std::shared_ptr< Shape3D > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Shape3D instances.
Definition: Shape3D.hpp:56
Data structure for the storage of 3D triangle mesh vertices, vertex normals and faces.
Definition: TriangleMesh3D.hpp:50
void addVertex(double x, double y, double z)
Appends a new vertex at the position (x, y, z).
std::shared_ptr< TriangleMesh3D > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated TriangleMesh3D instances.
Definition: TriangleMesh3D.hpp:56
void accept(Shape3DVisitor &visitor) const
Accepts the Vis::Shape3DVisitor instance visitor by dispatching to its visitTriangleMesh() method [VP...
const Math::Vector3DArray & getVertices() const
Returns a const reference to the array storing the mesh vertices.
std::size_t getNumVertexNormals() const
Returns the number of stored vertex normals.
std::size_t getNumVertices() const
Returns the number of stored vertices.
bool isClosed() const
Tells whether the mesh has been flagged as a closed surface.
Shape3D::SharedPointer clone() const
Creates a dynamically allocated copy of the triangle mesh.
Math::Vector3ULArray & getFaces()
Returns a non-const reference to the array storing the triangle faces.
Math::Vector3DArray & getVertices()
Returns a non-const reference to the array storing the mesh vertices.
std::size_t getNumFaces() const
Returns the number of stored triangle faces.
TriangleMesh3D & operator+=(const TriangleMesh3D &mesh)
Appends the vertices, vertex normals and (vertex index corrected) faces of mesh to this mesh.
Math::Vector3DArray & getVertexNormals()
Returns a non-const reference to the array storing the per-vertex normals.
const Math::Vector3ULArray & getFaces() const
Returns a const reference to the array storing the triangle faces.
const Math::Vector3DArray & getVertexNormals() const
Returns a const reference to the array storing the per-vertex normals.
void addFace(unsigned long v1_idx, unsigned long v2_idx, unsigned long v3_idx)
Appends a new triangle face defined by the three vertex indices v1_idx, v2_idx and v3_idx.
void setClosed(bool closed=true)
Sets the flag that marks the mesh as a closed surface.
void addVertexNormal(double x, double y, double z)
Appends a new vertex normal with the components (x, y, z).
void clear()
Removes all vertices, vertex normals and faces and resets the closed-surface flag.
void swap(TriangleMesh3D &mesh)
Swaps the vertices, vertex normals and faces of this mesh with those of mesh.
VectorArray< Vector3D > Vector3DArray
Array storing vectors of type Math::Vector3D.
Definition: VectorArray.hpp:87
VectorArray< Vector3UL > Vector3ULArray
Array storing vectors of type Math::Vector3UL.
Definition: VectorArray.hpp:107
The namespace of the Chemical Data Processing Library.