Go to the documentation of this file.
16 #ifndef SURGSIM_MATH_BOXSHAPE_H
17 #define SURGSIM_MATH_BOXSHAPE_H
29 SURGSIM_STATIC_REGISTRATION(BoxShape);
38 explicit BoxShape(
double sizeX = 0.0,
double sizeY = 0.0,
double sizeZ = 0.0);
119 #endif // SURGSIM_MATH_BOXSHAPE_H
void calculateVertices()
Function that calculates the box vertices.
Definition: BoxShape.cpp:111
BoxShape(double sizeX=0.0, double sizeY=0.0, double sizeZ=0.0)
Constructor.
Definition: BoxShape.cpp:24
const std::array< Vector3d, 8 > & getVertices() const
Function that returns the local vertices' location.
Definition: BoxShape.cpp:106
double getSizeX() const
Get size in X direction.
Definition: BoxShape.cpp:45
::SurgSim::Math::Matrix33d Matrix33d
Definition: Shape.h:69
SURGSIM_CLASSNAME(SurgSim::Math::BoxShape)
bool isValid() const override
Definition: BoxShape.cpp:137
int getType() const override
Definition: BoxShape.cpp:35
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:57
Definition: CompoundShapeToGraphics.cpp:29
Vector3d m_size
The box sizes along the 3 axis respectively {X,Y,Z}.
Definition: BoxShape.h:109
double getSizeZ() const
Get size in Z direction.
Definition: BoxShape.cpp:55
void setSizeX(double sizeX)
Set size in X direction.
Definition: BoxShape.cpp:60
std::array< Vector3d, 8 > m_vertices
The box vertices.
Definition: BoxShape.h:112
void updateAabb()
Update the local aabb for this box.
Definition: BoxShape.cpp:130
void setSizeZ(double sizeZ)
Set size in Z direction.
Definition: BoxShape.cpp:72
Vector3d getSize() const
Get size of the box.
Definition: BoxShape.cpp:40
Generic rigid shape class defining a shape.
Definition: Shape.h:65
double getSizeY() const
Get size in Y direction.
Definition: BoxShape.cpp:50
Vector3d getCenter() const override
Get the volumetric center of the shape.
Definition: BoxShape.cpp:83
Matrix33d getSecondMomentOfVolume() const override
Get the second central moment of the volume, commonly used to calculate the moment of inertia matrix.
Definition: BoxShape.cpp:88
void setSizeY(double sizeY)
Set size in Y direction.
Definition: BoxShape.cpp:66
Vector3d getVertex(const int i) const
Function that returns the local vertex location, given an index.
Definition: BoxShape.cpp:101
Box shape: box centered on (0 0 0), aligned with the axis with different sizes along X,...
Definition: BoxShape.h:33
double getVolume() const override
Get the volume of the shape.
Definition: BoxShape.cpp:78