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

Object that defines the relation between different types of wires (agxWire::Wire). More...

#include <Link.h>

+ Inheritance diagram for agxWire::Link:

Public Types

typedef agx::observer_ptr
< const Algorithm > 
AlgorithmConstObserver
 
typedef agx::ref_ptr< const
Algorithm > 
AlgorithmConstRef
 
typedef agx::observer_ptr
< Algorithm > 
AlgorithmObserver
 
typedef agx::ref_ptr< Algorithm > AlgorithmRef
 
typedef agx::Vector
< agxWire::ILinkNodeRef > 
ConnectionsContainer
 
enum  ConnectionType { WIRE_BEGIN = 0, WIRE_END = 1, LINK, INVALID_CONNECTION = 0xFF }
 Connection type of the wires connected to this link, i.e., if this link should be attached to begin or end of the wire. More...
 
typedef agx::Vector
< agxWire::LinkRef > 
LinkConnectionsContainer
 
enum  WinchState { WinchState::PULLED_IN, WinchState::INSIDE, WinchState::OVERLAPPING, NONE }
 State when a link is interacting with a winch. More...
 

Public Member Functions

 Link (agx::RigidBody *rb)
 Default constructor. More...
 
agx::Bool add (agxWire::Link::Algorithm *algorithm)
 Add a link algorithm. More...
 
agx::Bool addChild (agxWire::Link::Algorithm *algorithm)
 Add unique child algorithm. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * as ()
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
agx::Bool attach (agxWire::Wire *wire, const agx::Vec3 &relativeTranslate, agxWire::Link::ConnectionType type)
 Connects/maps and attaches wire to this link. More...
 
agx::Bool connect (agxWire::Wire *wire, const agx::Vec3 &relativeTranslate, agxWire::Link::ConnectionType type)
 Maps this link to wire at given connection type (WIRE_BEGIN/WIRE_END). More...
 
agx::Bool connect (agxWire::Link *link, agx::Constraint *constraint)
 Connect this link to another link with a constraint. More...
 
void debugRenderConnections () const
 Shows connection points in debug rendering view. More...
 
agx::Bool disconnect (agxWire::Wire *wire)
 Disconnect, or detach, this link from wire. More...
 
agx::Bool disconnect (agxWire::Link *otherLink)
 Disconnect, or detach, this link from otherLink. More...
 
template<typename T >
T * find () const
 
template<typename Pred >
agxWire::ILinkNode * findConnectingNode (Pred pred) const
 
template<typename Pred >
ILinkNode * findConnectingNode (Pred pred) const
 
agxWire::Winch * findPulledInWinch () const
 Finds the winch this link is completely pulled into, meaning this link is inactive with WinchState::PULLED_IN. More...
 
WinchState findWinchState () const
 Finds a state how this link is interacting with any winch. More...
 
template<typename T >
T * getAlgorithm () const
 
agxWire::Link::Algorithm * getChild (agx::UInt i) const
 
virtual const char * getClassName () const
 
agx::Constraint * getConnectingConstraint (const agxWire::Link *link) const
 
agxWire::ILinkNode * getConnectingNode (const agxWire::Wire *wire) const
 
agxWire::ILinkNode * getConnectingNode (const agxWire::Link *link) const
 
template<typename Pred >
agxWire::Link::ConnectionsContainer getConnectingNodes (Pred pred) const
 
template<typename Pred >
Link::ConnectionsContainer getConnectingNodes (Pred pred) const
 
const
agxWire::Link::ConnectionsContainer & 
getConnections () const
 
agxWire::ILinkNode::ConnectionProperties * getDefaultWireConnectionProperties ()
 Access default wire connection properties for each new wire that's connected to this link. More...
 
const
agxWire::ILinkNode::ConnectionProperties * 
getDefaultWireConnectionProperties () const
 
agx::Bool getEnable () const
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::UInt getNumChildren () const
 
agx::UInt getNumConnections () const
 
agxWire::Link::Algorithm * getParent () const
 
int getReferenceCount () const
 
agx::RigidBody * getRigidBody () const
 
virtual StorageAgent * getStorageAgent () const =0
 
agx::Uuid getUuid () const
 
agx::Bool hasConnection (const agxWire::Wire *wire) const
 
template<typename T >
bool is () const
 Subclass test. More...
 
bool isFinished () const
 
