Drake
Drake C++ Documentation
Loading...
Searching...
No Matches
Cylinder Class Referencefinal

Detailed Description

Definition of a cylinder.

It is centered in its canonical frame with the length of the cylinder parallel with the frame's z-axis.

#include <drake/geometry/shape_specification.h>

Public Member Functions

 Cylinder (double radius, double length)
 Constructs a cylinder with the given radius and length.
 Cylinder (const Vector2< double > &measures)
 Constructs a cylinder with a vector of measures: radius and length.
 ~Cylinder () final
double radius () const
double length () const
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 Cylinder (const Cylinder &)=default
Cylinderoperator= (const Cylinder &)=default
 Cylinder (Cylinder &&)=default
Cylinderoperator= (Cylinder &&)=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.
std::unique_ptr< ShapeClone () const
 Creates a unique copy of this shape.
std::string_view type_name () const
 Returns the (unqualified) type name of this Shape, e.g., "Box".
std::string to_string () const
 Returns a string representation of this shape.
template<typename ReturnType = void, typename Visitor>
decltype(auto) Visit (Visitor &&visitor) const
 Calls the given visitor function with *this as the sole argument, but with *this downcast to be the shape's concrete subclass.

Additional Inherited Members

Protected Types inherited from Shape
using VariantShapeConstPtr
 (Internal use only) All concrete subclasses, as const pointers.
Protected Member Functions inherited from Shape
 Shape ()
 (Internal use only) Constructor for use by derived classes.
 Shape (const Shape &)=default
 (Internal use only) For derived classes.
Shapeoperator= (const Shape &)=default
 (Internal use only) For derived classes.
 Shape (Shape &&)=default
 (Internal use only) For derived classes.
Shapeoperator= (Shape &&)=default
 (Internal use only) For derived classes.

Constructor & Destructor Documentation

◆ Cylinder() [1/4]

Cylinder ( const Cylinder & )
default

◆ Cylinder() [2/4]

Cylinder ( Cylinder && )
default

◆ Cylinder() [3/4]

Cylinder ( double radius,
double length )

Constructs a cylinder with the given radius and length.

Exceptions
std::exceptionif any measure is not finite positive.

◆ Cylinder() [4/4]

Cylinder ( const Vector2< double > & measures)
explicit

Constructs a cylinder with a vector of measures: radius and length.

Exceptions
std::exceptionif any measure is not finite positive.

◆ ~Cylinder()

~Cylinder ( )
final

Member Function Documentation

◆ length()

double length ( ) const

◆ operator=() [1/2]

Cylinder & operator= ( const Cylinder & )
default

◆ operator=() [2/2]

Cylinder & operator= ( Cylinder && )
default

◆ radius()

double radius ( ) const

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