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