|
AGX Dynamics
2.37.3.2
|
Book keeping of a body which can be merged with other bodies. More...
#include <MergeSplitBodyStorage.h>
Inheritance diagram for agx::MergeSplitBodyStorage:Public Types | |
| typedef agx::Vector< agx::observer_ptr< agxCollide::Geometry > > | GeometryObserverVector |
Public Member Functions | |
| MergeSplitBodyStorage () | |
| Default constructor. More... | |
| MergeSplitBodyStorage (agx::RigidBody *body) | |
| Constructor which associates a body to this body storage. More... | |
| MergeSplitBodyStorage * | getChild (size_t nth) |
| const MergeSplitBodyStorage * | getChild (size_t nth) const |
| const char * | getClassName () const override |
| const agxCollide::GeometryRefVector & | getGeometries () const |
| size_t | getNumChildren () const |
| MergeSplitBodyStorage * | getParent () |
| const MergeSplitBodyStorage * | getParent () const |
| agx::RigidBody * | getRigidBody () |
| const agx::RigidBody * | getRigidBody () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| AffineMatrix4x4 | getTransformRelativeParent () const |
| bool | hasChild (MergeSplitBodyStorage *child) const |
| bool | hasChildren () const |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | store (agxStream::OutputArchive &out) const override |
| bool | validate () const |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. More... | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. More... | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Public Member Functions inherited from agxStream::Serializable | |
| virtual | ~Serializable () |
| Destructor for normal C++ use but hidden from SWIG bindings. More... | |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agx::Uuid | getUuid () const |
| bool | isFinished () const |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
Static Public Member Functions | |
| static void | addMassProperties (MergeSplitBodyStorage *targetStorage, const MergeSplitBodyStorage *sourceStorage, Real sign) |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static const char * | getConstructClassId () |
| static void | removeMassProperties (MergeSplitBodyStorage *targetStorage, const MergeSplitBodyStorage *sourceStorage, Real sign) |
| static void | setRebuildThreshold (size_t numChildren, size_t numUpdates) |
| Set the threshold when the inertiatensor of a parent should be completely rebuilt. More... | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Public Member Functions inherited from agxStream::Serializable | |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
Protected Member Functions | |
| virtual | ~MergeSplitBodyStorage () |
| void | addChild (MergeSplitBodyStorage *child) |
| Add a storage as a child to this storage. More... | |
| void | addGeometry (agxCollide::Geometry *geom) |
| void | calculateRelativeTransform (const MergeSplitBodyStorage *parentStorage) |
| Calculate and store the transform relative the parent body. More... | |
| void | clear () |
| Reset this storage so its not associated to any body. More... | |
| void | followGeometry () |
| Make the body follow the first geometry in the list of geometries. More... | |
| agx::Frame * | getFrame () |
| const agx::Frame * | getFrame () const |
| agx::RigidBody::MotionControl | getMotionControl () const |
| size_t | getNumUpdates () |
| void | incrementNumUpdates () |
| bool | isMerged () const |
| bool | removeChild (MergeSplitBodyStorage *child) |
| Remove a storage so its no longer a child of this storage. More... | |
| void | resetNumUpdates () |
| void | restore (bool beingErased=false) |
| Restore the associated body in that it will get back all its original geometries, motioncontrol etc. More... | |
| void | restoreMassProperties () |
| void | setMotionControl (agx::RigidBody::MotionControl m) |
| void | setParent (MergeSplitBodyStorage *parent) |
| Set the pointer to the parent body of this body. More... | |
| void | setRigidBody (agx::RigidBody *body) |
| Associate this storage with the specified body. More... | |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Member Functions inherited from agxStream::Serializable | |
| Serializable () | |
| Default constructor. More... | |
| Serializable (const Serializable &other) | |
| Copy constructor. More... | |
| void | generateUuid () |
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. More... | |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Book keeping of a body which can be merged with other bodies.
Keep track of its children, parent bodies, original geometries belonging to this body etc.
Definition at line 35 of file MergeSplitBodyStorage.h.
| typedef agx::Vector<agx::observer_ptr<agxCollide::Geometry> > agx::MergeSplitBodyStorage::GeometryObserverVector |
Definition at line 40 of file MergeSplitBodyStorage.h.
| agx::MergeSplitBodyStorage::MergeSplitBodyStorage | ( | ) |
Default constructor.
| agx::MergeSplitBodyStorage::MergeSplitBodyStorage | ( | agx::RigidBody * | body | ) |
Constructor which associates a body to this body storage.
|
protectedvirtual |
|
protected |
Add a storage as a child to this storage.
|
protected |
|
static |
|
protected |
Calculate and store the transform relative the parent body.
|
protected |
Reset this storage so its not associated to any body.
|
inlinestatic |
Definition at line 53 of file MergeSplitBodyStorage.h.
|
inlinestatic |
Definition at line 53 of file MergeSplitBodyStorage.h.
|
protected |
Make the body follow the first geometry in the list of geometries.
| MergeSplitBodyStorage* agx::MergeSplitBodyStorage::getChild | ( | size_t | nth | ) |
| const MergeSplitBodyStorage* agx::MergeSplitBodyStorage::getChild | ( | size_t | nth | ) | const |
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 53 of file MergeSplitBodyStorage.h.
|
inlinestatic |
Definition at line 53 of file MergeSplitBodyStorage.h.
|
inlineprotected |
Definition at line 222 of file MergeSplitBodyStorage.h.
|
inlineprotected |
Definition at line 227 of file MergeSplitBodyStorage.h.
| const agxCollide::GeometryRefVector& agx::MergeSplitBodyStorage::getGeometries | ( | ) | const |
|
inlineprotected |
Definition at line 232 of file MergeSplitBodyStorage.h.
|
inline |
Definition at line 217 of file MergeSplitBodyStorage.h.
|
inlineprotected |
Definition at line 207 of file MergeSplitBodyStorage.h.
|
inline |
Definition at line 212 of file MergeSplitBodyStorage.h.
|
inline |
Definition at line 213 of file MergeSplitBodyStorage.h.
|
inline |
Definition at line 209 of file MergeSplitBodyStorage.h.
|
inline |
Definition at line 210 of file MergeSplitBodyStorage.h.
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 53 of file MergeSplitBodyStorage.h.
|
inline |
Definition at line 215 of file MergeSplitBodyStorage.h.
| bool agx::MergeSplitBodyStorage::hasChild | ( | MergeSplitBodyStorage * | child | ) | const |
|
inline |
Definition at line 237 of file MergeSplitBodyStorage.h.
|
inlineprotected |
Definition at line 203 of file MergeSplitBodyStorage.h.
|
inlineprotected |
Definition at line 201 of file MergeSplitBodyStorage.h.
|
protected |
Remove a storage so its no longer a child of this storage.
|
static |
|
inlineprotected |
Definition at line 205 of file MergeSplitBodyStorage.h.
|
overridevirtual |
|
protected |
Restore the associated body in that it will get back all its original geometries, motioncontrol etc.
|
protected |
|
protected |
|
protected |
Set the pointer to the parent body of this body.
|
static |
Set the threshold when the inertiatensor of a parent should be completely rebuilt.
| numChildren | - If a parent has less children than numChildren, rebuild the whole tensor |
| numUpdates | - If a parent has been incrementally recalculated more than numUpdates, rebuild the whole tensor |
|
protected |
Associate this storage with the specified body.
Stores information about motioncontrol, associated geometries etc.
|
overridevirtual |
| bool agx::MergeSplitBodyStorage::validate | ( | ) | const |