Easy3D 2.5.3
|
The base class of renderable 3D models. More...
#include <easy3d/core/model.h>
Public Member Functions | |
Model (const std::string &name="unknown") | |
Default constructor. The parameter name is optional, but it is useful for handling multiple models with the same viewer. | |
void | set_name (const std::string &n) |
Sets/Changes the name of a model. Assigning a name to a model is optional, but it is useful for handling multiple models with the same viewer. | |
const std::string & | name () const |
The name of a model. | |
const Box3 & | bounding_box (bool recompute=false) const |
The bounding box of the model. More... | |
void | invalidate_bounding_box () |
Invalidates the bounding box of the model. So when bounding_box() is called, the bounding box will be re-computed. This function is typically called when the geometry of a model is changed. | |
virtual std::vector< vec3 > & | points ()=0 |
The vertices of the model. More... | |
virtual const std::vector< vec3 > & | points () const =0 |
The vertices of the model. More... | |
bool | empty () const |
Tests if the model is empty. | |
virtual void | property_stats (std::ostream &output) const |
Prints the names of all properties to an output stream (e.g., std::cout). More... | |
void | set_renderer (Renderer *r) |
Sets the renderer of this model. More... | |
Renderer * | renderer () |
Gets the renderer of this model. | |
const Renderer * | renderer () const |
Gets the constant renderer of this model. | |
void | set_manipulator (Manipulator *manip) |
Attaches a manipulator to this model. More... | |
Manipulator * | manipulator () |
Gets the manipulator attached to this model. | |
const Manipulator * | manipulator () const |
Gets the manipulator attached to this model. | |
The base class of renderable 3D models.
A model can represent a SurfaceMesh, a PointCloud, or a Graph. A model can have multiple drawables, e.g., faces, vertices, edges.
const Box3 & bounding_box | ( | bool | recompute = false | ) | const |
The bounding box of the model.
recompute | If true , or if the bounding box is not known, it computes and returns the bounding box of the model. Otherwise, it returns the known bounding box. |
|
pure virtual |
The vertices of the model.
Implemented in Graph, PointCloud, PolyMesh, and SurfaceMesh.
|
pure virtual |
The vertices of the model.
Implemented in Graph, PointCloud, PolyMesh, and SurfaceMesh.
|
inlinevirtual |
Prints the names of all properties to an output stream (e.g., std::cout).
Reimplemented in Graph, PointCloud, PolyMesh, and SurfaceMesh.
|
inline |
Attaches a manipulator to this model.
|
inline |
Sets the renderer of this model.