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

Detailed Description

Definition of an ellipsoid.

It is centered on the origin of its canonical frame with its dimensions aligned with the frame's axes. The standard equation for the ellipsoid is:

     x²/a² + y²/b² + z²/c² = 1,

where a,b,c are the lengths of the principal semi-axes of the ellipsoid. The bounding box of the ellipsoid is [-a,a]x[-b,b]x[-c,c].

#include <drake/geometry/shape_specification.h>

Public Member Functions

 Ellipsoid (double a, double b, double c)
 Constructs an ellipsoid with the given lengths of its principal semi-axes, with a, b, and c measured along the x-, y-, and z- axes of the canonical frame, respectively.
 Ellipsoid (const Vector3< double > &measures)
 Constructs an ellipsoid with a vector of measures: the lengths of its principal semi-axes, with a, b, and c measured along the x-, y-, and z- axes of the canonical frame, respectively.
 ~Ellipsoid () final
double a () const
double b () const
double c () const
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 Ellipsoid (const Ellipsoid &)=default
Ellipsoidoperator= (const Ellipsoid &)=default
 Ellipsoid (Ellipsoid &&)=default
Ellipsoidoperator= (Ellipsoid &&)=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

◆ Ellipsoid() [1/4]

Ellipsoid ( const Ellipsoid & )
default

◆ Ellipsoid() [2/4]

Ellipsoid ( Ellipsoid && )
default

◆ Ellipsoid() [3/4]

Ellipsoid ( double a,
double b,
double c )

Constructs an ellipsoid with the given lengths of its principal semi-axes, with a, b, and c measured along the x-, y-, and z- axes of the canonical frame, respectively.

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

◆ Ellipsoid() [4/4]

Ellipsoid ( const Vector3< double > & measures)
explicit

Constructs an ellipsoid with a vector of measures: the lengths of its principal semi-axes, with a, b, and c measured along the x-, y-, and z- axes of the canonical frame, respectively.

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

◆ ~Ellipsoid()

~Ellipsoid ( )
final

Member Function Documentation

◆ a()

double a ( ) const

◆ b()

double b ( ) const

◆ c()

double c ( ) const

◆ operator=() [1/2]

Ellipsoid & operator= ( const Ellipsoid & )
default

◆ operator=() [2/2]

Ellipsoid & operator= ( Ellipsoid && )
default

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