|
SpatiumLib
|
Mesh object in a scene. More...
#include <Mesh.h>


Public Member Functions | |
| Mesh (const std::vector< geom3d::Point3 > &vertices, const std::vector< std::array< int, 2 >> &edges) | |
| Constructor. More... | |
| std::vector< geom3d::Point3 > | vertices () const |
| Get all vertices. More... | |
| geom3d::Point3 | vertex (size_t index) const |
| Get a vertex by index. More... | |
| std::vector< std::array< int, 2 > > | edges () const |
| Get all edges. More... | |
| std::array< int, 2 > | edge (size_t index) const |
| Get an edge by index. An edge is a tuple of two vertex indices (v1, v2). More... | |
Public Member Functions inherited from spatium::gfx3d::RenderObject | |
| RenderObject () | |
| std::array< double, 6 > | bounds () const |
| Get the boundaries of the object; axis aligned. Xmin, Xmax, Ymin, Ymax, Zmin, Zmax. More... | |
| void | setColor (const std::array< unsigned char, 3 > color) |
| Set the color. More... | |
| std::array< unsigned char, 3 > | color () const |
| Get the color. More... | |
Public Member Functions inherited from spatium::gfx3d::SceneObject | |
| SceneObject () | |
| Transform & | transform () |
| Get the transformation. More... | |
Static Public Member Functions | |
| static Mesh | cube (double diameter=1) |
| Construct a cube mesh. More... | |
Protected Member Functions | |
| void | updateBounds () override |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Mesh &mesh) |
| Output to ostream. More... | |
Additional Inherited Members | |
Protected Attributes inherited from spatium::gfx3d::RenderObject | |
| std::array< double, 6 > | m_bounds |
| std::array< unsigned char, 3 > | m_color |
| \TODO: use BoundingBox<double, 3> from namespace idx More... | |
Protected Attributes inherited from spatium::gfx3d::SceneObject | |
| Transform | m_transform |
Mesh object in a scene.
A mesh is a collection of vertices connected by edges.
|
inline |
Constructor.
| [in] | vertices | List of vertex coordinates |
| [in] | edges | List of edges. An edge is a tuple of two vertex indices (v1, v2). |
|
inlinestatic |
Construct a cube mesh.
| [in] | diameter | Diameter of the cube (width, height, length) |
|
inline |
Get an edge by index. An edge is a tuple of two vertex indices (v1, v2).
| [in] | index | Index of the edge |
|
inline |
Get all edges.
|
inlineoverrideprotectedvirtual |
Implements spatium::gfx3d::RenderObject.
|
inline |
Get a vertex by index.
| [in] | index | Index of the vertex |
|
inline |
Get all vertices.
|
friend |
Output to ostream.
1.8.15