Drake
Convex Class Referencefinal

## Detailed Description

Definition of a convex surface mesh.

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

Convex (const std::string &absolute_filename, double scale=1.0)
Constructs a convex shape specification from the file located at the given absolute file path. More...

const std::string & filename () const

double scale () const

Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
Convex (const Convex &)=default

Convexoperator= (const Convex &)=default

Convex (Convex &&)=default

Convexoperator= (Convex &&)=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

## ◆ Convex() [1/3]

 Convex ( const Convex & )
default

## ◆ Convex() [2/3]

 Convex ( Convex && )
default

## ◆ Convex() [3/3]

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

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

Optionally uniformly scaled by the given scale factor.

Parameters
 absolute_filename The file name with absolute path. We only support an .obj file with only one polyhedron. We assume that the polyhedron is convex. scale An optional scale to coordinates.
Exceptions
 std::exception if the .obj file doesn't define a single object. This can happen if it is empty, if there are multiple object-name statements (e.g., "o object_name"), or if there are faces defined outside a single object-name statement. 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.

## ◆ filename()

 const std::string& filename ( ) const

## ◆ operator=() [1/2]

 Convex& operator= ( Convex && )
default

## ◆ operator=() [2/2]

 Convex& operator= ( const Convex & )
default

## ◆ scale()

 double scale ( ) const

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