AGX Dynamics 2.40.0.0
Loading...
Searching...
No Matches
agxUtil::BSpline Class Reference

https://en.wikipedia.org/wiki/B-spline More...

#include <Spline.h>

+ Inheritance diagram for agxUtil::BSpline:

Public Member Functions

 BSpline ()
 
 AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxUtil::BSpline)
 
virtual Point evaluate (size_t index, agx::Real t) const override
 
Tangent getTangent (size_t index, agx::Real t) const override
 
void updateTangents () override
 Compute tangents given current set of points.
 
- Public Member Functions inherited from agxUtil::Spline
 Spline ()
 Default constructor.
 
void add (const agx::Vec3 &point, agx::Real tension=Point::DEFAULT_TENSION, agx::Real stretch=Point::DEFAULT_STRETCH, agx::Real curvature=Point::DEFAULT_CURVATURE)
 Add point to the control points given tension (1 max, 0 min) and stretch.
 
 AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agxUtil::Spline)
 
virtual void clear ()
 Clears control points and tangents.
 
virtual Point evaluate (size_t index, agx::Real t) const =0
 Interpolate from point with index index a time t forward (0 <= t <= 1)
 
size_t getNumPoints () const
 
PointVectorgetPoints ()
 
const PointVectorgetPoints () const
 
virtual Tangent getTangent (size_t, agx::Real) const
 
virtual agx::Real getTension (size_t index, agx::Real time) const
 Linear interpolate of tension from point at index.
 
void restore (agxStream::InputArchive &in) override
 
void store (agxStream::OutputArchive &out) const override
 
virtual void updateTangents ()=0
 All control points are added, computes the tangents.
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referencedoperator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings.
 
virtual const char * getClassName () const
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object.
 
virtual StorageAgent * getStorageAgent () const =0
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object.
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object.
 

Static Public Member Functions

static agxStream::Serializablecreate (agxStream::InputArchive &)
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
 

Protected Member Functions

virtual ~BSpline ()
 
- Protected Member Functions inherited from agxUtil::Spline
virtual ~Spline ()
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor.
 
 Serializable (const Serializable &other)
 Copy constructor.
 
void generateUuid ()
 

Additional Inherited Members

- Public Types inherited from agxUtil::Spline
typedef agx::Vector< PointPointVector
 
typedef agx::Vector< TangentTangentVector
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandlergetDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 
- Protected Attributes inherited from agxUtil::Spline
PointVector m_points
 
TangentVector m_tangents
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Constructor & Destructor Documentation

◆ BSpline()

agxUtil::BSpline::BSpline ( )

◆ ~BSpline()

virtual agxUtil::BSpline::~BSpline ( )
inlineprotectedvirtual

Definition at line 331 of file Spline.h.

Member Function Documentation

◆ AGXSTREAM_DECLARE_SERIALIZABLE_BASE()

agxUtil::BSpline::AGXSTREAM_DECLARE_SERIALIZABLE_BASE ( agxUtil::BSpline  )

◆ create()

static agxStream::Serializable * agxUtil::BSpline::create ( agxStream::InputArchive )
inlinestatic

Definition at line 327 of file Spline.h.

◆ evaluate()

virtual Point agxUtil::BSpline::evaluate ( size_t  index,
agx::Real  t 
) const
overridevirtual
Returns
point from index at time t

Implements agxUtil::Spline.

◆ getTangent()

Tangent agxUtil::BSpline::getTangent ( size_t  ,
agx::Real   
) const
overridevirtual
Returns
the ith tangent computed (updated after updateTangents call, class Spline::Tangent)

Reimplemented from agxUtil::Spline.

◆ updateTangents()

void agxUtil::BSpline::updateTangents ( )
overridevirtual

Compute tangents given current set of points.

Implements agxUtil::Spline.


The documentation for this class was generated from the following file: