254 if ( m_rb ==
nullptr )
260 xAxis.
x(), xAxis.y(), xAxis.z(),
268 agx::ref_ptr<T> constraint =
new T( m_rb, wheelFrame, other, otherFrame );
269 addConstraint( name, constraint );
#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 AGXVEHICLE_EXPORT
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Abstraction of a wheel of arbitrary geometry.
agx::Constraint * getConstraint() const
agx::Constraint * getConstraint(const agx::Name &name) const
virtual ~Wheel()
Reference counted object - protected destructor.
WheelTangentData tangentFrom(const agx::Vec3 &point, agx::Real offsetFromSurface=0.0, agx::Real wrapSign=-1.0) const
Calculates tangent from the given world point to wheel.
WheelTangentData tangentTo(const Wheel &other, agx::Real offsetFromSurface=0.0, agx::Real wrapSign=-1.0) const
static agx::AffineMatrix4x4 findRelativeTransform(const agx::RigidBody *wheelBody, const agx::Hinge *hinge, agx::Real sign=1.0)
Calculates a transformation such that, when applied to a wheel with the given rigid body,...
agx::Vec3 getCenterPosition() const
agx::RigidBody * getRigidBody() const
agx::Hinge * attachHinge(const agx::Name &name, agx::RigidBody *other, agx::Real wheelCenterOffset)
Specialized version of attachConstraint to create a hinge with this wheel body and other.
Wheel(agx::Real radius, agx::RigidBody *rb, agx::Frame *rbRelFrame=nullptr)
Construct wheel given radius, wheel body and frame defining wheel center, up and rotation axes in the...
agx::Frame * getLocalFrame() const
static agx::AffineMatrix4x4 findRelativeTransform(const agx::RigidBody *wheelBody, const agx::Vec3 &rotationAxis)
Calculates a transformation such that, when applied to a wheel with the given rigid body,...
agx::Plane getRotationAxisPlane() const
agx::Real getRadius() const
Wheel()
Default constructor used only when this object is restored.
agx::Vec3 getRotationAxis() const
const ConstraintContainer & getConstraints() const
agx::Vec3 getUpAxis() const
agx::AffineMatrix4x4 getTransform() const
agx::ref_ptr< T > attachConstraint(const agx::Name &name, agx::RigidBody *other, agx::Real wheelCenterOffset)
Create constraint with this wheel and some other rigid body.
WheelTangentData tangentTo(const agx::Vec3 &point, agx::Real offsetFromSurface=0.0, agx::Real wrapSign=-1.0) const
Calculates tangent from this wheel to a world point.
Wheel(agx::Real radius, agx::RigidBody *rb, agx::AffineMatrix4x4 rbRelTransform)
Construct wheel given radius, wheel body and transform defining wheel center, up and rotation axes in...
AffineMatrix4x4T< T > inverse() const
Quick inverse, transpose rotation part, and change sign of translation part.
The base class for a constraint.
The object defining a frame of reference and providing transformations operations.
The hinge constraint between two rigid bodies or one rigid body and the world.
Representation of a name string.
Specialized types of matrices for holding orthogonal transformation matrices.
Class representing the mathematical concept of a plane, also called a half- space.
Base class providing referencing counted objects.
The rigid body class, combining a geometric model and a frame of reference.
const agx::AffineMatrix4x4 & getTransform() const
Current model frame transform, given in world coordinate frame.
Smart pointer for handling referenced counted objects.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
This namespace contains classes related to vehicles dynamics.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AffineMatrix4x4T< Real > AffineMatrix4x4
Data for an external tangent between two wheels.