|
AGX Dynamics 2.42.3.1
|
Keeps track of the energy flow in the system. More...
#include <EnergyManager.h>
Inheritance diagram for agxSDK::EnergyManager:Public Member Functions | |
| void | add (const agx::Constraint *constraint) |
| Enables energy calculations for a constraint. | |
| void | add (const agx::RigidBody *rigidBody) |
| Enables energy calculations for a rigid body. | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxSDK::EnergyManager) | |
| agx::Real | getDissipation (const agx::Constraint *constraint) const |
| Get the dissipation for a constraint during the last timestep. | |
| agx::Real | getDissipation (const agx::ElementaryConstraint *constraint) const |
| Get the dissipation for a secondary constraint during the last timestep. | |
| agx::Real | getDissipation (const agx::RigidBody *rb) const |
| Get the dissipation from linear and angular velocity damping and external forces. | |
| agx::Real | getKineticEnergyChange (const agx::RigidBody *rb) const |
| Get the change in kinetic energy for a rigid body during the last time step. | |
| agx::Real | getPotentialChange (const agx::Constraint *constraint) const |
| Get the change in potential for a constraint during the last timestep. | |
| agx::Real | getPotentialChange (const agx::ElementaryConstraint *constraint) const |
| Get the change in potential for a secondary constraint during the last timestep. | |
| agx::Real | getPotentialChange (const agx::RigidBody *rb) const |
| Get the change in gravity potential for a rigid body during the last timestep. | |
| agx::Real | getPower (const agx::ElementaryConstraint *motor) const |
| Get the power from a constraint motor. | |
| agx::Real | getRotationalEnergyChange (const agx::RigidBody *rb) const |
| Get the change in kinetic energy from the rotational motion for a rigid body during the last time step. | |
| agx::Real | getTranslationalEnergyChange (const agx::RigidBody *rb) const |
| Get the change in kinetic energy from the translational motion for a rigid body during the last time step. | |
| void | remove (const agx::Constraint *constraint) |
| Removes the constraint from the EnergyManager. | |
| void | remove (const agx::RigidBody *rigidBody) |
| Removes the rigid body from the EnergyManager. | |
Public Member Functions inherited from agxStream::Serializable | |
| virtual | ~Serializable () |
| Destructor for normal C++ use but hidden from SWIG bindings. | |
| virtual const char * | getClassName () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. | |
| virtual StorageAgent * | getStorageAgent () const =0 |
| agx::Uuid | getUuid () const |
| bool | isFinished () const |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable 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 agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agx::Real | getKineticEnergy (const agx::RigidBody *rb) |
| Get the kinetic energy for a rigid body. | |
| static agx::Real | getRotationalEnergy (const agx::RigidBody *rb) |
| Get the rotational part of the kinetic energy of a rigid body. | |
| static agx::Real | getTranslationalEnergy (const agx::RigidBody *rb) |
| Get the translational part of the kinetic energy of a rigid body. | |
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. | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Additional Inherited Members | |
Protected Member Functions inherited from agxStream::Serializable | |
| Serializable () | |
| Default constructor. | |
| Serializable (const Serializable &other) | |
| Copy constructor. | |
| void | generateUuid () |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
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 |
Keeps track of the energy flow in the system.
Definition at line 46 of file agxSDK/EnergyManager.h.
| void agxSDK::EnergyManager::add | ( | const agx::Constraint * | constraint | ) |
Enables energy calculations for a constraint.
| constraint | - The constraint. |
| void agxSDK::EnergyManager::add | ( | const agx::RigidBody * | rigidBody | ) |
Enables energy calculations for a rigid body.
| rigidBody | - The rigid body. |
| agxSDK::EnergyManager::AGXSTREAM_DECLARE_SERIALIZABLE_BASE | ( | agxSDK::EnergyManager | ) |
|
inlinestatic |
Definition at line 50 of file agxSDK/EnergyManager.h.
| agx::Real agxSDK::EnergyManager::getDissipation | ( | const agx::Constraint * | constraint | ) | const |
Get the dissipation for a constraint during the last timestep.
| constraint | - The constraint. |
| agx::Real agxSDK::EnergyManager::getDissipation | ( | const agx::ElementaryConstraint * | constraint | ) | const |
Get the dissipation for a secondary constraint during the last timestep.
| constraint | - The secondary constraint. |
| agx::Real agxSDK::EnergyManager::getDissipation | ( | const agx::RigidBody * | rb | ) | const |
Get the dissipation from linear and angular velocity damping and external forces.
All external forces is considered to be dissipative.
| rb | - The rigid body. |
|
static |
Get the kinetic energy for a rigid body.
| rb | - The rigid body. |
| agx::Real agxSDK::EnergyManager::getKineticEnergyChange | ( | const agx::RigidBody * | rb | ) | const |
Get the change in kinetic energy for a rigid body during the last time step.
| rb | - The rigid body. |
| agx::Real agxSDK::EnergyManager::getPotentialChange | ( | const agx::Constraint * | constraint | ) | const |
Get the change in potential for a constraint during the last timestep.
| constraint | - The constraint. |
| agx::Real agxSDK::EnergyManager::getPotentialChange | ( | const agx::ElementaryConstraint * | constraint | ) | const |
Get the change in potential for a secondary constraint during the last timestep.
| constraint | - The secondary constraint. |
| agx::Real agxSDK::EnergyManager::getPotentialChange | ( | const agx::RigidBody * | rb | ) | const |
Get the change in gravity potential for a rigid body during the last timestep.
| rb | - The rigid body. |
| agx::Real agxSDK::EnergyManager::getPower | ( | const agx::ElementaryConstraint * | motor | ) | const |
Get the power from a constraint motor.
The motor can be a Motor1D or an ElectricMotorController.
| motor | - The constraint motor. |
|
static |
Get the rotational part of the kinetic energy of a rigid body.
| rb | - The rigid body. |
| agx::Real agxSDK::EnergyManager::getRotationalEnergyChange | ( | const agx::RigidBody * | rb | ) | const |
Get the change in kinetic energy from the rotational motion for a rigid body during the last time step.
| rb | - The rigid body. |
|
static |
Get the translational part of the kinetic energy of a rigid body.
| rb | - The rigid body. |
| agx::Real agxSDK::EnergyManager::getTranslationalEnergyChange | ( | const agx::RigidBody * | rb | ) | const |
Get the change in kinetic energy from the translational motion for a rigid body during the last time step.
| rb | - The rigid body. |
| void agxSDK::EnergyManager::remove | ( | const agx::Constraint * | constraint | ) |
Removes the constraint from the EnergyManager.
| constraint | - The constraint to be removed. |
| void agxSDK::EnergyManager::remove | ( | const agx::RigidBody * | rigidBody | ) |
Removes the rigid body from the EnergyManager.
| rigidBody | - The rigid body to be removed. |