![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Pre-defined triangle mesh providing the vertices and faces of a torus. More...
#include <TorusMesh3D.hpp>
Inheritance diagram for CDPL::Vis::TorusMesh3D:Public Types | |
| typedef std::shared_ptr< TorusMesh3D > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated TorusMesh3D instances. More... | |
Public Types inherited from CDPL::Vis::TriangleMesh3D | |
| typedef std::shared_ptr< TriangleMesh3D > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated TriangleMesh3D instances. More... | |
Public Types inherited from CDPL::Vis::Shape3D | |
| typedef std::shared_ptr< Shape3D > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated Shape3D instances. More... | |
Public Member Functions | |
| TorusMesh3D (double radius1, double radius2, std::size_t num_sect1, std::size_t num_sect2, double start_angle=0.0, double first_sect_size=0.0) | |
| Constructs a torus triangle mesh with the specified ring radius, tube radius, ring/tube subdivision counts and optional tube start angle/first section sizing. More... | |
Public Member Functions inherited from CDPL::Vis::TriangleMesh3D | |
| Shape3D::SharedPointer | clone () const |
| Creates a dynamically allocated copy of the triangle mesh. More... | |
| void | accept (Shape3DVisitor &visitor) const |
| Accepts the Vis::Shape3DVisitor instance visitor by dispatching to its visitTriangleMesh() method [VPTN]. More... | |
| Math::Vector3DArray & | getVertices () |
Returns a non-const reference to the array storing the mesh vertices. More... | |
| const Math::Vector3DArray & | getVertices () const |
Returns a const reference to the array storing the mesh vertices. More... | |
| void | addVertex (double x, double y, double z) |
| Appends a new vertex at the position (x, y, z). More... | |
| std::size_t | getNumVertices () const |
| Returns the number of stored vertices. More... | |
| Math::Vector3DArray & | getVertexNormals () |
Returns a non-const reference to the array storing the per-vertex normals. More... | |
| const Math::Vector3DArray & | getVertexNormals () const |
Returns a const reference to the array storing the per-vertex normals. More... | |
| void | addVertexNormal (double x, double y, double z) |
| Appends a new vertex normal with the components (x, y, z). More... | |
| std::size_t | getNumVertexNormals () const |
| Returns the number of stored vertex normals. More... | |
| Math::Vector3ULArray & | getFaces () |
Returns a non-const reference to the array storing the triangle faces. More... | |
| const Math::Vector3ULArray & | getFaces () const |
Returns a const reference to the array storing the triangle faces. More... | |
| 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. More... | |
| std::size_t | getNumFaces () const |
| Returns the number of stored triangle faces. More... | |
| bool | isClosed () const |
| Tells whether the mesh has been flagged as a closed surface. More... | |
| void | setClosed (bool closed=true) |
| Sets the flag that marks the mesh as a closed surface. More... | |
| void | clear () |
| Removes all vertices, vertex normals and faces and resets the closed-surface flag. More... | |
| void | swap (TriangleMesh3D &mesh) |
| Swaps the vertices, vertex normals and faces of this mesh with those of mesh. More... | |
| TriangleMesh3D & | operator+= (const TriangleMesh3D &mesh) |
| Appends the vertices, vertex normals and (vertex index corrected) faces of mesh to this mesh. More... | |
Public Member Functions inherited from CDPL::Vis::Shape3D | |
| virtual | ~Shape3D () |
| Virtual destructor. More... | |
Pre-defined triangle mesh providing the vertices and faces of a torus.
| typedef std::shared_ptr<TorusMesh3D> CDPL::Vis::TorusMesh3D::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated TorusMesh3D instances.
| CDPL::Vis::TorusMesh3D::TorusMesh3D | ( | double | radius1, |
| double | radius2, | ||
| std::size_t | num_sect1, | ||
| std::size_t | num_sect2, | ||
| double | start_angle = 0.0, |
||
| double | first_sect_size = 0.0 |
||
| ) |
Constructs a torus triangle mesh with the specified ring radius, tube radius, ring/tube subdivision counts and optional tube start angle/first section sizing.
| radius1 | The radius of the torus ring (distance from the torus center to the tube center). |
| radius2 | The radius of the tube. |
| num_sect1 | The number of sections subdividing the torus ring (must be > 2). |
| num_sect2 | The number of sections subdividing the tube (must be > 2). |
| start_angle | The angle (in radians) at which the first tube section starts. |
| first_sect_size | The angular size (in radians) of the first tube section (0 to use a uniform section size). |