|
AGXDynamics
2.31.1.0
|
Templated one dimensional dimension state. More...
#include <DimensionState.h>
Inheritance diagram for agxPowerLine::detail::DimensionState1Dof< DimensionType >:Public Member Functions | |
| DimensionState1Dof (agx::RigidBody *body, agxPowerLine::PhysicalDimension *dimension, agx::UInt8 slot) | |
| virtual void | addLoad (agx::Real load) override |
| virtual void | addNotification (agxPowerLine::PowerLine *powerLine) override |
| 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 |
| virtual void | calculateJacobian (agx::Jacobian6DOFElement *G, agx::Real ratio, size_t index) const override |
| bool | getAllowsPacking () const |
| virtual const char * | getClassName () const override |
| agx::RigidBody * | getCurrentBody () |
| Returns the body currently used by this dimension state. More... | |
| const agx::RigidBody * | getCurrentBody () const |
| const agxPowerLine::PhysicalDimension * | getDimension () const |
| virtual agx::Vec3 | getDirection () const override |
| virtual DirectionReference | getDirectionReference () const override |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| virtual agx::Real | getGradient () const override |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| virtual agx::Vec3 | getLocalDirection () const override |
| virtual agx::Real | getMassProperty () const override |
| int | getReferenceCount () const |
| virtual agx::RigidBody * | getReservedBody () override |
| Returns a RigidBody that is guaranteed to not be shared with any other DimensionState. More... | |
| virtual const agx::RigidBody * | getReservedBody () const override |
| virtual agx::Real | getSecondGradient () const override |
| virtual agx::UInt8 | getSlot () const override |
| SlotMapper * | getSlotMapper () |
| virtual agxStream::StorageAgent * | getStorageAgent () const override |
| agx::Uuid | getUuid () const |
| virtual agx::Real | getValue () const override |
| virtual float | getVelocityDamping () override |
| virtual agx::Vec3 | getWorldDirection () const override |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| virtual bool | isExternalBody () const override |
| /return True if the body used by this dimension state was given by the user. More... | |
| bool | isFinished () const |
| void | move (agx::RigidBody *body, agx::UInt8 slot) |
| Make this dimension state use the given body for storage. More... | |
| virtual void | postUpdate (agx::Real timeStep) override |
| 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... | |
| virtual void | removeNotification (agxPowerLine::PowerLine *powerLine) override |
| virtual void | reserveBody () override |
| Ensure that this DimensionState is the only state using this state's RigidBody. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual bool | restore (agxStream::StorageStream &in) override |
| 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... | |
| virtual void | setGradient (agx::Real gradient) override |
| virtual bool | setMassProperty (agx::Real massProperty) override |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| virtual void | setValue (agx::Real value) override |
| virtual void | setVelocityDamping (float damping) override |
| void | split () |
| Move this DimensionState to a new RigidBody that is guaranteed to not be shared with any other DimensionState. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| virtual bool | store (agxStream::StorageStream &out) const override |
| 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... | |
Static Public Member Functions | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static const char * | getConstructClassId () |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| DimensionState1Dof () | |
| virtual | ~DimensionState1Dof () |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | disallowPacking () |
| Mark is DimensionState as not a candidate for packing. More... | |
| void | generateUuid () |
| const agx::Frame * | getBodyFrame () const |
| agx::Vec3 | getWorldPosition () const |
| agx::Vec3 | getWorldVelocity () const |
| void | moveImpl (agx::RigidBody *newBody, agx::UInt8 newSlot) |
| void | reserveImpl () |
| void | setBody (agx::RigidBody *newBody) |
| void | splitImpl () |
Static Protected Member Functions | |
| 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 | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Templated one dimensional dimension state.
The template type is the rigid body accessor (Translational or Rotational) that is to be used for accessing data in the RigidBody that currenly holds the dimension state data.
Definition at line 210 of file DimensionState.h.
| agxPowerLine::detail::DimensionState1Dof< DimensionType >::DimensionState1Dof | ( | agx::RigidBody * | body, |
| agxPowerLine::PhysicalDimension * | dimension, | ||
| agx::UInt8 | slot | ||
| ) |
|
protected |
|
protectedvirtual |
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
static |
|
static |
|
protectedinherited |
|
protectedinherited |
Mark is DimensionState as not a candidate for packing.
Never call this method on a DimensionState that is currently packed since that would create an invalid state.
|
protectedinherited |
|
inherited |
|
protectedinherited |
|
overridevirtual |
Reimplemented from agxStream::Serializable.
|
static |
|
inherited |
Returns the body currently used by this dimension state.
If getAllowsPacking returns true then the body returned by getCurrentBody may change at any time.
|
inherited |
|
staticprotectedinherited |
|
inherited |
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.h.
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
inherited |
|
overridevirtual |
Returns a RigidBody that is guaranteed to not be shared with any other DimensionState.
Will return nullptr if such a guarantee cannot be made. Call reserveBody to ensure that this DimensionState does not share it's body with another DimensionState
Implements agxPowerLine::detail::DimensionState.
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
overridevirtual |
Implements agxPowerLine::detail::AbstractDimensionState1Dof.
| SlotMapper* agxPowerLine::detail::DimensionState1Dof< DimensionType >::getSlotMapper | ( | ) |
|
overridevirtual |
Implements agxStream::Serializable.
|
inherited |
Definition at line 268 of file Serializable.h.
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
protectedinherited |
|
protectedinherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
|
overridevirtual |
/return True if the body used by this dimension state was given by the user.
False if it was created by the power line.
Implements agxPowerLine::detail::DimensionState.
|
inherited |
Definition at line 252 of file Serializable.h.
| void agxPowerLine::detail::DimensionState1Dof< DimensionType >::move | ( | agx::RigidBody * | body, |
| agx::UInt8 | slot | ||
| ) |
Make this dimension state use the given body for storage.
All state stored in the current body is moved to the new body. It is important that the body/slot pair is not used by any other dimension state, and that the given body is not used for any other purpose than to store DimesionState1Dof data.
The dimension state must allow packing for this operation to be legal.
| body | - The body to move to. |
| slot | - The slot to inhabit in the new body. |
|
protected |
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
Referenced by agxData::Val< UInt >::Val().
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
overridevirtual |
Ensure that this DimensionState is the only state using this state's RigidBody.
The DimensionState may create a new body in order to give that guarantee. After this call getReservedBody is guaranteed to not return nullptr and getAllowsPacking is guaranteed to return false.
Implements agxPowerLine::detail::DimensionState.
|
protected |
|
overridevirtual |
Reimplemented from agxPowerLine::detail::DimensionState.
|
overridevirtual |
Reimplemented from agxPowerLine::detail::DimensionState.
|
protectedinherited |
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
Explicitly set a Uuid on a serializable object.
Use this method with great care, as it can result in non-unique identifiers in the system!
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
|
overridevirtual |
Implements agxPowerLine::detail::DimensionState.
| void agxPowerLine::detail::DimensionState1Dof< DimensionType >::split | ( | ) |
Move this DimensionState to a new RigidBody that is guaranteed to not be shared with any other DimensionState.
This does not alter the allow packing setting, so if the DimensionState allows packing then the DimensionState may later be packed into a body used by another DimensionState, and other DimensionState may be packed into the body just created.
|
protected |
|
overridevirtual |
Reimplemented from agxPowerLine::detail::DimensionState.
|
overridevirtual |
Reimplemented from agxPowerLine::detail::DimensionState.
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
staticinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.