17#ifndef AGXCOLLIDE_LINE_H
18#define AGXCOLLIDE_LINE_H
166 const agx::Vec3 p0 = firstPoint * transform;
167 const agx::Vec3 p1 = secondPoint * transform;
#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.
The geometry representation used by the collision detection engine.
A line shape for intersection tests, mostly for depth sensing and picking.
agx::Vec3 getFirstPoint() const
Returns the first point, in local coordinates.
static BoundingAABB calculateBound(const agx::AffineMatrix4x4 &transform, const agx::Vec3 &firstPoint, const agx::Vec3 &secondPoint)
Calculate a bounding volume for line shape from parameters.
Line(const agx::Vec3 p1, const agx::Vec3 p2)
Constructor.
virtual agx::Real getVolume() const override
Volume of line-shape, will return 0.0 for line objects.
void set(const agx::Vec3 &p1, const agx::Vec3 &p2)
Set first and second point, in local coordinates.
void setFirstPoint(const agx::Vec3 &p)
Set first point (start point), in local coordinates.
virtual const BoundingAABB & updateBoundingVolume() override
Update the bounding volume for shape.
virtual agx::Vec3 getSupportPoint(const agx::Vec3 &supportDirection) const override
Gets support point.
virtual bool hasSupportFunction() const override
Checks if line shape has support function, will return true for line object.
virtual BoundingAABB calculateLocalBound() const override
Calculate a local bounding volume for shape.
agx::Vec3 getSecondPoint() const
Returns the second point, in local coordinates.
void setSecondPoint(const agx::Vec3 &p)
Set second point (end point), in local coordinates.
agx::Physics::Geometry::LinePtr getEntity() const
virtual agx::SPDMatrix3x3 calculateInertia(agx::Real mass) const override
Calculate inertia for line shape, will return identity matrix for line object.
agx::Physics::Geometry::ShapeRef m_entity
Pointer to a entity instance of type Physics.Geometry.Line.
AGXPHYSICS_EXPORT agx::Line & line()
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.
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.