virtual void onLinkEnable (agx::Bool enable, agxWire::Link *link, agxSDK::SimulationProxy *simulationProxy)
 Called when link enable state is changed. More...
 
virtual void post (agxWire::Link *link, agxSDK::SimulationProxy *simulationProxy)
 Simulation post callback. More...
 
void postChildrenUpdate ()
 Internal method. More...
 
virtual void pre (agxWire::Link *link, agxSDK::SimulationProxy *simulationProxy)
 Simulation pre callback. More...
 
void preChildrenUpdate ()
 Internal method. More...
 
virtual void preCollide (agxWire::Link *link, agxSDK::SimulationProxy *simulationProxy)
 Simulation pre-collide callback. 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...
 
agx::Bool remove (agxWire::Link::Algorithm *algorithm)
 Remove link algorithm. More...
 
agx::Bool removeChild (agxWire::Link::Algorithm *algorithm)
 Remove child algorithm. More...
 
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...
 
void transform ()
 Transforms all the connecting nodes when for example the rigid body has been moved. 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...
 

Static Public Member Functions

static agx::Bool connect (agxWire::Wire *wire1, const agx::Vec3 &relativeTranslate1, agxWire::Link *link, agxWire::Wire *wire2, const agx::Vec3 &relativeTranslate2)
 Utility function to connect two wires with a link. More...
 
static agxWire::Link * getConnectingLink (const agxWire::ConnectingNode *connectingNode)
 
static
agxWire::Link::ConnectionType 
getConnectionType (const agxWire::ConnectingNode *connectingNode)
 
static agxWire::Link * getLink (const agxWire::ConnectingNode *connectingNode)
 
static agxWire::Wire * getWire (const agxWire::ConnectingNode *connectingNode, agx::Bool findClosestIfLinkConnections=false)
 
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 Types

typedef agx::Vector
< agxWire::Link::AlgorithmRef > 
AlgorithmContainer
 
enum  State { NONE = 0, NONE, INITIALIZED = 1 << 0, ENABLE_TOGGLED = 1 << 1 }
 State of the link. More...
 

Protected Member Functions

 Link ()
 Default constructor during restore. More...
 
virtual ~Link ()
 Reference counted object - protected destructor. More...
 
void addConnection (agxWire::Link::ConnectionsContainer &connections, agxWire::ILinkNode *node)
 Add connection, register to LinkController. More...
 
void addState (agxWire::Link::State state)
 Add state. More...
 
 Algorithm ()
 Abstract class - protected constructor. More...
 
void allocateObserverVector () const
 
void collectGarbage ()
 Checks connections and removes them where the wires have been deleted. More...
 
void deleteUsingDeleteHandler () const
 
void eraseConnection (agxWire::Link::ConnectionsContainer &connections, agxWire::ILinkNode *node)
 Erase connection, register to LinkController. More...
 
virtual agx::Bool executeUpdate (const agxSDK::SimulationProxy *simulationProxy)
 Garbage collects and checks if this link is ready for update calls. More...
 
void generateUuid ()
 
agx::Bool hasState (agxWire::Link::State state) const
 
void removeState (agxWire::Link::State state)
 Remove state. More...
 
virtual void update (agxWire::WireParallelCallbacksHandler::CallbackTypes type, agxSDK::SimulationProxy *simulationProxy)
 Update call. 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

AlgorithmContainer m_algorithms
 
ILinkNode::ConnectionProperties m_defaultLinkConnectionProperties
 
ILinkNode::ConnectionProperties m_defaultWireConnectionProperties
 
Mutex m_mutex
 
AlgorithmContainer m_newlyAddedAlgorithms
 
ObserverContainer m_observers
 
agx::RigidBodyRef m_rb
 
AtomicValue m_refCount
 
agx::Int32 m_state
 

Detailed Description

Object that defines the relation between different types of wires (agxWire::Wire).

Base class for an algorithm present in the agxWire::Link context.

I.e., this link object enables functionality to (for example) move nodes from one wire to another.

This algorithm gets callbacks on preCollide, pre, post and when the enable-state of the link has been toggled.

Definition at line 40 of file Link.h.

Member Typedef Documentation

Definition at line 43 of file Link.h.

Definition at line 43 of file Link.h.

Definition at line 318 of file Link.h.

Definition at line 43 of file Link.h.

Definition at line 43 of file Link.h.

Member Enumeration Documentation

Connection type of the wires connected to this link, i.e., if this link should be attached to begin or end of the wire.

