Definition of a box.
The box is centered on the origin of its canonical frame with its dimensions aligned with the frame's axes. The size of the box is given by three sizes.
#include <drake/geometry/shape_specification.h>
|
| | Box (double width, double depth, double height) |
| | Constructs a box with the given width, depth, and height, which specify the box's dimension along the canonical x-, y-, and z-axes, respectively.
|
| | Box (const Vector3< double > &measures) |
| | Constructs a box with a vector of measures: width, depth, and height – the box's dimensions along the canonical x-, y-, and z-axes, respectively.
|
| | ~Box () final |
| double | width () const |
| | Returns the box's dimension along the x axis.
|
| double | depth () const |
| | Returns the box's dimension along the y axis.
|
| double | height () const |
| | Returns the box's dimension along the z axis.
|
| const Vector3< double > & | size () const |
| | Returns the box's dimensions.
|
| | Box (const Box &)=default |
| Box & | operator= (const Box &)=default |
| | Box (Box &&)=default |
| Box & | operator= (Box &&)=default |
| 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.
|
|
| static Box | MakeCube (double edge_size) |
| | Constructs a cube with the given edge_size for its width, depth, and height.
|
|
| using | VariantShapeConstPtr |
| | (Internal use only) All concrete subclasses, as const pointers.
|
| | 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.
|
◆ Box() [1/4]
◆ Box() [2/4]
◆ Box() [3/4]
| Box |
( |
double | width, |
|
|
double | depth, |
|
|
double | height ) |
Constructs a box with the given width, depth, and height, which specify the box's dimension along the canonical x-, y-, and z-axes, respectively.
- Exceptions
-
| std::exception | if any measure is not finite positive. |
◆ Box() [4/4]
| Box |
( |
const Vector3< double > & | measures | ) |
|
|
explicit |
Constructs a box with a vector of measures: width, depth, and height – the box's dimensions along the canonical x-, y-, and z-axes, respectively.
- Exceptions
-
| std::exception | if any measure is not finite positive. |
◆ ~Box()
◆ depth()
Returns the box's dimension along the y axis.
◆ height()
Returns the box's dimension along the z axis.
◆ MakeCube()
| Box MakeCube |
( |
double | edge_size | ) |
|
|
static |
Constructs a cube with the given edge_size for its width, depth, and height.
- Exceptions
-
| std::exception | if edge_size is not finite positive. |
◆ operator=() [1/2]
◆ operator=() [2/2]
| Box & operator= |
( |
const Box & | | ) |
|
|
default |
◆ size()
| const Vector3< double > & size |
( |
| ) |
const |
Returns the box's dimensions.
◆ width()
Returns the box's dimension along the x axis.
The documentation for this class was generated from the following file: