AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxPowerLine::RotationalDimension Class Reference

The rotational has one rotational degree of freedom. More...

#include <RotationalDimension.h>

+ Inheritance diagram for agxPowerLine::RotationalDimension:

Public Member Functions

 RotationalDimension (agxPowerLine::Unit *unit, agx::RigidBody *body, agx::UInt8 slot)
 Virtual function so that an instance can find its own name and not the name of the base class.
 
 RotationalDimension (agxPowerLine::Unit *unit, agx::RigidBody *body, const agx::Vec3 &direction, agxPowerLine::DirectionReference directionReference, bool externalBody=false)
 Create a RotationalDimension whose direction can be relative to either the world or the body coordinate frame.
 
 RotationalDimension (Unit *unit)
 Create a RotationalDimension with a direction relative to the world coordinate frame.
 
 AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxPowerLine::RotationalDimension)
 
agx::Real getAngularVelocity () const
 
agx::Real getInertia () const
 
agx::Real getInputTorque () const
 
virtual agx::Real getMassProperty () const override
 
virtual agx::Real getOutputLoad () const override
 
agx::Real getOutputTorque () const
 
virtual agx::Real getPowerIn () const override
 
virtual agx::Real getPowerOut () const override
 
virtual std::string getTypeName () const override
 Virtual function so that an instance can find its own name and not the name of the base class.
 
virtual void renderDebug () override
 Render the axis of the dimension.
 
virtual bool restore (agxStream::StorageStream &in) override
 Restores internal data from stream.
 
void setAngularVelocity (agx::Real)
 
virtual void setAngularVelocityDamping (agx::Real damping)
 set the angular velocity damping.
 
virtual bool setInertia (agx::Real value)
 set the inertia of the rotational dimension.
 
virtual bool store (agxStream::StorageStream &out) const override
 Stores internal data into stream.
 
- Public Member Functions inherited from agxPowerLine::PhysicalDimension
virtual void addLoad (agx::Real load)
 Add a load to the dimension.
 
 AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agxPowerLine::PhysicalDimension)
 
virtual void calculateJacobian (agx::Jacobian6DOFElement *G, const agx::Real ratio, const size_t index) const
 Calculates jacobian for a physical dimension.
 
virtual void clear ()
 Clear all reference pointers.
 
bool connect (agxPowerLine::PhysicalDimension *otherDimension, agxPowerLine::Connector *connector)
 Connect to another dimension for possible power transfer.
 
agxPowerLine::detail::AbstractDimensionState1Dof * get1DofState ()
 Access the DimensionState as a 1-dimensional state.
 
const agxPowerLine::detail::AbstractDimensionState1Dof * get1DofState () const
 
agxPowerLine::detail::AbstractDimensionState3Dof * get3DofState ()
 Access the DimensionState as a 3-dimensional state.
 
const agxPowerLine::detail::AbstractDimensionState3Dof * get3DofState () const
 
size_t getBodyIndexIn (const RigidBodyPtrIntHashVector &bodyToIndexTable)
 
Connection * getConnection (const Connector *connector, agxPowerLine::Side side)
 Find the Connection object on the given side that connects to the given Connectors.
 
const Connection * getConnection (const Connector *connector, agxPowerLine::Side side) const
 
const agxPowerLine::ConnectionRefVector & getConnections (agxPowerLine::Side side) const
 
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation * getConstraint (size_t outputConnection=0) const
 
virtual agx::Real getGradient () const
 
Connection * getInputConnection (const Connector *connector)
 
const Connection * getInputConnection (const Connector *connector) const
 
Connection * getInputConnection (const Unit *unit)
 
const Connection * getInputConnection (const Unit *unit) const
 
agxPowerLine::Connection * getInputConnection (size_t inputIndex=0)
 
const agxPowerLine::Connection * getInputConnection (size_t inputIndex=0) const
 Traversing helper functions.
 
const agxPowerLine::ConnectionRefVector & getInputConnections () const
 
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation * getInputConstraint (size_t inputConnection=0) const
 
virtual agx::Real getInputLoad () const
 return the load in/out
 
virtual agx::Real getMassProperty () const
 returns the mass property of the dimension body.
 
const agx::Name & getName () const
 Returns the name of this PhysicalDimension instance.
 
size_t getNumConnections () const
 
size_t getNumConnections (agxPowerLine::Side side) const
 
size_t getNumInputConnections () const
 
size_t getNumOutputConnections () const
 
agx::RigidBody * getOrReserveBody ()
 Return a body that is guaranteed to not be shared with any other PhysicalDimension.
 
Connection * getOutputConnection (const Connector *connector)
 
const Connection * getOutputConnection (const Connector *connector) const
 
Connection * getOutputConnection (const Unit *unit)
 
const Connection * getOutputConnection (const Unit *unit) const
 
agxPowerLine::Connection * getOutputConnection (size_t outputIndex=0)
 
const agxPowerLine::Connection * getOutputConnection (size_t outputIndex=0) const
 
const agxPowerLine::ConnectionRefVector & getOutputConnections () const
 
