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 principle 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... | |
double | height () const |
double | a () const |
double | b () const |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
MeshcatCone (const MeshcatCone &)=default | |
MeshcatCone & | operator= (const MeshcatCone &)=default |
MeshcatCone (MeshcatCone &&)=default | |
MeshcatCone & | operator= (MeshcatCone &&)=default |
![]() | |
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< Shape > | Clone () const |
Creates a unique copy of this shape. More... | |
Additional Inherited Members | |
![]() | |
template<typename S > | |
Shape (ShapeTag< S > tag) | |
Constructor available for derived class construction. More... | |
Shape (const Shape &)=default | |
Shape & | operator= (const Shape &)=default |
Shape (Shape &&)=default | |
Shape & | operator= (Shape &&)=default |
|
default |
|
default |
|
explicit |
Constructs the parameterized cone.
std::exception | if height , a , or b are not strictly positive. |
double a | ( | ) | const |
double b | ( | ) | const |
double height | ( | ) | const |
|
default |
|
default |