Enumerator
WIRE_BEGIN 

Link attached at begin of wire.

WIRE_END 

Link attached at end of wire.

LINK 

Link attached to another link.

INVALID_CONNECTION 

Invalid connection, e.g., if this link isn't connected to a give wire.

Definition at line 52 of file Link.h.

enum agxWire::Link::State
protected

State of the link.

Enumerator
NONE 
NONE 

The link is not interacting with a winch.

INITIALIZED 

Initial route point if view.

ENABLE_TOGGLED 

Enabled or disabled - to fire onEnable events.

Definition at line 311 of file Link.h.

State when a link is interacting with a winch.

Enumerator
PULLED_IN 

The link is completely pulled into a winch - the rigid body is disabled and the transform isn't updated.

INSIDE 

The link is inside the winch, not visible if the winch is a hole, the rigid body is enabled and constrained with a cylindrical joint and geometries are disabled.

OVERLAPPING 

The link is partly inside the winch, the winch node is removed so that the two connecting nodes may pass.

NONE 

The link is not interacting with a winch.

Definition at line 64 of file Link.h.

Constructor & Destructor Documentation

agxWire::Link::Link ( agx::RigidBody *  rb)

Default constructor.

agxWire::Link::Link ( )
protected

Default constructor during restore.

virtual agxWire::Link::~Link ( )
protectedvirtual

Reference counted object - protected destructor.

Member Function Documentation

agx::Bool agxWire::Link::add ( agxWire::Link::Algorithm *  algorithm)

Add a link algorithm.

Parameters
algorithm- algorithm to add
Returns
true if added, false if already part of this link or not added
agx::Bool agxWire::Link::addChild ( agxWire::Link::Algorithm *  algorithm)

Add unique child algorithm.

Returns
true if added - false if null, already present or already has a parent
void agxWire::Link::addConnection ( agxWire::Link::ConnectionsContainer &  connections,
agxWire::ILinkNode *  node 
)
protected

Add connection, register to LinkController.

void agxWire::Link::addState ( agxWire::Link::State  state)
protected

Add state.

agxWire::Link::Algorithm ( )
protected

Abstract class - protected constructor.

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited
template<typename T >
const T* agxWire::Link::as ( ) const
Returns
this algorithm as given type - null if type mismatch
template<typename T >
T* agxWire::Link::as ( )
Returns
this algorithm as given type - null if type mismatch
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
agx::Bool agxWire::Link::attach ( agxWire::Wire *  wire,
const agx::Vec3 &  relativeTranslate,
agxWire::Link::ConnectionType  type 
)

Connects/maps and attaches wire to this link.

The current attachment at type will be detached and replaced by this link.

Parameters
wire- wire to attach
relativeTranslate- position in this links frame where the connection point is
type- connection type at WIRE_BEGIN or WIRE_END
Returns
true if successful, otherwise false
void agxWire::Link::collectGarbage ( )
protected

Checks connections and removes them where the wires have been deleted.

static agx::Bool agxWire::Link::connect ( agxWire::Wire *  wire1,
const agx::Vec3 &  relativeTranslate1,
agxWire::Link *  link,
agxWire::Wire *  wire2,
const agx::Vec3 &  relativeTranslate2 
)
static

Utility function to connect two wires with a link.

link will be connected at WIRE_END of wire1 and WIRE_BEGIN at wire2.

Parameters
wire1- first wire with link connected at end of its route
relativeTranslate1- position in this links frame where the connection point to wire 1 is
link- The link that should be connected between the two wires
wire2- second wire with link connected at begin of its route
relativeTranslate2- position in this links frame where the connection point to wire 2 is
Returns
true if successful, otherwise false
agx::Bool agxWire::Link::connect ( agxWire::Wire *  wire,
const agx::Vec3 &  relativeTranslate,
agxWire::Link::ConnectionType  type 
)

Maps this link to wire at given connection type (WIRE_BEGIN/WIRE_END).

This method will only map wire to this link, it will not actually be attached.

See Also
attach( agxWire::Wire* wire, const agx::Vec3& relativeTranslate )
Parameters
wire- wire to connect
relativeTranslate- position in this links frame where the connection point is
type- connection type at WIRE_BEGIN or WIRE_END
Returns
true if successful, otherwise false
agx::Bool agxWire::Link::connect ( agxWire::Link *  link,
agx::Constraint *  constraint 
)

Connect this link to another link with a constraint.

