17#ifndef AGX_CONSTRAINTANGLE_H
18#define AGX_CONSTRAINTANGLE_H
#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
Class for writing serialized data in binary format to a stream.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Abstract base class for storing/restoring a line/drums with version control.
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(agx::Angle)
virtual void storeLightData(agxStream::StorageStream &str) const override
Store structural independent data to stream.
Angle(agx::Angle::Axis axis, agx::Angle::Type type, agx::Real initialAngle=agx::Real(0))
Construct given axis and initial angle.
virtual const agx::Vec3 & getDir(const agx::AttachmentPair &ap, agx::UInt index) const
virtual void restore(agxStream::InputArchive &in) override
Restore given stream.
virtual ~Angle()
Reference counted object, protected destructor.
agx::Angle::Type getType() const
const agx::Real & getValue() const
virtual void transform(const agx::AttachmentPair &)
Transform method to update the value of this angle.
Type
Type, i.e., defines Axis as 'along' or 'about'.
@ TRANSLATIONAL
Axis is along U, V or N.
Axis
Axis this constraint angle is defined about or along.
agx::Angle::Axis getAxis() const
virtual void store(agxStream::OutputArchive &out) const override
Store given stream.
virtual void restoreLightData(agxStream::StorageStream &str) override
Restore structural independent data from stream.
Constraint attachment pair class.
Implementation of angle for the cone limit.
ConeLimitAngle(bool useRotAngle)
Constructor for cone limit angle.
virtual const Vec3 & getDir(const AttachmentPair &ap, agx::UInt index) const override
Get the direction along the cone limit or of the axis given the attachment pair, depending on the cas...
void setConeLimitRange(Vec2 limit)
Set the ConeLimit range, in radians.
ConeLimitAngle()
Default constructor.
Vec2 getConeLimitRange() const
Get the ConeLimit range, in radians.
virtual void transform(const AttachmentPair &ap) override
Transform method to update the values of this Angle.
Base class providing referencing counted objects.
Implementation of constraint angle ABOUT an axis.
virtual void storeLightData(agxStream::StorageStream &str) const override
Store structural independent data to stream.
virtual ~RotationalAngle()
Reference counted object, protected destructor.
RotationalAngle(agx::Angle::Axis axis, agx::Real initialAngle=agx::Real(0))
Construct given axis and initial angle.
void setWindingNumber(agx::Int windingNumber)
Use with caution since each values of windingNumber represent plus or minus 360 degrees of the joint ...
static agx::RotationalAngle * safeCast(const agx::Angle *angle)
Utility cast method.
agx::Real getLastAngle() const
virtual void transform(const agx::AttachmentPair &ap) override
Update value given constraint pair.
virtual void restoreLightData(agxStream::StorageStream &str) override
Restore structural independent data from stream.
RotationalAngle()
Default constructor used during restore.
agx::Int getWindingNumber() const
void setLastAngle(agx::Real lastAngle)
Set the last angle bewteen (-pi, +pi) (winding number NOT included)
agx::Real calculateCurrentAngle(const AttachmentPair &ap) const
Implementation of constraint angle ALONG an axis.
virtual ~SeparationAngle()
Reference counted object, protected destructor.
SeparationAngle()
Default constructor used during restore.
SeparationAngle(agx::Angle::Axis axis, agx::Real initialAngle=agx::Real(0))
Construct given axis and initial angle.
virtual void transform(const agx::AttachmentPair &ap) override
Update value given constraint pair.
static agx::SeparationAngle * safeCast(const agx::Angle *angle)
Utility cast method.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
agx::ref_ptr< RotationalAngle > RotationalAngleRef
ref_ptr< ConeLimitAngle > ConeLimitAngleRef
agx::Vector< AngleRef > AngleContainer
agx::ref_ptr< Angle > AngleRef
agx::ref_ptr< SeparationAngle > SeparationAngleRef