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

Detailed Description

Definition of sphere.

It is centered in its canonical frame with the given radius.

#include <drake/geometry/shape_specification.h>

Public Member Functions

 Sphere (double radius)
 Constructs a sphere with the given radius.
 ~Sphere () final
double radius () const
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 Sphere (const Sphere &)=default
Sphereoperator= (const Sphere &)=default
 Sphere (Sphere &&)=default
Sphereoperator= (Sphere &&)=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

◆ Sphere() [1/3]

Sphere ( const Sphere & )
default

◆ Sphere() [2/3]

Sphere ( Sphere && )
default

◆ Sphere() [3/3]

Sphere ( double radius)
explicit

Constructs a sphere with the given radius.

Exceptions
std::exceptionif radius is not finite non-negative. Note that a zero radius is considered valid.

◆ ~Sphere()

~Sphere ( )
final

Member Function Documentation

◆ operator=() [1/2]

Sphere & operator= ( const Sphere & )
default

◆ operator=() [2/2]

Sphere & operator= ( Sphere && )
default

◆ radius()

double radius ( ) const

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