![]() |
RobWorkProject
23.9.11-
|
A CSG (Constructive Solid Geometry) model representation. More...
#include <CSGModel.hpp>
Public Types | |
| typedef rw::core::Ptr< CSGModel > | Ptr |
| Smart pointer type for CSGModel. | |
Public Member Functions | |
| CSGModel () | |
| Constructor. | |
| virtual | ~CSGModel () |
| Destructor. | |
| CSGModel (const CSGModel &csgmodel) | |
| Copy constructor. More... | |
| CSGModel (const rw::geometry::TriMesh &trimesh) | |
| Constructs CSGModel from TriMesh. | |
| void | translate (float x, float y, float z) |
| Translates the model. | |
| void | rotate (float r, float p, float y) |
| Rotates the model. | |
| void | transform (const rw::math::Transform3D<> &T) |
| Applies RobWork transformation to the model. | |
| void | add (CSGModel::Ptr model) |
| Adds a volume. | |
| void | subtract (CSGModel::Ptr model) |
| Subtracts a volume. | |
| void | intersect (CSGModel::Ptr model) |
| Intersects volumes. | |
| rw::geometry::TriMesh::Ptr | getTriMesh () |
| Returns RobWork geometry representation. | |
| void | saveToStl (const std::string &filename) |
| Saves the CSGModel in Stl format. | |
Protected Member Functions | |
| void | _convertToTriMesh () |
| Converts internal csgjs geometry representation to TriMesh. | |
Protected Attributes | |
| bool | _needsConversion |
| rw::core::Ptr< csgjs_model > | _model |
| rw::geometry::TriMesh::Ptr | _mesh |
A CSG (Constructive Solid Geometry) model representation.
Defines operators to perform addition, difference, and intersection operations on solids, as well as utility functions to construct geometry based on primitives, translate and rotate models, and convert them to and from RobWork represntations.
Copy constructor.
| csgmodel | [in] other CSGModel to copy. |