AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
agxSDK::MergeSplitProperties Class Reference

#include <MergeSplitProperties.h>

+ Inheritance diagram for agxSDK::MergeSplitProperties:

Public Member Functions

 MergeSplitProperties ()
 Default constructor, sets default values to all thresholds and merge + split disabled.
 
void addGroup (agx::UInt32 group)
 Add all rigid bodies with this MergeSplitProperty to the given merge ignore group.
 
void addGroup (const agx::Name &group)
 Add all rigid bodies with this MergeSplitProperty to the given merge ignore group.
 
agxSDK::ConstraintMergeSplitThresholds * getConstraintThresholds () const
 
agxSDK::GeometryContactMergeSplitThresholds * getContactThresholds () const
 
agx::Bool getEnableMerge () const
 
agx::Bool getEnableMergeSplit () const
 
agx::Bool getEnableSerialization () const
 
agx::Bool getEnableSplit () const
 
const agx::UInt32Vector & getGroupIds () const
 
const agx::NameVector & getGroupNames () const
 
agxSDK::ConstraintMergeSplitThresholds * getOrCreateConstraintThresholds ()
 
agxSDK::GeometryContactMergeSplitThresholds * getOrCreateContactThresholds ()
 
agxSDK::WireMergeSplitThresholds * getOrCreateWireThresholds ()
 
agxSDK::WireMergeSplitThresholds * getWireThresholds () const
 
void removeGroup (agx::UInt32 group)
 Remove the given merge ignore group from this MergeSplitProperty.
 
void removeGroup (const agx::Name &group)
 Remove the given merge ignore group from this MergeSplitProperty.
 
void setConstraintThresholds (agxSDK::ConstraintMergeSplitThresholds *constraintThresholds)
 Assign constraint thresholds.
 
void setContactThresholds (agxSDK::GeometryContactMergeSplitThresholds *contactThresholds)
 Assign contact thresholds.
 
void setEnableMerge (agx::Bool enable)
 Enable/disable merge for this object.
 
void setEnableMergeSplit (agx::Bool enable)
 Enable/disable both merge and split for the object.
 
void setEnableSerialization (agx::Bool flag)
 Enable/disable native serialization of this object.
 
void setEnableSplit (agx::Bool enable)
 Enable/disable split for this object.
 
void setWireThresholds (agxSDK::WireMergeSplitThresholds *wireThresholds)
 Assign wire thresholds.
 
- Public Member Functions inherited from agx::ICloneable
virtual agx::ICloneableRef clone (agx::ICloneable *child=nullptr)=0
 Creates a clone of this object.
 
- 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.
 
