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/height; 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. | |
| MeshcatCone (const Vector3< double > &measures) | |
| Constructs a cone with a vector of measures: height and principal semi-axes. | |
| ~MeshcatCone () final | |
| 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 |
| 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< Shape > | Clone () 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. | |
| Shape & | operator= (const Shape &)=default |
| (Internal use only) For derived classes. | |
| Shape (Shape &&)=default | |
| (Internal use only) For derived classes. | |
| Shape & | operator= (Shape &&)=default |
| (Internal use only) For derived classes. | |
|
default |
|
default |
|
explicit |
Constructs the parameterized cone.
| std::exception | if any measure is not finite positive. |
|
explicit |
Constructs a cone with a vector of measures: height and principal semi-axes.
| std::exception | if any measure is not finite positive. |
|
final |
| double a | ( | ) | const |
| double b | ( | ) | const |
| double height | ( | ) | const |
|
default |
|
default |