Drake
Mesh Class Referencefinal

Detailed Description

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
 
Meshoperator= (const Mesh &)=default
 
 Mesh (Mesh &&)=default
 
Meshoperator= (Mesh &&)=default
 
- Public Member Functions inherited from Shape
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< ShapeClone () const
 Creates a unique copy of this shape. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Shape
template<typename S >
 Shape (ShapeTag< S > tag)
 Constructor available for derived class construction. More...
 
 Shape (const Shape &)=default
 
Shapeoperator= (const Shape &)=default
 
 Shape (Shape &&)=default
 
Shapeoperator= (Shape &&)=default
 

Constructor & Destructor Documentation

◆ Mesh() [1/3]

Mesh ( const Mesh )
default

◆ Mesh() [2/3]

Mesh ( Mesh &&  )
default

◆ Mesh() [3/3]

Mesh ( const std::string &  absolute_filename,
double  scale = 1.0 
)
explicit

Constructs a mesh specification from the mesh file located at the given absolute file path.

Optionally uniformly scaled by the given scale factor.

Exceptions
std::exceptionif |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.

Member Function Documentation

◆ filename()

const std::string& filename ( ) const

◆ operator=() [1/2]

Mesh& operator= ( Mesh &&  )
default

◆ operator=() [2/2]

Mesh& operator= ( const Mesh )
default

◆ scale()

double scale ( ) const

The documentation for this class was generated from the following file: