17 #ifndef AGX_LOOKUP_TABLES_H
18 #define AGX_LOOKUP_TABLES_H
157 virtual void clear() { m_points.clear(); }
#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
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.
virtual void add(agx::Real x, agx::Real y, agx::Real dy)
virtual agx::Real evaluateDerivative(agx::Real x)
virtual const Point2DVector & getPoints()
virtual agx::Real evaluate(agx::Real x)
Base class for spline interpolation between the inserted variable/value pairs.
CubicFunction2DRef m_spline
virtual void insertValue(const agx::Real x, const agx::Real y) override
insert a value to the lookup table.
virtual ~CubicSplineLookupTable()
virtual void clear() override
clear all data
virtual agx::Real lookupDerivative(const agx::Real x) const
virtual agx::Real lookup(const agx::Real x) const override
Lookup a specific value.
virtual bool store(agxStream::StorageStream &str) const
Stores internal data into stream.
virtual bool restore(agxStream::StorageStream &str)
Restores internal data from stream.
Linear interpolation between the inserted variable/value pairs.
virtual ~LinearLookupTable()
virtual agx::Real lookup(const agx::Real x) const override
Lookup a specific value.
LinearLookupTable()
Constructor.
Return a value of y given any value of x.
virtual agx::Real lookup(const agx::Real x) const =0
Lookup a specific value.
LookupTable()
Create a lookup table.
void setDefaultValue(agx::Real defaultValue)
Set the default return value, if the table has been cleared.
agx::Real getDefaultValue() const
virtual agx::Real resultScalerFunction() const
Scale the found value.
RealPairList::const_iterator getValueIterator() const
virtual void clear()
clear all data
RealPairList::const_iterator getValueEndIterator() const
virtual void insertValue(const agx::Real x, const agx::Real y)
insert a value to the lookup table.
size_t getNumValues() const
return the number of values in the lookup table
virtual void setValues(RealPairVector const &values)
Set all lookup values at the same time (all previous will be removed.)
Point2D(agx::Real xxx, agx::Real yyy, agx::Real dy)
Base class providing referencing counted objects.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
agx::List< std::pair< agx::Real, agx::Real > > RealPairList
agx::Vector< std::pair< agx::Real, agx::Real > > RealPairVector
agx::ref_ptr< LinearLookupTable > LinearLookupTableRef
agx::ref_ptr< CubicFunction2D > CubicFunction2DRef
agx::Vector< Point2D > Point2DVector
agx::ref_ptr< CubicSplineLookupTable > CubicSplineLookupTableRef