Drake
Drake C++ Documentation
MeshcatCone Class Referencefinal

Detailed Description

Definition of a cone.

Its point is at the origin, its height extends in the direction of the frame's +z axis. Or, more formally: a finite section of a Lorentz cone (aka "second-order cone"), defined by

 sqrt(x²/a² + y²/b²) ≤ z;  z ∈ [0, height],

where a and b are the lengths of the principal semi-axes of the horizontal section at z=height().

This shape is currently only supported by Meshcat. It will not appear in any renderings, proximity queries, or other visualizers.

#include <drake/geometry/shape_specification.h>

Public Member Functions

 MeshcatCone (double height, double a=1.0, double b=1.0)
 Constructs the parameterized cone. More...
 
 MeshcatCone (const Vector3< double > &measures)
 Constructs a cone with a vector of measures: height and principal semi-axes. More...
 
double height () const
 
double a () const
 
double b () const
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 MeshcatCone (const MeshcatCone &)=default
 
MeshcatConeoperator= (const MeshcatCone &)=default
 
 MeshcatCone (MeshcatCone &&)=default
 
MeshcatConeoperator= (MeshcatCone &&)=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

◆ MeshcatCone() [1/4]

MeshcatCone ( const MeshcatCone )
default

◆ MeshcatCone() [2/4]

MeshcatCone ( MeshcatCone &&  )
default

◆ MeshcatCone() [3/4]

MeshcatCone ( double  height,
double  a = 1.0,
double  b = 1.0 
)
explicit

Constructs the parameterized cone.

Exceptions
std::exceptionif height, a, or b are not strictly positive.

◆ MeshcatCone() [4/4]

MeshcatCone ( const Vector3< double > &  measures)
explicit

Constructs a cone with a vector of measures: height and principal semi-axes.

Exceptions
std::exceptionif the measures are not strictly positive.

Member Function Documentation

◆ a()

double a ( ) const

◆ b()

double b ( ) const

◆ height()

double height ( ) const

◆ operator=() [1/2]

MeshcatCone& operator= ( const MeshcatCone )
default

◆ operator=() [2/2]

MeshcatCone& operator= ( MeshcatCone &&  )
default

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