Referenced & operator= (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.
 

Static Public Member Functions

static agx::UInt findCallbackIndex (agxSDK::MergeSplitAlgorithm::Callback callback)
 Maps given callback to an index (0, 1, 2, ...).
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

virtual ~MergeSplitProperties ()
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Additional Inherited Members

- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
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 agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Definition at line 38 of file MergeSplitProperties.h.

Constructor & Destructor Documentation

◆ MergeSplitProperties()

agxSDK::MergeSplitProperties::MergeSplitProperties ( )

Default constructor, sets default values to all thresholds and merge + split disabled.

◆ ~MergeSplitProperties()

virtual agxSDK::MergeSplitProperties::~MergeSplitProperties ( )
protectedvirtual

Member Function Documentation

◆ addGroup() [1/2]

void agxSDK::MergeSplitProperties::addGroup ( agx::UInt32  group)

Add all rigid bodies with this MergeSplitProperty to the given merge ignore group.

Merge can be disabled group-wise using MergeSplitHandler::setEnableMergePair.

Group IDs larger than MergeIgnoreFilter::MAX_UNAMED_GROUP_ID are reserved for named merge ignore groups.

Parameters
groupThe group ID this MergeSplitProperty should be added to.

◆ addGroup() [2/2]

void agxSDK::MergeSplitProperties::addGroup ( const agx::Name &  group)

Add all rigid bodies with this MergeSplitProperty to the given merge ignore group.

Merge can be disabled group-wise using MergeSplitHandler::setEnableMergePair.

The group name will be converted to a numeric group ID larger than MergeIgnoreFilter::MAX_UNAMED_GROUP_ID

Parameters
groupThe group name this MergeSplitProperty should be added to.

◆ findCallbackIndex()

agx::UInt agxSDK::MergeSplitProperties::findCallbackIndex ( agxSDK::MergeSplitAlgorithm::Callback  callback)
inlinestatic

Maps given callback to an index (0, 1, 2, ...).

Definition at line 257 of file MergeSplitProperties.h.

References agxAssert, agxSDK::MergeSplitAlgorithm::NONE, and agx::pow2Exponent().

Referenced by getConstraintThresholds(), getContactThresholds(), and getWireThresholds().

◆ getConstraintThresholds()

ConstraintMergeSplitThresholds * agxSDK::MergeSplitProperties::getConstraintThresholds ( ) const
inline
Returns
explicitly assigned constraint thresholds, nullptr if not assigned (default MergeSplitHandler::getConstraintThresholds() will be used)

Definition at line 247 of file MergeSplitProperties.h.

References agxSDK::MergeSplitAlgorithm::CONSTRAINTS, and findCallbackIndex().

◆ getContactThresholds()

GeometryContactMergeSplitThresholds * agxSDK::MergeSplitProperties::getContactThresholds ( ) const
inline
Returns
explicitly assigned contact thresholds, nullptr if not assigned (default MergeSplitHandler::getContactThresholds() will be used)

Definition at line 242 of file MergeSplitProperties.h.

References agxSDK::MergeSplitAlgorithm::CONTACTS, and findCallbackIndex().

◆ getEnableMerge()

agx::Bool agxSDK::MergeSplitProperties::getEnableMerge ( ) const
Returns
true if the object may merge

Definition at line 232 of file MergeSplitProperties.h.

Referenced by getEnableMergeSplit(), and agxSDK::MergeSplitHandler::mayMergeProperties().

◆ getEnableMergeSplit()

agx::Bool agxSDK::MergeSplitProperties::getEnableMergeSplit ( ) const
Returns
true when both merge and split are enabled

Definition at line 227 of file MergeSplitProperties.h.

References getEnableMerge(), and getEnableSplit().

◆ getEnableSerialization()

agx::Bool agxSDK::MergeSplitProperties::getEnableSerialization ( ) const
Returns
true if native serialization is enabled - otherwise false

◆ getEnableSplit()

agx::Bool agxSDK::MergeSplitProperties::getEnableSplit ( ) const
Returns
true if the object may split

Definition at line 237 of file MergeSplitProperties.h.

Referenced by getEnableMergeSplit(), and agxSDK::MergeSplitHandler::maySplitProperties().

◆ getGroupIds()

const agx::UInt32Vector & agxSDK::MergeSplitProperties::getGroupIds ( ) const
Returns
Return group IDs for all merge ignore groups, including named.

◆ getGroupNames()

const agx::NameVector & agxSDK::MergeSplitProperties::getGroupNames ( ) const
Returns
All group names added to this MergeSplitProperty.

◆ getOrCreateConstraintThresholds()

agxSDK::ConstraintMergeSplitThresholds * agxSDK::MergeSplitProperties::getOrCreateConstraintThresholds ( )
Returns
explicitly assigned/create constraint thresholds, and in case of no assigned instance, a new (with default values) will be created

◆ getOrCreateContactThresholds()

agxSDK::GeometryContactMergeSplitThresholds * agxSDK::MergeSplitProperties::getOrCreateContactThresholds ( )
Returns
explicitly assigned/create contact thresholds, and in case of no assigned instance, a new (with default values) will be created

◆ getOrCreateWireThresholds()

agxSDK::WireMergeSplitThresholds * agxSDK::MergeSplitProperties::getOrCreateWireThresholds ( )
Returns
explicitly assigned/create wire thresholds, and in case of no assigned instance, a new (with default values) will be created

◆ getWireThresholds()

WireMergeSplitThresholds * agxSDK::MergeSplitProperties::getWireThresholds ( ) const
inline
Returns
explicitly assigned wire thresholds, nullptr if not assigned (default MergeSplitHandler::getWireThresholds() will be used)

Definition at line 252 of file MergeSplitProperties.h.

References findCallbackIndex(), and agxSDK::MergeSplitAlgorithm::WIRES.

◆ removeGroup() [1/2]

void agxSDK::MergeSplitProperties::removeGroup ( agx::UInt32  group)

Remove the given merge ignore group from this MergeSplitProperty.

Parameters
group- The ID of the group to remove.

◆ removeGroup() [2/2]

void agxSDK::MergeSplitProperties::removeGroup ( const agx::Name &  group)

Remove the given merge ignore group from this MergeSplitProperty.

Parameters
group- The name of the group to remove.

◆ setConstraintThresholds()

void agxSDK::MergeSplitProperties::setConstraintThresholds ( agxSDK::ConstraintMergeSplitThresholds *  constraintThresholds)

Assign constraint thresholds.

If nullptr, the default MergeSplitHandler constraint thresholds will be used.

◆ setContactThresholds()

void agxSDK::MergeSplitProperties::setContactThresholds ( agxSDK::GeometryContactMergeSplitThresholds *  contactThresholds)

Assign contact thresholds.

If nullptr, the default MergeSplitHandler contact thresholds will be used.

◆ setEnableMerge()

void agxSDK::MergeSplitProperties::setEnableMerge ( agx::Bool  enable)

Enable/disable merge for this object.

Parameters
enable- true to enable, false to disable

◆ setEnableMergeSplit()

void agxSDK::MergeSplitProperties::setEnableMergeSplit ( agx::Bool  enable)

Enable/disable both merge and split for the object.

Parameters
enable- true to enable, false to disable

◆ setEnableSerialization()

void agxSDK::MergeSplitProperties::setEnableSerialization ( agx::Bool  flag)

Enable/disable native serialization of this object.

Enabled by default.

◆ setEnableSplit()

void agxSDK::MergeSplitProperties::setEnableSplit ( agx::Bool  enable)

Enable/disable split for this object.

Parameters
enable- true to enable, false to disable

◆ setWireThresholds()

void agxSDK::MergeSplitProperties::setWireThresholds ( agxSDK::WireMergeSplitThresholds *  wireThresholds)

Assign wire thresholds.

If nullptr, the default MergeSplitHandler wire thresholds will be used.


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