virtual agx::Real getOutputLoad () const
 
virtual agx::Real getPowerIn () const
 return the power in/out
 
virtual agx::Real getPowerOut () const
 
agx::RigidBody * getReservedBody ()
 Return a body that is guaranteed to not be shared with any other PhysicalDimension.
 
const agx::RigidBody * getReservedBody () const
 
virtual agx::Real getSecondGradient () const
 
agxPowerLine::detail::DimensionState * getState ()
 Provides direct access to the underlying DimensionState.
 
const agxPowerLine::detail::DimensionState * getState () const
 
agxPowerLine::PhysicalDimension::Type getType () const
 returns the PhysicalDimension::Type of this dimension
 
virtual std::string getTypeName () const
 Returns the dimension type name of this PhysicalDimension instance.
 
agxPowerLine::Unit * getUnit ()
 
const agxPowerLine::Unit * getUnit () const
 Returns pointer to the Unit that contains this dimension.
 
virtual agx::Real getValue () const
 Physical properties of the dimension.
 
float getVelocityDamping () const
 
agx::Vec3 getWorldDirection () const
 
bool hasReservedBody () const
 
bool isExternalBody () const
 Return true if the body that defines the dimension was given to the Power- Line, false if the body was created by the PowerLine.
 
virtual void renderDebug ()
 Implement this to render Your physical dimension.
 
void reserveBody ()
 Ensure that this PhysicalDimension does not share it's body with any other PhysicalDimension.
 
virtual void restore (agxStream::InputArchive &in) override
 
void restore (agxStream::InputArchive &in, agx::RigidBody *&body, bool &externalBody)
 
virtual bool restore (agxStream::StorageStream &in)
 Restores internal data from stream.
 
virtual void setGradient (agx::Real value)
 
virtual void setMassProperty (agx::Real massProperty)
 Set the mass property of the dimension.
 
void setName (const agx::Name &name)
 
virtual void setValue (agx::Real value)
 
void setVelocityDamping (float damping)
 
virtual void store (agxStream::OutputArchive &out) const override
 
virtual bool store (agxStream::StorageStream &str) const
 Stores internal data into stream.
 
- 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.
 
- 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.
 

Static Public Member Functions

static agxStream::Serializable * create (agxStream::InputArchive &)
 
static agxPowerLine::PhysicalDimension::Type getStaticType ()
 
static std::string getStaticTypeName ()
 Each class inheriting from agxPowerLine::PhysicalDimension has to have a static function returning a unique name.
 
- Static Public Member Functions inherited from agxPowerLine::PhysicalDimension
static int getNumberOfPhysicalDimensions ()
 
static agxPowerLine::PhysicalDimension::Type getStaticType ()
 
static std::string getStaticTypeName ()
 Returns the dimension type name of PhysicalDimension.
 
- 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.
 

Protected Member Functions

 RotationalDimension ()
 
virtual ~RotationalDimension ()
 
void postUpdate (agx::Real timeStep)
 
- Protected Member Functions inherited from agxPowerLine::PhysicalDimension
 PhysicalDimension ()
 
 PhysicalDimension (agxPowerLine::Unit *unit, agxPowerLine::PhysicalDimension::Type type, agxPowerLine::detail::DimensionState *state)
 
virtual ~PhysicalDimension ()
 
void addNotification (agxPowerLine::PowerLine *powerLine)
 
void addNotification (agxSDK::Simulation *simulation)
 Called when the Unit owning this PhysicalDimension is added to a simulation.
 
void addToListOfDimensions ()
 Add to singleton that controls the different types of physical dimensions.
 
agxPowerLine::ConnectionRefVector & getConnectionsWritable (agxPowerLine::Side side)
 
bool removeInputConnection (Connection *connection)
 
void removeNotification (agxPowerLine::PowerLine *powerLine)
 
void removeNotification (agxSDK::Simulation *simulation)
 
virtual void removeNotification (agxSDK::Simulation *simulation, agxUtil::ConstraintHolder *constraintHolder)
 Remove the PhysicalDimension from the simulation.
 
bool removeOutputConnection (Connection *connection)
 
bool restore (agxStream::StorageStream &in, const agx::Vec3 *direction)
 Some serialization versions stored the dimension axis direction in classes deriving from PhysicalDimension.
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor.
 
 Serializable (const Serializable &other)
 Copy constructor.
 
void generateUuid ()
 

Additional Inherited Members

- Public Types inherited from agxPowerLine::PhysicalDimension
typedef int Type
 
typedef agx::Vector< Type > TypeVector
 
- 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 agxPowerLine::PhysicalDimension
ConnectionRefVector m_inputConnections
 
agx::Name m_name
 
ConnectionRefVector m_outputConnections
 
agxPowerLine::detail::PhysicalDimensionStateRef m_state
 
PhysicalDimension::Type m_type
 
Unit * m_unit
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

The rotational has one rotational degree of freedom.

It has an angle as value, angular velocity as gradient and angular acceleration as second gradient.

