AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxPowerLine::PhysicalDimension Class Referenceabstract

Pure virtual class. More...

#include <PhysicalDimension.h>

+ Inheritance diagram for agxPowerLine::PhysicalDimension:

Public Types

typedef int Type
 
typedef agx::Vector< Type > TypeVector
 

Public Member Functions

virtual void addLoad (agx::Real load)
 Add a load to the dimension. More...
 
 AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agxPowerLine::PhysicalDimension)
 
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, const agx::Real ratio, const size_t index) const
 Calculates jacobian for a physical dimension. More...
 
virtual void clear ()
 Clear all reference pointers. More...
 
bool connect (agxPowerLine::PhysicalDimension *otherDimension, agxPowerLine::Connector *connector)
 Connect to another dimension for possible power transfer. More...
 
agxPowerLine::detail::AbstractDimensionState1Dof * get1DofState ()
 Access the DimensionState as a 1-dimensional state. More...
 
const
agxPowerLine::detail::AbstractDimensionState1Dof * 
get1DofState () const
 
agxPowerLine::detail::AbstractDimensionState3Dof * get3DofState ()
 Access the DimensionState as a 3-dimensional state. More...
 
const
agxPowerLine::detail::AbstractDimensionState3Dof * 
get3DofState () const
 
size_t getBodyIndexIn (const RigidBodyPtrIntHashVector &bodyToIndexTable)
 
virtual const char * getClassName () const
 
const
agxPowerLine::ConnectionRefVector & 
getConnections (agxPowerLine::Side side) const
 
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation * getConstraint (size_t outputConnection=0) const
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
virtual agx::Real getGradient () const
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
const agxPowerLine::Connection * getInputConnection (size_t inputIndex=0) const
 Traversing helper functions. More...
 
Connection * getInputConnection (const Connector *connector)
 
Connection * getInputConnection (const Unit *unit)
 
const Connection * getInputConnection (const Connector *connector) const
 
const Connection * getInputConnection (const Unit *unit) const
 
agxPowerLine::Connection * getInputConnection (size_t inputIndex=0)
 
const
agxPowerLine::ConnectionRefVector & 
getInputConnections () const
 
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation * getInputConstraint (size_t inputConnection=0) const
 
virtual agx::Real getInputLoad () const
 return the load in/out More...
 
virtual agx::Real getMassProperty () const
 returns the mass property of the dimension body. More...
 
const agx::Name & getName () const
 Returns the name of this PhysicalDimension instance. More...
 
size_t getNumConnections (agxPowerLine::Side side) const
 
size_t getNumConnections () 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. More...
 
const agxPowerLine::Connection * getOutputConnection (size_t outputIndex=0) const
 
Connection * getOutputConnection (const Connector *connector)
 
Connection * getOutputConnection (const Unit *unit)
 
const Connection * getOutputConnection (const Connector *connector) const
 
const Connection * getOutputConnection (const Unit *unit) const
 
agxPowerLine::Connection * getOutputConnection (size_t outputIndex=0)
 
const
agxPowerLine::ConnectionRefVector & 
getOutputConnections () const
 
virtual agx::Real getOutputLoad () const
 
virtual agx::Real getPowerIn () const
 return the power in/out More...
 
virtual agx::Real getPowerOut () const
 
int getReferenceCount () const
 
agx::RigidBody * getReservedBody ()
 Return a body that is guaranteed to not be shared with any other PhysicalDimension. More...
 
const agx::RigidBody * getReservedBody () const
 
virtual agx::Real getSecondGradient () const
 
agxPowerLine::detail::DimensionState * getState ()
 Provides direct access to the underlying DimensionState. More...
 
const
agxPowerLine::detail::DimensionState * 
getState () const
 
virtual StorageAgent * getStorageAgent () const =0
 
agxPowerLine::PhysicalDimension::Type getType () const
 returns the PhysicalDimension::Type of this dimension More...
 
virtual std::string getTypeName () const
 Returns the dimension type name of this PhysicalDimension instance. More...
 
const agxPowerLine::Unit * getUnit () const
 Returns pointer to the Unit that contains this dimension. More...
 
agxPowerLine::Unit * getUnit ()
 
agx::Uuid getUuid () const
 
virtual agx::Real getValue () const
 Physical properties of the dimension. More...
 
float getVelocityDamping () const
 
agx::Vec3 getWorldDirection () const
 
bool hasReservedBody () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
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. More...
 
bool isFinished () const
 
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 renderDebug ()
 Implement this to render Your physical dimension. More...
 
void reserveBody ()
 Ensure that this PhysicalDimension does not share it's body with any other PhysicalDimension. More...
 
virtual bool restore (agxStream::StorageStream &in)
 Restores internal data from stream. More...
 
virtual void restore (agxStream::InputArchive &in) override
 
void restore (agxStream::InputArchive &in, agx::RigidBody *&body, bool &externalBody)
 
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 value)
 
virtual void setMassProperty (agx::Real massProperty)
 Set the mass property of the dimension. More...
 
void setName (const agx::Name &name)
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 
virtual void setValue (agx::Real value)
 
void setVelocityDamping (float damping)
 
virtual bool store (agxStream::StorageStream &str) const
 Stores internal data into stream. More...
 