Parameters
link- other link to connect to this link
constraint- constraint connecting the links
Returns
true when connect is successful, otherwise false
void agxWire::Link::debugRenderConnections ( ) const

Shows connection points in debug rendering view.

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited
agx::Bool agxWire::Link::disconnect ( agxWire::Wire *  wire)

Disconnect, or detach, this link from wire.

Parameters
wire- wire to disconnect
Returns
true if disconnected, otherwise false
agx::Bool agxWire::Link::disconnect ( agxWire::Link *  otherLink)

Disconnect, or detach, this link from otherLink.

Parameters
otherLink- link to detach
Returns
true if disconnected, otherwise false
void agxWire::Link::eraseConnection ( agxWire::Link::ConnectionsContainer &  connections,
agxWire::ILinkNode *  node 
)
protected

Erase connection, register to LinkController.

virtual agx::Bool agxWire::Link::executeUpdate ( const agxSDK::SimulationProxy *  simulationProxy)
protectedvirtual

Garbage collects and checks if this link is ready for update calls.

Returns
true if this link wants update calls for given simulation proxy
template<typename T >
T* agxWire::Link::find ( ) const
Returns
algorithm of given type
template<typename Pred >
agxWire::ILinkNode* agxWire::Link::findConnectingNode ( Pred  pred) const
Returns
connecting node given predicate
template<typename Pred >
ILinkNode* agxWire::Link::findConnectingNode ( Pred  pred) const

Definition at line 549 of file Link.h.

agxWire::Winch* agxWire::Link::findPulledInWinch ( ) const

Finds the winch this link is completely pulled into, meaning this link is inactive with WinchState::PULLED_IN.

If this link is enabled or when no winch is found, nullptr is returned.

Returns
winch this link is completely pulled into, otherwise nullptr
WinchState agxWire::Link::findWinchState ( ) const

Finds a state how this link is interacting with any winch.

Note
If the state is WinchState::NONE and this link is disabled it means that this link is part of a disabled wire configuration.
If this link is connected to another link only one of the links will have state INSIDE. The other link will have states OVERLAPPING then PULLED_IN (in the case going into the winch) or PULLED_IN then OVERLAPPING to NONE when going out.
Returns
the current winch state
void agxStream::Serializable::generateUuid ( )
protectedinherited
template<typename T >
T* agxWire::Link::getAlgorithm ( ) const
Note
If there are several algorithms of same type, the first will be returned.
Returns
the first algorithm given type
agxWire::Link::Algorithm* agxWire::Link::getChild ( agx::UInt  i) const
Returns
child at index 'i' - bound check, null if out of bound
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().

agx::Constraint* agxWire::Link::getConnectingConstraint ( const agxWire::Link *  link) const
Returns
the connection if it exists between this link and the other link, otherwise null
static agxWire::Link* agxWire::Link::getConnectingLink ( const agxWire::ConnectingNode *  connectingNode)
static
Returns
other link connected to the connecting node
agxWire::ILinkNode* agxWire::Link::getConnectingNode ( const agxWire::Wire *  wire) const
Returns
connecting node given wire, null if no connection defined
agxWire::ILinkNode* agxWire::Link::getConnectingNode ( const agxWire::Link *  link) const
Returns
connecting node given link, null if no connection defined
template<typename Pred >
agxWire::Link::ConnectionsContainer agxWire::Link::getConnectingNodes ( Pred  pred) const
Returns
a set of connecting nodes given predicate
template<typename Pred >
Link::ConnectionsContainer agxWire::Link::getConnectingNodes ( Pred  pred) const
const agxWire::Link::ConnectionsContainer& agxWire::Link::getConnections ( ) const
Returns
all connections
static agxWire::Link::ConnectionType agxWire::Link::getConnectionType ( const agxWire::ConnectingNode *  connectingNode)
static
Returns
the connecting type given connecting node
agxWire::ILinkNode::ConnectionProperties* agxWire::Link::getDefaultWireConnectionProperties ( )

Access default wire connection properties for each new wire that's connected to this link.

Note
If any value is changed the current connections will not be updated with this value. Only new connection will receive this new default value.
Returns
default connection properties
const agxWire::ILinkNode::ConnectionProperties* agxWire::Link::getDefaultWireConnectionProperties ( ) const
Returns
default wire connection properties
static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.
agx::Bool agxWire::Link::getEnable ( ) const
Returns
true if this link is enabled - otherwise false
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
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.

