16 #ifndef SURGSIM_MATH_SHAPE_H 17 #define SURGSIM_MATH_SHAPE_H 19 #include "SurgSim/Framework/Accessible.h" 20 #include "SurgSim/Framework/ObjectFactory.h" 24 #include "SurgSim/Math/Aabb.h" 25 #include "SurgSim/DataStructures/OptionalValue.h" 37 SHAPE_DIRECTION_AXIS_X = 0,
38 SHAPE_DIRECTION_AXIS_Y = 1,
39 SHAPE_DIRECTION_AXIS_Z = 2
50 SHAPE_TYPE_DOUBLESIDEDPLANE,
56 SHAPE_TYPE_SURFACEMESH,
57 SHAPE_TYPE_SEGMENTMESH,
58 SHAPE_TYPE_COMPOUNDSHAPE,
68 typedef ::SurgSim::Math::Vector3d Vector3d;
69 typedef ::SurgSim::Math::Matrix33d Matrix33d;
78 virtual int getType()
const = 0;
117 virtual bool isValid()
const = 0;
132 pose = Math::RigidTransform3d::Identity();
140 const T& getShape()
const 161 this->first = posedShapeFirst;
162 this->second = posedShapeSecond;
167 this->first.invalidate();
168 this->second.invalidate();
175 #endif // SURGSIM_MATH_SHAPE_H virtual double getVolume() const =0
Get the volume of the shape.
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
virtual Vector3d getCenter() const =0
Get the volumetric center of the shape.
Shape()
Constructor.
Definition: Shape.cpp:26
virtual std::string getClassName() const
Get class name.
Definition: Shape.cpp:51
virtual bool isTransformable() const
Definition: Shape.cpp:35
virtual ~Shape()
Destructor.
Definition: Shape.cpp:31
virtual void setPose(const RigidTransform3d &pose)
Set the pose on a transformable shape.
Definition: Shape.cpp:46
virtual Matrix33d getSecondMomentOfVolume() const =0
Get the second central moment of the volume, commonly used to calculate the moment of inertia matrix...
virtual int getType() const =0
Definitions of small fixed-size square matrix types.
PosedShape is a transformed shape with a record of the pose used to transform it. ...
Definition: Shape.h:128
Definitions of small fixed-size vector types.
virtual void updateShapePartial()
Update some of the internals of a transformable shape.
Definition: Shape.cpp:68
PosedShapeMotion is embedding the motion of a PosedShape, providing a posed shape at 2 different inst...
Definition: Shape.h:156
Mixin class for enabling a property system on OSS classes, the instance still needs to initialize pro...
Definition: Accessible.h:37
CRTP Base class to implement Object Factory functionality on a base class, use this rather than writi...
Definition: ObjectFactory.h:122
virtual void updateShape()
Update the internals of a transformable shape.
Definition: Shape.cpp:64
virtual std::shared_ptr< Shape > getTransformed(const RigidTransform3d &pose) const
Get a copy of this shape with an applied rigid transform.
Definition: Shape.cpp:40
virtual bool isValid() const =0
Check if the shape is valid.
virtual const Math::Aabbd & getBoundingBox() const
Definition: Shape.cpp:59
Generic rigid shape class defining a shape.
Definition: Shape.h:65