virtual void store (agxStream::OutputArchive &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 int getNumberOfPhysicalDimensions ()
 
static
agxPowerLine::PhysicalDimension::Type 
getStaticType ()
 
static std::string getStaticTypeName ()
 Returns the dimension type name of PhysicalDimension. More...
 
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

 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. More...
 
void addToListOfDimensions ()
 Add to singleton that controls the different types of physical dimensions. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
void generateUuid ()
 
agxPowerLine::ConnectionRefVector & getConnectionsWritable (agxPowerLine::Side side)
 
bool removeInputConnection (Connection *connection)
 
void removeNotification (agxPowerLine::PowerLine *powerLine)
 
void removeNotification (agxSDK::Simulation *simulation)
 Called when the Unit owning this PhysicalDimension is removed from a simulation. More...
 
virtual void removeNotification (agxSDK::Simulation *simulation, agxUtil::ConstraintHolder *constraintHolder)
 Remove the PhysicalDimension from the simulation. More...
 
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. More...
 

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

ConnectionRefVector m_inputConnections
 
Mutex m_mutex
 
agx::Name m_name
 
ObserverContainer m_observers
 
ConnectionRefVector m_outputConnections
 
AtomicValue m_refCount
 
agxPowerLine::detail::PhysicalDimensionStateRef m_state
 
PhysicalDimension::Type m_type
 
Unit * m_unit
 

Detailed Description

Pure virtual class.

Base class for representation of one physical dimension. It contains one 1D body(right now it is a agx::RigidBody that is potentially shared with other PhysicalDimensions), that is used in the dynamics solve.

The dimension could be for example a 1D position or a 1D rotation. The dimension has a:

  1. value (position for translational position)
  2. gradient (speed for translational position)
  3. second gradient (acceleration for translational position)

Definition at line 93 of file PhysicalDimension.h.

Member Typedef Documentation

Definition at line 96 of file PhysicalDimension.h.

Constructor & Destructor Documentation

agxPowerLine::PhysicalDimension::PhysicalDimension ( )
protected
agxPowerLine::PhysicalDimension::PhysicalDimension ( agxPowerLine::Unit *  unit,
agxPowerLine::PhysicalDimension::Type  type,
agxPowerLine::detail::DimensionState *  state 
)
protected
virtual agxPowerLine::PhysicalDimension::~PhysicalDimension ( )
protectedvirtual

Member Function Documentation

virtual void agxPowerLine::PhysicalDimension::addLoad ( agx::Real  load)
virtual

Add a load to the dimension.

The effect depends on the type of the dimension.

void agxPowerLine::PhysicalDimension::addNotification ( agxPowerLine::PowerLine *  powerLine)
protected
void agxPowerLine::PhysicalDimension::addNotification ( agxSDK::Simulation *  simulation)
protected

Called when the Unit owning this PhysicalDimension is added to a simulation.

The body backing this PhysicalDimension is then added to the same simulation.

void agxPowerLine::PhysicalDimension::addToListOfDimensions ( )
protected

Add to singleton that controls the different types of physical dimensions.

(PowerLineDimensionNameSingleton)

agxPowerLine::PhysicalDimension::AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE ( agxPowerLine::PhysicalDimension  )
void agx::Referenced::allocateObserverVector ( ) const
protectedinherited
template<typename T >
T* agx::Referenced::as ( )
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().

template<typename T >
const T* agx::Referenced::as ( ) const
inherited
template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited
virtual void agxPowerLine::PhysicalDimension::calculateJacobian ( agx::Jacobian6DOFElement *  G,
const agx::Real  ratio,
const size_t  index 
) const
virtual

Calculates jacobian for a physical dimension.

Parameters
G- Array of Jacobian elements to be filled in.
ratio- Scaling to apply in order to convert the dimension's unit direction to a constraint Jacobian.
index- Index in G to write to.
virtual void agxPowerLine::PhysicalDimension::clear ( )
virtual

Clear all reference pointers.

bool agxPowerLine::PhysicalDimension::connect ( agxPowerLine::PhysicalDimension *  otherDimension,
agxPowerLine::Connector *  connector 
)

Connect to another dimension for possible power transfer.

Parameters
otherDimension- a physical dimension with a body defining another dof.
connector- defines the constraint between the dimensions
void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited
void agxStream::Serializable::generateUuid ( )
protectedinherited
agxPowerLine::detail::AbstractDimensionState1Dof* agxPowerLine::PhysicalDimension::get1DofState ( )

Access the DimensionState as a 1-dimensional state.

Will return nullptr if the PhysicalDimension has a 3-dimensional DimensionState.

See Also
get3DofState
const agxPowerLine::detail::AbstractDimensionState1Dof* agxPowerLine::PhysicalDimension::get1DofState ( ) const
agxPowerLine::detail::AbstractDimensionState3Dof* agxPowerLine::PhysicalDimension::get3DofState ( )

Access the DimensionState as a 3-dimensional state.

Will return nullptr if the PhysicalDimension has a 1-dimensional DimensionState.

See Also
get1DofState
const agxPowerLine::detail::AbstractDimensionState3Dof* agxPowerLine::PhysicalDimension::get3DofState ( ) const
size_t agxPowerLine::PhysicalDimension::getBodyIndexIn ( const RigidBodyPtrIntHashVector &  bodyToIndexTable)
virtual const char* agxStream::Serializable::getClassName ( ) const
virtualinherited
Returns
the class name of this class.

Reimplemented in agxWire::StopNode, agxWire::ConnectingNode, agxWire::EyeNode, agxWire::BodyFixedNode, agx::RigidBody, agx::Twist, agxWire::FreeNode, agx::ScrewController, agx::LockController, agxModel::WaterWrapper, agx::MergedBody, agx::MergedBody, agxModel::ConstantWindGenerator, agx::RangeController, agxModel::ConstantWaterFlowGenerator, agx::MergedBody, agx::ElectricMotorController, agx::MergedBody, agx::FrictionController, agx::MergedBody, agx::TargetSpeedController, agxModel::WindAndWaterController, agxSDK::Assembly, agx::QuatLock, agx::SphericalRel, agx::Spherical, agxWire::WireSimpleDrumController, agx::Dot2, agxModel::FractureAlgorithmBreakOnStress, agx::Swing, agxModel::FractureAlgorithmBreakOnContactForce, agx::Dot1, agxModel::FractureAlgorithmBreakOnContact, agx::Frame, agxPowerLine::detail::DimensionState3Dof< DimensionType >, agxUtil::ConstraintHolder, agxDriveTrain::PidControlledEngine, agxCable::CableDamage, agxControl::TeleportToSensorOperation, agxCollide::Geometry, agxDriveTrain::deprecated::Clutch, agxModel::Terrain, agxModel::TerrainDataInterface, agx::ObserverFrame, agxControl::StoreParticlesOperation, agxModel::SlidingNodeAttachment, agxDriveTrain::deprecated::GearBox, agxControl::EventSensor, agxPowerLine::Connection, agxModel::FractureGenerator, agxControl::LoadParticleAGXFileOperation, agxPowerLine::TranslationalConstraintImplementation, agxModel::RotatingNodeAttachment, agxModel::TwoBodyTire, agxPowerLine::detail::DimensionState1Dof< DimensionType >, agxModel::Deformable1DNodeRoute, agxPowerLine::ElementaryTranslationalConstraint, agxControl::SetVelocityOperation, agx::AddedMassInteraction, agxPowerLine::TranslationalActuator, agxDriveTrain::RpmController, agx::RigidBodyAttachment, agxVehicle::Track, agxModel::RigidNodeAttachment, agxControl::WriteParticleDataToAGXOperation, agxModel::TerrainIterativeProjectedConeFrictionModel, agxModel::Deformable1DSphereGeometryFactory, agxModel::DeformableParticleCreator, agxPowerLine::GearConstraintImplementation, agxControl::MakeParticleKinematicOperation, agxModel::ConvexSoil, agx::IterativeProjectedConeFriction, agxSDK::SimulationStatisticsListener, agxSDK::LinkedStructure, agx::ConstantNormalForceOrientedBoxFrictionModel, agxDriveTrain::deprecated::FixedGear, agxVehicle::TrackProperties, agxHydraulics::HydraulicPumpActuator, agxPowerLine::ElementaryGearConstraint, agxModel::Deformable1DPointRoute, agxModel::PointNodeAttachment, agx::PropertyContainer, agxModel::SoilParticle, agxSDK::MaterialManager::MaterialManagerSerializer, agxModel::Deformable1DCylinderGeometryFactory, agxDriveTrain::deprecated::HighLevelDifferential, agxPowerLine::TorqueGenerator, agxPowerLine::PowerLine, agx::ScaleBoxFrictionModel, agxHydraulics::PistonActuator, agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation, agx::SeparationAngle, agxWire::ConvexAreaDefinition, agxCollide::Trimesh, agxControl::LoadParticleJournalOperation, agxControl::ReplaceParticleMaterialOperation, agxWire::ShapeContactNode, agxModel::Deformable1DCapsuleGeometryFactory, agx::CubicSplineLookupTable, agxHydraulics::HydraulicMotorActuator, agxSDK::GeometryContactMergeSplitThresholds, agxDriveTrain::deprecated::TorqueConverterTable, agxDriveTrain::HolonomicGear, agxModel::Deformable1DNode, agx::BoxFrictionModel, agxPowerLine::RotationalConnector, agxWire::CircularAreaDefinition, agxPowerLine::ActuatorBodyUnit, agxPowerLine::RotationalActuator, agxModel::Deformable1DBulkProperties, agx::Attachment, agxModel::Deformable1D, agx::GranularImpactDataWriter, agxPowerLine::PowerTimeIntegralLookupTable, agx::WheelJoint, agx::OrientedIterativeProjectedConeFrictionModel, agxControl::ParticleContactDumper, agxDriveTrain::deprecated::TorqueConverter, agxCable::Route, agx::Hinge, agx::RotationalAngle, agx::CubicFunction2D, agxControl::RecordParticleShapshotJournalOperation, agxDriveTrain::deprecated::HighLevelGearBox, agxTerrain::TerrainRasterizer, agxVehicle::Wheel, agxControl::SensorOperation, agxHydraulics::FlowDimension, agxModel::HeightFieldDeformerJournalRecorder, agxModel::ParticleAttributes, agxDriveTrain::Engine, agxWire::EyeNodeArea, agxModel::SurfaceVelocityConveyorBelt, agxCable::PathRoute, agx::WorldFrameBallJoint, agx::OrientedScaleBoxFrictionModel, agxPowerLine::LinearLookupTable, agxCollide::Line, agxDriveTrain::Differential, agxVehicle::TrackRoute, agxCollide::RenderMaterial, agxControl::MeasurementSensor, agxModel::DeformableMineFace, agx::AutoSleepThreshold, agxCollide::CollisionGroupManager, agxControl::ColorParticles, agxHydraulics::NeedleValve, agxModel::DeformableParticleMesh, agxDriveTrain::ElectricMotor, agxDriveTrain::SlipGear, agxModel::OneBodyTire, agxPowerLine::ActuatorRotationalDimension, agxCable::SegmentingRoute, agx::LinearLookupTable, agx::MergeSplit, agxCollide::RenderData, agxControl::RecordParticleJournalOperation, agxPowerLine::RotationalTranslationalHolonomicConnector, agxUtil::RawMesh, agxPowerLine::RotationalDimension, agxModel::WindAndWaterController::WindGenerator, agx::Physics::GranularBodySystem, agx::Prismatic, agx::VirtualConstraintInertia, agx::OrientedBoxFrictionModel, agxModel::ThreeBodyTire, agxSDK::ConstraintMergeSplitThresholds, agx::RegularizationParameters, agxSDK::LinkedSegment, agxCollide::CollisionMeshData, agx::SphericalRelSlack, agx::SlackHingeJoint, agx::SlackLockJoint, agxDriveTrain::deprecated::HighLevelTorqueConverter, agxDriveTrain::GearBox, agxCollide::Plane, agxHydraulics::detail::GraphJoiningConnector, agxModel::Deformable1DBoxGeometryFactory, agx::CylindricalJoint, agxCable::CableDamageState, agxHydraulics::CheckValve, agxPowerLine::RotationalUnit, agx::BallJoint, agx::SlackPrismaticJoint, agx::Interaction, agx::DistanceJoint, agxPowerLine::SlotMapper, agxSDK::EventListener, agx::JournalCustomDataRecorder, agxControl::SensorEvent, agxSDK::StepEventListener, agxControl::TagOperation, agx::PrismaticUniversalJoint, agx::UniversalJoint, agxCollide::Convex, agx::SlackCylindricalJoint, agxCable::IdentityRoute, agxHydraulics::deprecated::PumpUnit, agxDriveTrain::Clutch, agxHydraulics::deprecated::MotorUnit, agxModel::HeightController, agxSDK::WireMergeSplitThresholds, agxModel::WindAndWaterController::WaterFlowGenerator, agxVehicle::TrackNode, agx::ContactTangent, agxDriveTrain::ElectricMotorConstraint, agx::LockJoint, agx::SwingTwistLock, agxCollide::WireShape, agxHydraulics::detail::SpoolValveConnector, agx::SleepThreshold, agxSDK::ConstraintMergeSplitAlgorithm, agxSDK::GeometryContactMergeSplitAlgorithm, agx::Dot2Slack, agxDriveTrain::Gear, agxPowerLine::RotationalTranslationalConnector, agxPowerLine::WireWinchActuator, agxSDK::WireMergeSplitAlgorithm, agxHydraulics::Accumulator, agxHydraulics::detail::GraphJoiningConstraintImplementation, agxModel::HeightFieldDeformer, agxDriveTrain::EnginePowerGenerator, agx::AngularLockJoint, agx::PointGravityField, agx::SplineJoint, agxControl::BaseRecordParticleJournalOperation, agx::Dot1Joint, agxPowerLine::detail::RigidBodyRotationalAttachmentSentry, agxControl::RemoveParticles, agxSDK::LinkedStructureComponent, agxDriveTrain::DifferentialLockConnector, agxDriveTrain::Shaft, agx::UniformGravityField, agxLua::LuaScriptOperation, agx::ParticleContactSensor, agxCollide::MeshData, agxDriveTrain::deprecated::TorqueConverterSpeedRatioLookup, agxSDK::Collection, agx::ContactNormal, agxHydraulics::detail::ElementaryGraphJoiningConstraint, agxPowerLine::detail::WireWinchConnectorConstraintImplementation, agx::MergeSplitBodyStorage, agx::StrongInteractionConstraint, agxSDK::EnergyManager, agx::PlaneJoint, agx::ParticleSink, agx::Dot1Slack, agxDriveTrain::ElectricMotorConstraintImplementation, agxSDK::GranularContactMergeSplitAlgorithm, agxControl::SplitSensorOperation, agxDriveTrain::EngineDampingUpdater, agxControl::RemoveRigidBody, agxPowerLine::detail::WireWinchConnector, agxPowerLine::detail::ElementaryWireWinchConnectorConstraint, agxPowerLine::detail::RigidBodyTranslationalAttachmentSentry, agxSDK::MergedBodyMergeSplitAlgorithm, agxCable::RoutingNode, agxCable::CablePlasticity, agxHydraulics::detail::SpoolValveStaticFlowUnit, agxModel::PlasticityComponent, and agxCable::GeometryFactory.

Referenced by agxStream::InputArchive::readRef().

const agxPowerLine::ConnectionRefVector& agxPowerLine::PhysicalDimension::getConnections ( agxPowerLine::Side  side) const
agxPowerLine::ConnectionRefVector& agxPowerLine::PhysicalDimension::getConnectionsWritable ( agxPowerLine::Side  side)
protected
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation* agxPowerLine::PhysicalDimension::getConstraint ( size_t  outputConnection = 0) const
Returns
pointer to a constraint going out from this dimension (one constraint for each output connection)
static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.
bool agxStream::Serializable::getEnableSerialization ( ) const
inherited
Returns
true if serialization is enabled for this object

Definition at line 273 of file Serializable.h.

bool agxStream::Serializable::getEnableUuidGeneration ( )
inherited
Returns
true if Uuid:s should be generated for each new Serializable object
virtual agx::Real agxPowerLine::PhysicalDimension::getGradient ( ) const
virtual
agx::UInt32 agxStream::Serializable::getIndex ( ) const
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.

Returns
an instance index of this object. This is unique for the lifetime of this library instance.

Definition at line 247 of file Serializable.h.

const agxPowerLine::Connection* agxPowerLine::PhysicalDimension::getInputConnection ( size_t  inputIndex = 0) const

Traversing helper functions.

Has to be public. Do NOT use them.

Connection* agxPowerLine::PhysicalDimension::getInputConnection ( const Connector *  connector)
Connection* agxPowerLine::PhysicalDimension::getInputConnection ( const Unit *  unit)
const Connection* agxPowerLine::PhysicalDimension::getInputConnection ( const Connector *  connector) const
const Connection* agxPowerLine::PhysicalDimension::getInputConnection ( const Unit *  unit) const
agxPowerLine::Connection* agxPowerLine::PhysicalDimension::getInputConnection ( size_t  inputIndex = 0)
const agxPowerLine::ConnectionRefVector& agxPowerLine::PhysicalDimension::getInputConnections ( ) const
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation* agxPowerLine::PhysicalDimension::getInputConstraint ( size_t  inputConnection = 0) const
Returns
a constraint going into this dimension. It's properties are defined by the parent dimension.
virtual agx::Real agxPowerLine::PhysicalDimension::getInputLoad ( ) const
virtual

return the load in/out

Reimplemented in agxHydraulics::FlowDimension.

virtual agx::Real agxPowerLine::PhysicalDimension::getMassProperty ( ) const
virtual

returns the mass property of the dimension body.

( Inertia for the rotational dimension, mass for translational dimension, ... )

Reimplemented in agxPowerLine::RotationalDimension.

const agx::Name& agxPowerLine::PhysicalDimension::getName ( ) const

Returns the name of this PhysicalDimension instance.

There are two types of names for a PhysicalDimension: the instance name and the type name. The instance name can be set by the user and the type name is an indentifier for a type of PhysicalDimension. For example, all RotationalDimensions have the same type name but may have different instance names.

See Also
getTypeName
getActualTypeName
Returns
This PhysicalDimension's name.
static int agxPowerLine::PhysicalDimension::getNumberOfPhysicalDimensions ( )
static
Returns
the total number of different types of physical dimensions in the simulation
size_t agxPowerLine::PhysicalDimension::getNumConnections ( agxPowerLine::Side  side) const
size_t agxPowerLine::PhysicalDimension::getNumConnections ( ) const
size_t agxPowerLine::PhysicalDimension::getNumInputConnections ( ) const
size_t agxPowerLine::PhysicalDimension::getNumOutputConnections ( ) const
agx::RigidBody* agxPowerLine::PhysicalDimension::getOrReserveBody ( )

Return a body that is guaranteed to not be shared with any other PhysicalDimension.

May create a new body for this PhysicalDimension.

See Also
reserveBody
getReservedBody
const agxPowerLine::Connection* agxPowerLine::PhysicalDimension::getOutputConnection ( size_t  outputIndex = 0) const
Connection* agxPowerLine::PhysicalDimension::getOutputConnection ( const Connector *  connector)
Connection* agxPowerLine::PhysicalDimension::getOutputConnection ( const Unit *  unit)
const Connection* agxPowerLine::PhysicalDimension::getOutputConnection ( const Connector *  connector) const
const Connection* agxPowerLine::PhysicalDimension::getOutputConnection ( const Unit *  unit) const
agxPowerLine::Connection* agxPowerLine::PhysicalDimension::getOutputConnection ( size_t  outputIndex = 0)
const agxPowerLine::ConnectionRefVector& agxPowerLine::PhysicalDimension::getOutputConnections ( ) const
virtual agx::Real agxPowerLine::PhysicalDimension::getOutputLoad ( ) const
virtual
virtual agx::Real agxPowerLine::PhysicalDimension::getPowerIn ( ) const
virtual

return the power in/out

Reimplemented in agxHydraulics::FlowDimension, and agxPowerLine::RotationalDimension.

virtual agx::Real agxPowerLine::PhysicalDimension::getPowerOut ( ) const
virtual
int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.
agx::RigidBody* agxPowerLine::PhysicalDimension::getReservedBody ( )

Return a body that is guaranteed to not be shared with any other PhysicalDimension.

Will return nullptr if no such guarantee can be made.

See Also
reserveBody
const agx::RigidBody* agxPowerLine::PhysicalDimension::getReservedBody ( ) const
virtual agx::Real agxPowerLine::PhysicalDimension::getSecondGradient ( ) const
virtual
agxPowerLine::detail::DimensionState* agxPowerLine::PhysicalDimension::getState ( )

Provides direct access to the underlying DimensionState.

This should be considered an implementation detail and not called in user code.

const agxPowerLine::detail::DimensionState* agxPowerLine::PhysicalDimension::getState ( ) const
static agxPowerLine::PhysicalDimension::Type agxPowerLine::PhysicalDimension::getStaticType ( )
static
static std::string agxPowerLine::PhysicalDimension::getStaticTypeName ( )
static

Returns the dimension type name of PhysicalDimension.

This is a static method and should be called as PhysicalDimension::getTypeName and not using . or -> operator on a reference or pointer.

There are two types of names for a PhysicalDimension: the instance name and the type name. The instance name can be set by the user and the type name is an indentifier for a type of PhysicalDimension. For example, all RotationalDimensions have the same type name but may have different instance names.

Each class inheriting from agxModel::Physical dimension HAS TO HAVE a static function that returns a unique name. The power line name singleton will sort and index the different names. The reason for this is that a user could create a physical dimension of his/hers own. The default dimension has name "UNDEFINED"

See Also
getName
getActualTypeName
Returns
A string identifying the base PhysicalDimension type.
virtual StorageAgent* agxStream::Serializable::getStorageAgent ( ) const
pure virtualinherited
Returns
the storage agent

Implemented in agxWire::StopNode, agxWire::ConnectingNode, agxWire::EyeNode, agxWire::BodyFixedNode, agx::RigidBody, agx::Twist, agxWire::FreeNode, agx::ScrewController, agx::LockController, agxModel::WaterWrapper, agx::MergedBody, agx::MergedBody, agxModel::ConstantWindGenerator, agx::RangeController, agxModel::ConstantWaterFlowGenerator, agx::MergedBody, agx::ElectricMotorController, agx::MergedBody, agx::FrictionController, agx::MergedBody, agx::TargetSpeedController, agxModel::WindAndWaterController, agxSDK::Assembly, agx::QuatLock, agx::SphericalRel, agx::Spherical, agxWire::WireSimpleDrumController, agx::Dot2, agxModel::FractureAlgorithmBreakOnStress, agx::Swing, agxModel::FractureAlgorithmBreakOnContactForce, agx::Dot1, agxModel::FractureAlgorithmBreakOnContact, agx::Frame, agxPowerLine::detail::DimensionState3Dof< DimensionType >, agxUtil::ConstraintHolder, agxDriveTrain::PidControlledEngine, agxCable::CableDamage, agxControl::TeleportToSensorOperation, agxCollide::Geometry, agxDriveTrain::deprecated::Clutch, agxModel::Terrain, agxModel::TerrainDataInterface, agx::ObserverFrame, agxControl::StoreParticlesOperation, agxModel::SlidingNodeAttachment, agxDriveTrain::deprecated::GearBox, agxControl::EventSensor, agxPowerLine::Connection, agxModel::FractureGenerator, agxControl::LoadParticleAGXFileOperation, agxPowerLine::TranslationalConstraintImplementation, agxModel::RotatingNodeAttachment, agxModel::TwoBodyTire, agxModel::Deformable1DNodeRoute, agxPowerLine::detail::DimensionState1Dof< DimensionType >, agxPowerLine::ElementaryTranslationalConstraint, agxControl::SetVelocityOperation, agx::AddedMassInteraction, agxPowerLine::TranslationalActuator, agxDriveTrain::RpmController, agx::RigidBodyAttachment, agxVehicle::Track, agxModel::RigidNodeAttachment, agxControl::WriteParticleDataToAGXOperation, agxModel::TerrainIterativeProjectedConeFrictionModel, agxModel::Deformable1DSphereGeometryFactory, agxModel::DeformableParticleCreator, agxPowerLine::GearConstraintImplementation, agxControl::MakeParticleKinematicOperation, agxModel::ConvexSoil, agx::IterativeProjectedConeFriction, agxSDK::SimulationStatisticsListener, agxSDK::LinkedStructure, agx::ConstantNormalForceOrientedBoxFrictionModel, agxDriveTrain::deprecated::FixedGear, agxVehicle::TrackProperties, agxHydraulics::HydraulicPumpActuator, agxPowerLine::ElementaryGearConstraint, agxModel::Deformable1DPointRoute, agxModel::PointNodeAttachment, agx::PropertyContainer, agxModel::SoilParticle, agxSDK::MaterialManager::MaterialManagerSerializer, agxModel::Deformable1DCylinderGeometryFactory, agxDriveTrain::deprecated::HighLevelDifferential, agxPowerLine::TorqueGenerator, agxPowerLine::PowerLine, agx::ScaleBoxFrictionModel, agxHydraulics::PistonActuator, agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation, agx::SeparationAngle, agxWire::ConvexAreaDefinition, agxCollide::Trimesh, agxControl::LoadParticleJournalOperation, agxControl::ReplaceParticleMaterialOperation, agxWire::ShapeContactNode, agxModel::Deformable1DCapsuleGeometryFactory, agx::CubicSplineLookupTable, agxHydraulics::HydraulicMotorActuator, agxSDK::GeometryContactMergeSplitThresholds, agxDriveTrain::deprecated::TorqueConverterTable, agxDriveTrain::HolonomicGear, agxModel::Deformable1DNode, agx::BoxFrictionModel, agxPowerLine::RotationalConnector, agxWire::CircularAreaDefinition, agxPowerLine::ActuatorBodyUnit, agxPowerLine::RotationalActuator, agxModel::Deformable1DBulkProperties, agx::Attachment, agxModel::Deformable1D, agx::GranularImpactDataWriter, agxPowerLine::PowerTimeIntegralLookupTable, agx::WheelJoint, agx::OrientedIterativeProjectedConeFrictionModel, agxControl::ParticleContactDumper, agxDriveTrain::deprecated::TorqueConverter, agxCable::Route, agx::Hinge, agx::RotationalAngle, agx::CubicFunction2D, agxControl::RecordParticleShapshotJournalOperation, agxDriveTrain::deprecated::HighLevelGearBox, agxTerrain::TerrainRasterizer, agxVehicle::Wheel, agxControl::SensorOperation, agxHydraulics::FlowDimension, agxModel::HeightFieldDeformerJournalRecorder, agxModel::ParticleAttributes, agxDriveTrain::Engine, agxWire::EyeNodeArea, agxModel::SurfaceVelocityConveyorBelt, agxCable::PathRoute, agx::WorldFrameBallJoint, agx::OrientedScaleBoxFrictionModel, agxPowerLine::LinearLookupTable, agxCollide::Line, agxDriveTrain::Differential, agxVehicle::TrackRoute, agxCollide::RenderMaterial, agxControl::MeasurementSensor, agxModel::DeformableMineFace, agx::AutoSleepThreshold, agxCollide::CollisionGroupManager, agxControl::ColorParticles, agxHydraulics::NeedleValve, agxModel::DeformableParticleMesh, agxDriveTrain::ElectricMotor, agxDriveTrain::SlipGear, agxModel::OneBodyTire, agxPowerLine::ActuatorRotationalDimension, agxCable::SegmentingRoute, agx::LinearLookupTable, agx::MergeSplit, agxCollide::RenderData, agxControl::RecordParticleJournalOperation, agxPowerLine::RotationalTranslationalHolonomicConnector, agxUtil::RawMesh, agxPowerLine::RotationalDimension, agxModel::WindAndWaterController::WindGenerator, agx::Physics::GranularBodySystem, agx::Prismatic, agx::VirtualConstraintInertia, agx::OrientedBoxFrictionModel, agxModel::ThreeBodyTire, agxSDK::ConstraintMergeSplitThresholds, agx::RegularizationParameters, agxSDK::LinkedSegment, agxCollide::CollisionMeshData, agx::SphericalRelSlack, agx::SlackHingeJoint, agx::SlackLockJoint, agxDriveTrain::deprecated::HighLevelTorqueConverter, agxDriveTrain::GearBox, agxCollide::Plane, agxHydraulics::detail::GraphJoiningConnector, agxModel::Deformable1DBoxGeometryFactory, agx::CylindricalJoint, agxCable::CableDamageState, agxHydraulics::CheckValve, agxPowerLine::RotationalUnit, agx::BallJoint, agx::SlackPrismaticJoint, agx::Interaction, agx::DistanceJoint, agxPowerLine::SlotMapper, agxSDK::EventListener, agx::JournalCustomDataRecorder, agxControl::SensorEvent, agxSDK::StepEventListener, agxControl::TagOperation, agx::PrismaticUniversalJoint, agx::UniversalJoint, agxCollide::Convex, agx::SlackCylindricalJoint, agxCable::IdentityRoute, agxHydraulics::deprecated::PumpUnit, agxDriveTrain::Clutch, agxHydraulics::deprecated::MotorUnit, agxModel::HeightController, agxSDK::WireMergeSplitThresholds, agxModel::WindAndWaterController::WaterFlowGenerator, agxVehicle::TrackNode, agx::ContactTangent, agxDriveTrain::ElectricMotorConstraint, agx::LockJoint, agx::SwingTwistLock, agxCollide::WireShape, agxHydraulics::detail::SpoolValveConnector, agx::SleepThreshold, agxSDK::ConstraintMergeSplitAlgorithm, agxSDK::GeometryContactMergeSplitAlgorithm, agx::Dot2Slack, agxDriveTrain::Gear, agxPowerLine::RotationalTranslationalConnector, agxPowerLine::WireWinchActuator, agxSDK::WireMergeSplitAlgorithm, agxHydraulics::Accumulator, agxHydraulics::detail::GraphJoiningConstraintImplementation, agxModel::HeightFieldDeformer, agxDriveTrain::EnginePowerGenerator, agx::AngularLockJoint, agx::PointGravityField, agx::SplineJoint, agxControl::BaseRecordParticleJournalOperation, agx::Dot1Joint, agxControl::RemoveParticles, agxSDK::LinkedStructureComponent, agxDriveTrain::DifferentialLockConnector, agxDriveTrain::Shaft, agxPowerLine::detail::RigidBodyRotationalAttachmentSentry, agx::UniformGravityField, agxLua::LuaScriptOperation, agx::ParticleContactSensor, agxCollide::MeshData, agxDriveTrain::deprecated::TorqueConverterSpeedRatioLookup, agxSDK::Collection, agx::ContactNormal, agxHydraulics::detail::ElementaryGraphJoiningConstraint, agxPowerLine::detail::WireWinchConnectorConstraintImplementation, agx::MergeSplitBodyStorage, agx::StrongInteractionConstraint, agxSDK::EnergyManager, agx::PlaneJoint, agx::ParticleSink, agx::Dot1Slack, agxDriveTrain::ElectricMotorConstraintImplementation, agxSDK::GranularContactMergeSplitAlgorithm, agxControl::SplitSensorOperation, agxDriveTrain::EngineDampingUpdater, agxControl::RemoveRigidBody, agxPowerLine::detail::WireWinchConnector, agxPowerLine::detail::ElementaryWireWinchConnectorConstraint, agxSDK::MergedBodyMergeSplitAlgorithm, agxCable::RoutingNode, agxCable::CablePlasticity, agxHydraulics::detail::SpoolValveStaticFlowUnit, agxPowerLine::detail::RigidBodyTranslationalAttachmentSentry, agxModel::PlasticityComponent, and agxCable::GeometryFactory.

agxPowerLine::PhysicalDimension::Type agxPowerLine::PhysicalDimension::getType ( ) const

returns the PhysicalDimension::Type of this dimension

virtual std::string agxPowerLine::PhysicalDimension::getTypeName ( ) const
virtual

Returns the dimension type name of this PhysicalDimension instance.

If the this is a RotationalDimension, then the dimension type name of RotationalDimension is returned.

There are two types of names for a PhysicalDimension: the instance name and the type name. The instance name can be set by the user and the type name is an indentifier for a type of PhysicalDimension. For example, all RotationalDimensions have the same type name but may have different instance names.

Returns
The actual dimension type name of this PhysicalDimension.
See Also
getTypeName

Reimplemented in agxHydraulics::FlowDimension, and agxPowerLine::RotationalDimension.

const agxPowerLine::Unit* agxPowerLine::PhysicalDimension::getUnit ( ) const

Returns pointer to the Unit that contains this dimension.

agxPowerLine::Unit* agxPowerLine::PhysicalDimension::getUnit ( )
agx::Uuid agxStream::Serializable::getUuid ( ) const
inherited
Returns
a unique id for this instance.

Definition at line 268 of file Serializable.h.

virtual agx::Real agxPowerLine::PhysicalDimension::getValue ( ) const
virtual

Physical properties of the dimension.

Implement these in child class. (value is for example angle or position. gradient is velocity ...)

float agxPowerLine::PhysicalDimension::getVelocityDamping ( ) const
agx::Vec3 agxPowerLine::PhysicalDimension::getWorldDirection ( ) const
bool agxPowerLine::PhysicalDimension::hasReservedBody ( ) const
Returns
True if this PhysicalDimension has a reserved body, false otherwise.
template<typename T >
bool agx::Referenced::is ( ) const
inherited
bool agxPowerLine::PhysicalDimension::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.

bool agxStream::Serializable::isFinished ( ) const
inherited
Returns
true if this class is restored correctly and should not be deleted during destruction of an Archive.

Definition at line 252 of file Serializable.h.

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

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().

bool agxPowerLine::PhysicalDimension::removeInputConnection ( Connection *  connection)
protected
void agxPowerLine::PhysicalDimension::removeNotification ( agxPowerLine::PowerLine *  powerLine)
protected
void agxPowerLine::PhysicalDimension::removeNotification ( agxSDK::Simulation *  simulation)
protected

Called when the Unit owning this PhysicalDimension is removed from a simulation.

/

virtual void agxPowerLine::PhysicalDimension::removeNotification ( agxSDK::Simulation *  simulation,
agxUtil::ConstraintHolder *  constraintHolder 
)
protectedvirtual

Remove the PhysicalDimension from the simulation.

May only be called if there are no connections to or from the dimension.

bool agxPowerLine::PhysicalDimension::removeOutputConnection ( Connection *  connection)
protected
virtual void agxPowerLine::PhysicalDimension::renderDebug ( )
virtual

Implement this to render Your physical dimension.

Reimplemented in agxPowerLine::RotationalDimension.

void agxPowerLine::PhysicalDimension::reserveBody ( )

Ensure that this PhysicalDimension does not share it's body with any other PhysicalDimension.

A new body may be created for this PhysicalDimension in order to make that guarantee. Body sharing becomes disabled for this PhysicalDimension.

virtual bool agxPowerLine::PhysicalDimension::restore ( agxStream::StorageStream &  in)
virtual
virtual void agxPowerLine::PhysicalDimension::restore ( agxStream::InputArchive &  in)
overridevirtual
void agxPowerLine::PhysicalDimension::restore ( agxStream::InputArchive &  in,
agx::RigidBody *&  body,
bool &  externalBody 
)
bool agxPowerLine::PhysicalDimension::restore ( agxStream::StorageStream &  in,
const agx::Vec3 *  direction 
)
protected

Some serialization versions stored the dimension axis direction in classes deriving from PhysicalDimension.

When loading such classes from such streams the restoring derived class need to pass the direction into the parent class, since the parent class is unable to read it from the stream.

static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

void agxStream::Serializable::setEnableSerialization ( bool  flag)
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.

static void agxStream::Serializable::setEnableUuidGeneration ( bool  flag)
staticinherited

Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.

void agxStream::Serializable::setFinished ( )
inherited

Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.

virtual void agxPowerLine::PhysicalDimension::setGradient ( agx::Real  value)
virtual
virtual void agxPowerLine::PhysicalDimension::setMassProperty ( agx::Real  massProperty)
virtual

Set the mass property of the dimension.

void agxPowerLine::PhysicalDimension::setName ( const agx::Name &  name)
void agxStream::Serializable::setUuid ( const agx::Uuid &  uuid)
inherited

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!

virtual void agxPowerLine::PhysicalDimension::setValue ( agx::Real  value)
virtual
void agxPowerLine::PhysicalDimension::setVelocityDamping ( float  damping)
virtual bool agxPowerLine::PhysicalDimension::store ( agxStream::StorageStream &  str) const
virtual
virtual void agxPowerLine::PhysicalDimension::store ( agxStream::OutputArchive &  out) const
overridevirtual
void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

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.

void agx::Referenced::unreference_nodelete ( ) const
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.

template<typename T >
static bool agx::Referenced::ValidateCast ( const Referenced *  object)
staticinherited

Member Data Documentation

ConnectionRefVector agxPowerLine::PhysicalDimension::m_inputConnections
protected

Definition at line 437 of file PhysicalDimension.h.

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

agx::Name agxPowerLine::PhysicalDimension::m_name
protected

Definition at line 441 of file PhysicalDimension.h.

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

ConnectionRefVector agxPowerLine::PhysicalDimension::m_outputConnections
protected

Definition at line 438 of file PhysicalDimension.h.

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

agxPowerLine::detail::PhysicalDimensionStateRef agxPowerLine::PhysicalDimension::m_state
protected

Definition at line 440 of file PhysicalDimension.h.

PhysicalDimension::Type agxPowerLine::PhysicalDimension::m_type
protected

Definition at line 436 of file PhysicalDimension.h.

Unit* agxPowerLine::PhysicalDimension::m_unit
protected

Definition at line 439 of file PhysicalDimension.h.


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