static agxWire::Link* agxWire::Link::getLink ( const agxWire::ConnectingNode *  connectingNode)
static
Returns
the link given connecting node
agx::UInt agxWire::Link::getNumChildren ( ) const
Returns
the number of children of this algorithm
agx::UInt agxWire::Link::getNumConnections ( ) const
Returns
the number of connections connected to the ends of this link
agxWire::Link::Algorithm* agxWire::Link::getParent ( ) const
Returns
the parent of this algorithm
int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.
agx::RigidBody* agxWire::Link::getRigidBody ( ) const
Returns
the rigid body of this link
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.

agx::Uuid agxStream::Serializable::getUuid ( ) const
inherited
Returns
a unique id for this instance.

Definition at line 268 of file Serializable.h.

static agxWire::Wire* agxWire::Link::getWire ( const agxWire::ConnectingNode *  connectingNode,
agx::Bool  findClosestIfLinkConnections = false 
)
static
Parameters
connectingNode- wire or link connecting node
findClosestIfLinkConnections- if true and connectingNode is connected to a link, the search will continue over all link connections until first wire connection
Returns
the wire connection given connecting node
agx::Bool agxWire::Link::hasConnection ( const agxWire::Wire *  wire) const
Returns
true if a connection is defined for this wire, otherwise false
agx::Bool agxWire::Link::hasState ( agxWire::Link::State  state) const
protected
Returns
true if state is set
template<typename T >
bool agx::Referenced::is ( ) const
inherited
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.

virtual void agxWire::Link::onLinkEnable ( agx::Bool  enable,
agxWire::Link *  link,
agxSDK::SimulationProxy *  simulationProxy 
)
virtual

Called when link enable state is changed.

enable is the new state of the link.

Parameters
enable- true if the link is enabled, false if disabled
link- link which state is changed
simulationProxy- simulation proxy
virtual void agxWire::Link::post ( agxWire::Link *  link,
agxSDK::SimulationProxy *  simulationProxy 
)
virtual

Simulation post callback.

Parameters
link- link this algorithm is connected to
simulationProxy- simulation proxy
void agxWire::Link::postChildrenUpdate ( )

Internal method.

Called after children get update calls.

virtual void agxWire::Link::pre ( agxWire::Link *  link,
agxSDK::SimulationProxy *  simulationProxy 
)
virtual

Simulation pre callback.

Parameters
link- link this algorithm is connected to
simulationProxy- simulation proxy
void agxWire::Link::preChildrenUpdate ( )

Internal method.

Called before children get update calls.

virtual void agxWire::Link::preCollide ( agxWire::Link *  link,
agxSDK::SimulationProxy *  simulationProxy 
)
virtual

Simulation pre-collide callback.

Parameters
link- link this algorithm is connected to
simulationProxy- simulation proxy
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().

agx::Bool agxWire::Link::remove ( agxWire::Link::Algorithm *  algorithm)

Remove link algorithm.

Parameters
algorithm- algorithm to remove
Returns
true if removed, otherwise false
agx::Bool agxWire::Link::removeChild ( agxWire::Link::Algorithm *  algorithm)

Remove child algorithm.

Returns
true if removed - false if null or not present as a child.
void agxWire::Link::removeState ( agxWire::Link::State  state)
protected

Remove state.

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.

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!

void agxWire::Link::transform ( )

Transforms all the connecting nodes when for example the rigid body has been moved.

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.

virtual void agxWire::Link::update ( agxWire::WireParallelCallbacksHandler::CallbackTypes  type,
agxSDK::SimulationProxy *  simulationProxy 
)
protectedvirtual

Update call.

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

Member Data Documentation

AlgorithmContainer agxWire::Link::m_algorithms
protected

Definition at line 377 of file Link.h.

ILinkNode::ConnectionProperties agxWire::Link::m_defaultLinkConnectionProperties
protected

Definition at line 381 of file Link.h.

ILinkNode::ConnectionProperties agxWire::Link::m_defaultWireConnectionProperties
protected

Definition at line 380 of file Link.h.

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

AlgorithmContainer agxWire::Link::m_newlyAddedAlgorithms
protected

Definition at line 378 of file Link.h.

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

agx::RigidBodyRef agxWire::Link::m_rb
protected

Definition at line 376 of file Link.h.

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

agx::Int32 agxWire::Link::m_state
protected

Definition at line 379 of file Link.h.


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