39 using MixFunction = std::function<agx::Real( agx::Real, agx::Real )>;
72 virtual void resetToDefault() = 0;
80 virtual
void store(
agxStream::OutputArchive&
out ) const override;
85 virtual
void restore(
agxStream::InputArchive&
in ) override;
90 virtual
void storeLightData(
agxStream::StorageStream& str ) const override;
95 virtual
void restoreLightData(
agxStream::StorageStream& str ) override;
102 MergeSplitThresholds( const
agx::
UInt numValues );
107 virtual ~MergeSplitThresholds();
113 void cloneValuesTo( MergeSplitThresholds& target ) const;
120 GLOBAL_THRESHOLDS = 1 << 0
123 using Options = agx::BitState<BitOptions, agx::Int32>;
125 Options& getOptions();
126 const Options& getOptions()
const;
136 return m_values[ index ];
146 return m_options.Is( GLOBAL_THRESHOLDS );
149 inline MergeSplitThresholds::Options& MergeSplitThresholds::getOptions()
154 inline const MergeSplitThresholds::Options& MergeSplitThresholds::getOptions()
const 165 return other ==
nullptr ||
this == other || other->
isGlobal() ?
171 other->
get( index ) :
173 mixFunc(
get( index ), other->
get( index ) );
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...
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...
Base class for a merge split algorithm handling a set of merged bodies.
#define AGXPHYSICS_EXPORT
#define AGX_DECLARE_POINTER_TYPES(type)
agx::UInt getNumValues() const
agx::Bool isGlobal() const
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
agx::Real get(const agx::UInt index) const
Base class for thresholds/constants/values used in agxSDK::MergeSplitAlgorithm.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Interface class for a cloneable reference counted object.
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
std::function< agx::Real(agx::Real, agx::Real)> MixFunction
Mixing two values function signature given two values and the return value is the mix...
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()