Definition of a general (possibly non-convex) triangular surface mesh.
Meshes can be used for illustration and perception roles, but have limited proximity support. See the documentation of QueryObject's proximity queries to see how meshes are used in each type of proximity query.
The mesh is defined in a canonical frame C, implicit in the file parsed. Upon loading it in SceneGraph it can be scaled around the origin of C by a given scale
amount.
#include <drake/geometry/shape_specification.h>
Public Member Functions | |
Mesh (const std::string &absolute_filename, double scale=1.0) | |
Constructs a mesh specification from the mesh file located at the given absolute file path. More... | |
const std::string & | filename () const |
double | scale () const |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
Mesh (const Mesh &)=default | |
Mesh & | operator= (const Mesh &)=default |
Mesh (Mesh &&)=default | |
Mesh & | operator= (Mesh &&)=default |
![]() | |
virtual | ~Shape () |
void | Reify (ShapeReifier *reifier, void *user_data=nullptr) const |
Causes this description to be reified in the given reifier . More... | |
std::unique_ptr< Shape > | Clone () const |
Creates a unique copy of this shape. More... | |
Additional Inherited Members | |
![]() | |
template<typename S > | |
Shape (ShapeTag< S > tag) | |
Constructor available for derived class construction. More... | |
Shape (const Shape &)=default | |
Shape & | operator= (const Shape &)=default |
Shape (Shape &&)=default | |
Shape & | operator= (Shape &&)=default |
|
explicit |
Constructs a mesh specification from the mesh file located at the given absolute file path.
Optionally uniformly scaled by the given scale factor.
std::exception | if |scale| < 1e-8. Note that a negative scale is considered valid. We want to preclude scales near zero but recognise that scale is a convenience tool for "tweaking" models. 8 orders of magnitude should be plenty without considering revisiting the model itself. |
const std::string& filename | ( | ) | const |
double scale | ( | ) | const |