Definition at line 44 of file RotationalDimension.h.

Constructor & Destructor Documentation

◆ RotationalDimension() [1/4]

agxPowerLine::RotationalDimension::RotationalDimension ( Unit *  unit)

Create a RotationalDimension with a direction relative to the world coordinate frame.

◆ RotationalDimension() [2/4]

agxPowerLine::RotationalDimension::RotationalDimension ( agxPowerLine::Unit *  unit,
agx::RigidBody *  body,
agx::UInt8  slot 
)

Virtual function so that an instance can find its own name and not the name of the base class.

◆ RotationalDimension() [3/4]

agxPowerLine::RotationalDimension::RotationalDimension ( agxPowerLine::Unit *  unit,
agx::RigidBody *  body,
const agx::Vec3 &  direction,
agxPowerLine::DirectionReference  directionReference,
bool  externalBody = false 
)

Create a RotationalDimension whose direction can be relative to either the world or the body coordinate frame.

◆ RotationalDimension() [4/4]

agxPowerLine::RotationalDimension::RotationalDimension ( )
protected

◆ ~RotationalDimension()

virtual agxPowerLine::RotationalDimension::~RotationalDimension ( )
protectedvirtual

Member Function Documentation

◆ AGXSTREAM_DECLARE_SERIALIZABLE_BASE()

agxPowerLine::RotationalDimension::AGXSTREAM_DECLARE_SERIALIZABLE_BASE ( agxPowerLine::RotationalDimension  )

◆ create()

static agxStream::Serializable * agxPowerLine::RotationalDimension::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 120 of file RotationalDimension.h.

◆ getAngularVelocity()

agx::Real agxPowerLine::RotationalDimension::getAngularVelocity ( ) const

◆ getInertia()

agx::Real agxPowerLine::RotationalDimension::getInertia ( ) const

◆ getInputTorque()

agx::Real agxPowerLine::RotationalDimension::getInputTorque ( ) const

◆ getMassProperty()

virtual agx::Real agxPowerLine::RotationalDimension::getMassProperty ( ) const
overridevirtual
Returns
the inertia of the rotational dimension.

Reimplemented from agxPowerLine::PhysicalDimension.

◆ getOutputLoad()

virtual agx::Real agxPowerLine::RotationalDimension::getOutputLoad ( ) const
overridevirtual
Returns
input/output torque

Reimplemented from agxPowerLine::PhysicalDimension.

◆ getOutputTorque()

agx::Real agxPowerLine::RotationalDimension::getOutputTorque ( ) const

◆ getPowerIn()

virtual agx::Real agxPowerLine::RotationalDimension::getPowerIn ( ) const
overridevirtual
Returns
power in/out of the rotational dof.

Reimplemented from agxPowerLine::PhysicalDimension.

◆ getPowerOut()

virtual agx::Real agxPowerLine::RotationalDimension::getPowerOut ( ) const
overridevirtual

Reimplemented from agxPowerLine::PhysicalDimension.

◆ getStaticType()

static agxPowerLine::PhysicalDimension::Type agxPowerLine::RotationalDimension::getStaticType ( )
static

◆ getStaticTypeName()

static std::string agxPowerLine::RotationalDimension::getStaticTypeName ( )
static

Each class inheriting from agxPowerLine::PhysicalDimension has to have a static function returning a unique name.

The rotational dimension has the name "ROTATIONAL".

◆ getTypeName()

virtual std::string agxPowerLine::RotationalDimension::getTypeName ( ) const
overridevirtual

Virtual function so that an instance can find its own name and not the name of the base class.

Reimplemented from agxPowerLine::PhysicalDimension.

◆ postUpdate()

void agxPowerLine::RotationalDimension::postUpdate ( agx::Real  timeStep)
protected

◆ renderDebug()

virtual void agxPowerLine::RotationalDimension::renderDebug ( )
overridevirtual

Render the axis of the dimension.

Reimplemented from agxPowerLine::PhysicalDimension.

◆ restore()

virtual bool agxPowerLine::RotationalDimension::restore ( agxStream::StorageStream &  in)
overridevirtual

Restores internal data from stream.

Reimplemented from agxPowerLine::PhysicalDimension.

Reimplemented in agxPowerLine::ActuatorRotationalDimension.

◆ setAngularVelocity()

void agxPowerLine::RotationalDimension::setAngularVelocity ( agx::Real  )

◆ setAngularVelocityDamping()

virtual void agxPowerLine::RotationalDimension::setAngularVelocityDamping ( agx::Real  damping)
virtual

set the angular velocity damping.

◆ setInertia()

virtual bool agxPowerLine::RotationalDimension::setInertia ( agx::Real  value)
virtual

set the inertia of the rotational dimension.

Return values
Wasit successful?

◆ store()

virtual bool agxPowerLine::RotationalDimension::store ( agxStream::StorageStream &  out) const
overridevirtual

Stores internal data into stream.

Reimplemented from agxPowerLine::PhysicalDimension.

Reimplemented in agxPowerLine::ActuatorRotationalDimension.


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