32 class GeometryContactMergeSplitThresholds;
33 class ConstraintMergeSplitThresholds;
34 class WireMergeSplitThresholds;
57 void setEnableMergeSplit(
agx::Bool enable );
180 void setEnableSerialization(
agx::Bool flag );
185 agx::Bool getEnableSerialization()
const;
196 T* getMergeSplitThresholds(
const agx::UInt index )
const;
205 MERGE_ENABLED = 1 << 0,
206 SPLIT_ENABLED = 1 << 1,
207 SERIALIZATION_ENABLED = 1 << 2
211 typedef agx::BitState< EState, agx::Int32 >
State;
216 T* getOrCreateMergeSplitThresholds(
const agx::UInt index );
223 ThresholdsContainer m_thresholds;
229 return getEnableMerge() && getEnableSplit();
234 return m_state.Is( MERGE_ENABLED );
239 return m_state.Is( SPLIT_ENABLED );
264 inline T* MergeSplitProperties::getMergeSplitThresholds(
const agx::UInt index )
const 266 agxAssert( index >= m_thresholds.size() || m_thresholds[ index ] ==
nullptr || m_thresholds[ index ]->is<T>() );
268 return index < m_thresholds.size() ? (T*)m_thresholds[ index ].
get() :
nullptr;
272 T* MergeSplitProperties::getOrCreateMergeSplitThresholds(
const agx::UInt index )
274 if ( index < m_thresholds.size() && m_thresholds[ index ] != nullptr ) {
275 agxAssert( m_thresholds[ index ]->is<T>() );
276 return (T*)m_thresholds[ index ].get();
279 return setMergeSplitThresholds<T>( index,
new T() );
285 if ( index >= m_thresholds.size() )
286 m_thresholds.resize( index + 1 );
288 return (T*)( m_thresholds[ index ] = thresholds ).
get();
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...
agx::UInt32 pow2Exponent(T value)
Finds and returns n given value = 2^n.
agx::Bool getEnableMerge() const
Specific thresholds used to split and merge objects given constraints.
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...
agx::Bool getEnableSplit() const
A collection of merge ignore groups, some named and some not.
agxSDK::GeometryContactMergeSplitThresholds * getContactThresholds() const
#define AGXPHYSICS_EXPORT
agxSDK::ConstraintMergeSplitThresholds * getConstraintThresholds() const
#define AGX_DECLARE_POINTER_TYPES(type)
Representation of a name string.
agx::Bool getEnableMergeSplit() const
AGXPHYSICS_EXPORT void addGroup(const agx::RigidBody *body, unsigned id)
For the specified body, add the collision group ID to its geometries.
agxSDK::WireMergeSplitThresholds * getWireThresholds() const
Smart pointer for handling referenced counted objects.
Specific thresholds used to split and merge objects given wires.
Abstract base class for storing/restoring a line/drums with version control.
AGXPHYSICS_EXPORT void removeGroup(const agx::RigidBody *body, unsigned id)
For the specified body, remove the collision group ID to its geometries.
static agx::UInt findCallbackIndex(agxSDK::MergeSplitAlgorithm::Callback callback)
Maps given callback to an index (0, 1, 2, ...).
Class for writing serialized data in binary format to a stream.
Interface class for a cloneable reference counted object.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()