 |
AGXDynamics
2.35.0.2
|
Go to the documentation of this file.
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 );
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();
void resize(size_t size)
Resize the vector, which then enables direct addressing using the bracket '[]' operator.
agxSDK::WireMergeSplitThresholds * getWireThresholds() 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.
A collection of merge ignore groups, some named and some not.
#define DOXYGEN_END_INTERNAL_BLOCK()
agx::Bool getEnableMerge() const
static agx::UInt findCallbackIndex(agxSDK::MergeSplitAlgorithm::Callback callback)
Maps given callback to an index (0, 1, 2, ...).
#define DOXYGEN_START_INTERNAL_BLOCK()
agx::UInt32 pow2Exponent(T value)
Finds and returns n given value = 2^n.
Abstract base class for storing/restoring a line/drums with version control.
AGXPHYSICS_EXPORT void addGroup(const agx::RigidBody *body, unsigned id)
For the specified body, add the collision group ID to its geometries.
Interface class for a cloneable reference counted object.
#define AGXPHYSICS_EXPORT
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...
Smart pointer for handling referenced counted objects.
Representation of a name string.
Class for writing serialized data in binary format to a stream.
agx::Bool getEnableSplit() const
Specific thresholds used to split and merge objects given constraints.
#define AGX_DECLARE_POINTER_TYPES(type)
AGXPHYSICS_EXPORT void removeGroup(const agx::RigidBody *body, unsigned id)
For the specified body, remove the collision group ID to its geometries.
agxSDK::ConstraintMergeSplitThresholds * getConstraintThresholds() const
agx::Bool getEnableMergeSplit() const
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
agxSDK::GeometryContactMergeSplitThresholds * getContactThresholds() const
Specific thresholds used to split and merge objects given wires.