17#ifndef AGXCOLLIDE_CAPSULE_H
18#define AGXCOLLIDE_CAPSULE_H
73 virtual bool hasSupportFunction()
const override;
87 agx::Physics::
Geometry::CapsulePtr getEntity() const;
109 return getEntity().height();
114 return getEntity().radius();
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
Axis aligned bounding box implementation.
Implements a Capsule shape for geometric intersection tests.
virtual agx::Real getVolume() const override
Return the volume of the shape.
virtual BoundingAABB calculateLocalBound() const override
Calculate the bounding volume in the local coordinate system.
void set(const agx::Real radius, const agx::Real height)
Set the radius and height of the capsule.
Capsule(const agx::Real radius=agx::Real(1), const agx::Real height=agx::Real(1))
Constructor.
void setHeight(const agx::Real height)
Set the height of the capsule.
void setRadius(const agx::Real radius)
Set the radius of the capsule.
virtual agx::Vec3 getSupportPoint(const agx::Vec3 &supportDirection) const override
Returns the support point on face of the shape.
virtual const BoundingAABB & updateBoundingVolume() override
Calculate the bounding volume based on the current Shape parameters including transformation.
virtual agx::SPDMatrix3x3 calculateInertia(agx::Real mass) const override
Calculate the inertia for the shape given a mass.
virtual Shape * clone() const override
Create a clone.
The geometry representation used by the collision detection engine.
Type
Define the type of a Shape.
Specialized type of matrices for holding symmetric positive definite matrices.
static Vec3T componentMax(const Vec3T &v1, const Vec3T &v2)
Creates a new vector where each component is the maximum of this and the other vector.
static Vec3T componentMin(const Vec3T &v1, const Vec3T &v2)
Creates a new vector where each component is the minimum of this and the other vector.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
This namespace consists of a set of classes for handling geometric intersection tests including boole...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.