 |
AGX Dynamics
2.38.0.2
|
Go to the documentation of this file.
64 :
agx::
Vec3(p), m_tension(t), m_stretch(stretch), m_curvature(curvature) {}
138 virtual void updateTangents() = 0;
143 virtual void clear();
168 return m_points[index].getTension();
170 return m_points[index + 1].getTension();
172 return (1 - time) *
m_points[index].getTension() + time *
m_points[index + 1].getTension();
190 virtual Point evaluate(
size_t index,
agx::Real t )
const override;
195 void updateTangents()
override;
223 virtual Point evaluate(
size_t index,
agx::Real t )
const override;
228 void updateTangents()
override;
258 void updateTangents()
override;
288 void updateTangents()
override;
323 void updateTangents()
override;
352 virtual void updateTangents()
override;
383 void updateTangents()
override;
https://en.wikipedia.org/wiki/Centripetal_Catmull%E2%80%93Rom_spline
agx::Real getCurvature() const
Point class for storing 3D point, tension, stretch and curvature.
const AGXCORE_EXPORT Real RealEpsilon
AGXPHYSICS_EXPORT agx::Bool equivalent(const agx::AddedMassInteraction::Matrix6x6 &lhs, const agx::AddedMassInteraction::Matrix6x6 &rhs, agx::Real eps=agx::RealEpsilon)
agx::ref_ptr< CPCatmullRomBSpline > CPCatmullRomBSplineRef
agx::Real getTension() const
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Point(const agx::Vec3 &p=agx::Vec3(), agx::Real t=DEFAULT_TENSION, agx::Real stretch=DEFAULT_STRETCH, agx::Real curvature=DEFAULT_CURVATURE)
Create a spline point from a point p, tension t and stretch stretch.
agx::Vector< Point > PointVector
virtual ~CardinalSpline()
agx::ref_ptr< HermiteSpline > HermiteSplineRef
Special case of a cardinal spline.
https://en.wikipedia.org/wiki/Hermite_spline
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
agx::ref_ptr< NonUniformCardinalSpline > NonUniformCardinalSplineRef
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
#define AGXPHYSICS_EXPORT
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
static const AGXPHYSICS_EXPORT double DEFAULT_TENSION
T1 clamp(T1 v, T2 minimum, T3 maximum)
A Spline constructed of piecewise third-order polynomials which pass through a set of control points.
AGXPHYSICS_EXPORT agx::Bool equalsZero(const agx::AddedMassInteraction::Matrix6x6 &matrix, agx::Real eps=agx::RealEpsilon)
ParameterizedCatmullRomSplineRef m_catmull
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
size_t getNumPoints() const
virtual ~CPCatmullRomBSpline()
agx::ref_ptr< Spline > SplineRef
ParameterizedCatmullRomSplineRef m_catmull
Class for writing serialized data in binary format to a stream.
agx::Real getStretch() const
static const AGXPHYSICS_EXPORT agx::Real DEFAULT_CURVATURE
agx::ref_ptr< CubicSpline > CubicSplineRef
A Spline constructed of piecewise third-order polynomials which pass through a set of control points.
agx::ref_ptr< BSpline > BSplineRef
Base class providing referencing counted objects.
void setTension(agx::Real tension)
Set the tension (N) in the point.
https://en.wikipedia.org/wiki/B-spline
agx::Vector< Tangent > TangentVector
PointVector & getPoints()
virtual agx::Real getTension(size_t index, agx::Real time) const
Linear interpolate of tension from point at index.
AGXTERRAIN_EXPORT void clear()
agx::ref_ptr< CardinalSpline > CardinalSplineRef
Tangent(const agx::Vec3 &v)
agx::ref_ptr< ParameterizedCatmullRomSpline > ParameterizedCatmullRomSplineRef
static const AGXPHYSICS_EXPORT agx::Real DEFAULT_STRETCH
The agxUtil namespace contain classes and methods for utility functionality.
virtual ~ParameterizedCatmullRomSpline()
const PointVector & getPoints() const
virtual Tangent getTangent(size_t, agx::Real) const