|
AGXDynamics
2.31.1.0
|
A model of a cable using a lumped elements model. More...
#include <Cable.h>
Inheritance diagram for agxCable::Cable:Public Types | |
| enum | Type { ASSEMBLY, COLLECTION } |
| Specifies the type an assembly is. More... | |
Public Member Functions | |
| Cable (agx::Real radius, agx::Real resolutionPerUnitLength) | |
| Create a new cable with the given radius and resolution. More... | |
| Cable (agx::Real radius, agxCable::HomogeneousSegmentsRoute *routingAlgorithm) | |
| Create a new cable using the given routing algorithm. More... | |
| bool | add (agx::Constraint *constraint) |
| Add a constraint to the assembly. More... | |
| agx::Bool | add (agxCable::RoutingNode *node) |
| Add the given cable node to the end of the cable. More... | |
| bool | add (agx::Interaction *interaction) |
| Add an interaction to this assembly. More... | |
| bool | add (agxSDK::EventListener *listener) |
| Add a listener to the assembly. More... | |
| bool | add (agx::RigidBody *body) |
| Add a rigid body to the assembly. More... | |
| bool | add (agxCollide::Geometry *geometry) |
| Add a geometry to the assembly. More... | |
| bool | add (Assembly *assembly) |
| Add another assembly as child to this assembly. More... | |
| bool | add (agx::ContactMaterial *contactMaterial) |
| Add a contact material to this assembly. More... | |
| bool | add (agx::Emitter *emitter) |
| Add an emitter to this assembly. More... | |
| bool | add (agx::ObserverFrame *observerFrame) |
| Add an ObserverFrame to this assembly. More... | |
| bool | add (agxStream::Serializable *object) |
| Add an object of type serialized. More... | |
| virtual agx::Bool | addComponent (agxSDK::LinkedStructureComponent *component) |
| Add new component to this linked structure. More... | |
| virtual void | addGroup (agx::UInt32 id) |
| Add group id to all segments in this linked structure. More... | |
| virtual void | addGroup (const agx::Name &name) |
| Add group name to all segments in this linked structure. More... | |
| void | addNotification (agxSDK::Simulation *simulation) final override |
| Called when this linked structure is added to the simulation. More... | |
| virtual void | addNotification (Assembly *) |
| Called when this assembly is added to another assembly. More... | |
| 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 |
| bool | attach (agxCable::CableIterator segment, agx::RigidBody *body, const agx::Vec3 &relativeTranslate) |
| Attach the given segment to the given rigid body using a BallJoint that lets the cable rotate freely around the point. More... | |
| bool | attach (agxCable::CableIterator segment, agx::RigidBody *body, const agx::AffineMatrix4x4 &relativeTransform) |
| Attach the given segment to the given rigid body using a LockJoint. More... | |
| agxCable::CableIterator | begin () const |
| Returns an iterator that walks over the segments of the cable. More... | |
| agxCable::CableIterator | begin () |
| agxCable::CableIterator | end () const |
| Returns an iterator pointing one-past the last segment. More... | |
| agxCable::CableIterator | end () |
| virtual agxCollide::GroupIdCollection | findGroupIdCollection () const |
| agxCable::CableIterator | findLast () const |
| Returns an iterator pointing to the last segment. More... | |
| virtual agx::Vec3 | getAngularVelocityDamping () const |
| const AssemblyRefSet & | getAssemblies () const |
| const agxSDK::Assembly * | getAssembly (const agx::Name &name, bool recursive=true) const |
| Find (linear search) and return named Assembly. More... | |
| agxSDK::Assembly * | getAssembly (const agx::Name &name, bool recursive=true) |
| Find (linear search) and return named Assembly. More... | |
| const agxSDK::Assembly * | getAssembly (const agx::Uuid &uuid, bool recursive=true) const |
| Find (linear search) and return an Assembly matching the given uuid. More... | |
| agxSDK::Assembly * | getAssembly (const agx::Uuid &uuid, bool recursive=true) |
| Find (linear search) and return an Assembly matching the given uuid. More... | |
| agxCable::CableProperties * | getCableProperties () const |
| Return the cable properties for this cable. More... | |
| const char * | getClassName () const override |
| template<typename T > | |
| T * | getComponent () const |
| agxSDK::LinkedStructureComponent * | getComponent (const agx::Name &name) const |
| const agx::Constraint * | getConstraint (const agx::Uuid &uuid, bool recursive=true) const |
| Find (linear search) and return a pointer to a Constraint with the given uuid. More... | |
| agx::Constraint * | getConstraint (const agx::Uuid &uuid, bool recursive=true) |
| Find and return a pointer to a Constraint with the given uuid. More... | |
| const agx::Constraint * | getConstraint (const agx::Name &name, bool recursive=true) const |
| Find (linear search) and return named Constraint. More... | |
| agx::Constraint * | getConstraint (const agx::Name &name, bool recursive=true) |
| Find (linear search) and return named Constraint. More... | |
| template<typename T > | |
| T * | getConstraint (const agx::Name &name, bool recursive=true) |
| Find and return named Constraint of a template type, for example Hinge: More... | |
| template<typename T > | |
| const T * | getConstraint (const agx::Name &name, bool recursive=true) const |
| Find and return named Constraint of a template type, for example Hinge: More... | |
| agx::Constraint1DOF * | getConstraint1DOF (const agx::Name &name, bool recursive=true) |
| agx::Constraint2DOF * | getConstraint2DOF (const agx::Name &name, bool recursive=true) |
| const agx::ConstraintRefSet & | getConstraints () const |
| virtual agx::Real | getCurrentLength () const override |
| Get the current length of the cable, including any stretching. More... | |
| virtual agx::UInt32 | getDisabledCollisionGroupId () const |
| const agx::EmitterRefSet & | getEmitters () const |
| virtual agx::Bool | getEnableCollisions (const agx::RigidBody *rb) const |
| virtual agx::Bool | getEnableCollisions (const agxCollide::Geometry *geometry) const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| virtual agx::Frame * | getFrame () |
| Return a reference to the frame containing transformation and velocity information for this assembly. More... | |
| virtual const agx::Frame * | getFrame () const |
| const agxCollide::GeometryRefSet & | getGeometries () const |
| const agxCollide::Geometry * | getGeometry (const agx::Name &name, bool recursive=true) const |
| Find (linear search) and return named collision Geometry. More... | |
| agxCollide::Geometry * | getGeometry (const agx::Name &name, bool recursive=true) |
| Find (linear search) and return named collision Geometry. More... | |
| const agxCollide::Geometry * | getGeometry (const agx::Uuid &uuid, bool recursive=true) const |
| Find (linear search) and return a Geometry matching the given uuid. More... | |
| agxCollide::Geometry * | getGeometry (const agx::Uuid &uuid, bool recursive=true) |
| Find (linear search) and return a Geometry matching the given uuid. More... | |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agxCable::RouteInitializationReport | getInitializationReport () const |
| const InteractionRefSetVector & | getInteractions () const |
| virtual agx::Vec3 | getLinearVelocityDamping () const |
| agx::Vec3 | getLocalPosition () const |
| agx::Quat | getLocalRotation () const |
| const agx::AffineMatrix4x4 & | getLocalTransform () const |
| virtual agx::Real | getMass () const |
| Calculates and returns the total mass of this linked structure. More... | |
| virtual agx::Material * | getMaterial () const |
| agx::Name | getName () const |
| agx::UInt | getNumSegments () const |
| Returns the number of segments in the cable. More... | |
| const agx::ObserverFrame * | getObserverFrame (const agx::Name &name, bool recursive=true) const |
| Find (linear search) and return an ObserverFrame matching the given uuid. More... | |
| agx::ObserverFrame * | getObserverFrame (const agx::Name &name, bool recursive=true) |
| Find (linear search) and return an ObserverFrame matching the given uuid. More... | |
| const agx::ObserverFrame * | getObserverFrame (const agx::Uuid &uuid, bool recursive=true) const |
| Find (linear search) and return an ObserverFrame matching the given uuid. More... | |
| agx::ObserverFrame * | getObserverFrame (const agx::Uuid &uuid, bool recursive=true) |
| Find (linear search) and return an ObserverFrame matching the given uuid. More... | |
| const ObserverFrameRefSetVector & | getObserverFrames () const |
| Assembly * | getParent () |
| const Assembly * | getParent () const |
| agx::Frame * | getParentFrame () |
| const agx::Frame * | getParentFrame () const |
| const agxSDK::ParticleSystemRefSet & | getParticleSystems () const |
| agx::Real | getRadius () const |
| int | getReferenceCount () const |
| agx::Real | getResolution () const |
| Returns the resolution of the cable, measured in units of length per segment. More... | |
| virtual agx::Real | getRestLength () const override |
| Get the rest length of the cable. More... | |
| virtual agx::Real | getRestVolume () const |
| Calculates and returns the total volume of this linked structure, at rest. More... | |
| const agx::RigidBodyRefSet & | getRigidBodies () const |
| agx::RigidBody * | getRigidBody (const agx::Name &name, bool recursive=true) |
| Find (linear search) and return named RigidBody. More... | |
| const agx::RigidBody * | getRigidBody (const agx::Name &name, bool recursive=true) const |
| Find (linear search) and return named RigidBody. More... | |
| agx::RigidBody * | getRigidBody (const agx::Uuid &uuid, bool recursive=true) |
| Find (linear search) and return a pointer to a RigidBody with the given uuid. More... | |
| const agx::RigidBody * | getRigidBody (const agx::Uuid &uuid, bool recursive=true) const |
| Find (linear search) and return a pointer to a RigidBody with the given uuid. More... | |
| template<> | |
| LinkedSegment * | getSegment (const agx::RigidBody *rb) const |
| agx::UInt | getSegmentIndex (const agx::RigidBody *rb) const |
| agxCable::SegmentRange | getSegments () const |
| const agxSDK::LinkedSegmentContainer & | getSegmentsContainer () const |
| agxSDK::Simulation * | getSimulation () |
| const agxSDK::Simulation * | getSimulation () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| Type | getType () const |
| virtual agx::UInt32 | getUniqueId () const |
| agx::Uuid | getUuid () const |
| virtual agx::Bool | hasGroup (agx::UInt32 id) const |
| virtual agx::Bool | hasGroup (const agx::Name &name) const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isFinished () const |
| virtual agx::Bool | rebind () |
| Make the current relative positions of all nodes the rest state. 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... | |
| bool | remove (agx::Constraint *constraint) |
| Remove a constraint from this assembly (does not recurse down in tree). More... | |
| bool | remove (agx::Interaction *interaction) |
| Remove an interaction from this assembly. More... | |
| bool | remove (EventListener *listener) |
| Remove an EventListener from the assembly. More... | |
| bool | remove (agx::RigidBody *body, bool removeAssociatedGeometries=false) |
| Remove a rigid body from this assembly (does not recurse down in tree). More... | |
| bool | remove (agxCollide::Geometry *geometry) |
| Remove a geometry from this assembly (does not recurse down in tree). More... | |
| bool | remove (Assembly *assembly) |
| Remove a child assembly from a parent. More... | |
| bool | remove (agx::ContactMaterial *contactMaterial) |
| Remove a contact material from this assembly. More... | |
| bool | remove (agx::Emitter *emitter) |
| Remove an emitter from this assembly. More... | |
| bool | remove (agx::ObserverFrame *observerFrame) |
| Remove an ObserverFrame from this assembly. More... | |
| virtual agx::Bool | removeComponent (agxSDK::LinkedStructureComponent *component) |
| Remove an added component from this linked structure. More... | |
| virtual void | removeGroup (agx::UInt32 id) |
| Remove group id from all segments in this linked structure. More... | |
| virtual void | removeGroup (const agx::Name &name) |
| Remove group name from all segments in this linked structure. More... | |
| void | removeNotification (agxSDK::Simulation *simulation) final override |
| Called when this linked structure is added to the simulation. More... | |
| virtual void | removeNotification (Assembly *) |
| Called when this assembly is removed from another assembly. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| agxSDK::LinkedSegmentRange< agxSDK::LinkedSegment > | segments () |
| virtual void | setAngularVelocity (const agx::Vec3 &velocity) |
| Set the angular velocity (in world frame) recursively for all rigid bodies stored in assembly. More... | |
| virtual void | setAngularVelocityDamping (const agx::Vec3 &angularVelocityDamping) |
| Assigns angular velocity damping to all segments in this linked structure. More... | |
| void | setCableProperties (agxCable::CableProperties *cableProperties) |
| Set the cable properties object used by this cable. More... | |
| virtual void | setEnableCollisions (agx::RigidBody *rb, agx::Bool enable) |
| Enable/disable collisions between the rigid body and all segments of this linked structure. More... | |
| virtual void | setEnableCollisions (agxCollide::Geometry *geometry, agx::Bool enable) |
| Enable/disable collisions between the geometry and all segments of this linked structure. 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... | |
| virtual void | setLinearVelocityDamping (const agx::Vec3 &linearVelocityDamping) |
| Assigns linear velocity damping to all segments in this linked structure. More... | |
| void | setLocalPosition (const agx::Vec3 &p) |
| Set the position of the assembly relative to its frame's parent frame. More... | |
| void | setLocalPosition (agx::Real x, agx::Real y, agx::Real z) |
| Set the position of the assembly relative to its frame's parent frame. More... | |
| void | setLocalRotation (const agx::Quat &q) |
| Set the rotation of the assembly relative to its frame's parent frame. More... | |
| void | setLocalRotation (const agx::EulerAngles &e) |
| Set the rotation of the assembly relative to its frame's parent frame. More... | |
| void | setLocalTransform (const agx::AffineMatrix4x4 &matrix) |
| Assign the local transformation matrix for this assembly, ignoring any eventual parent transformation. More... | |
| virtual void | setMaterial (agx::Material *material) |
| Assign material to all segments in this linked structure. More... | |
| void | setName (const agx::Name &name) |
| Set the name of this Assembly. More... | |
| bool | setParentFrame (agx::Frame *frame) |
| Set the parent frame of this assembly's frame. More... | |
| void | setPosition (const agx::Vec3 &p) |
| Set the position of the frame in world coordinates. More... | |
| void | setPosition (agx::Real x, agx::Real y, agx::Real z) |
| Set the position of the frame in world coordinates. More... | |
| void | setRotation (const agx::Quat &q) |
| Set the rotation of the assembly relative to world frame. More... | |
| void | setRotation (const agx::EulerAngles &e) |
| Set the rotation of the assembly relative to world frame. More... | |
| void | setRotation (const agx::OrthoMatrix3x3 &m) |
| Set the rotation of the assembly relative to world frame. More... | |
| void | setTransform (const agx::AffineMatrix4x4 &matrix) |
| Set the transform of the assembly. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| virtual void | setVelocity (const agx::Vec3 &velocity) |
| Set the linear velocity (in world frame) recursively for all rigid bodies stored in assembly. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| virtual void | traverse (AssemblyVisitor *visitor) |
| Traverse the assembly tree recursively using a visitor. More... | |
| virtual void | traverse (const AssemblyVisitor *visitor) const |
| agxCable::RouteInitializationReport | tryInitialize () |
| Make a dry-run of the cable initialization. More... | |
| agxCable::RouteInitializationReport | tryInitialize (agx::Real maxError) |
| Make a dry-run with a specified maximum allowed routing error. 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 Assembly * | asAssembly (agxStream::Serializable *obj) |
| static agxCable::Cable * | asCable (agxSDK::Assembly *assembly) |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agxStream::Serializable * | create () |
| static Cable * | find (agxSDK::Simulation *simulation, const agx::Name &name) |
| This method will do a linear search in Simulation and return a pointer to the specified Cable. More... | |
| static Cable * | find (agxSDK::Simulation *simulation, const agx::Uuid &uuid) |
| This method will do a linear search in Simulation and return a pointer to the specified Cable. More... | |
| static agxCable::CablePtrVector | findAll (agxSDK::Simulation *simulation, const agx::Name &name) |
| This method will do a linear search in Simulation and return a vector with pointers to all matching Cables. More... | |
| static LinkedStructure * | get (agxCollide::Geometry *geometry) |
| static const LinkedStructure * | get (const agxCollide::Geometry *geometry) |
| static LinkedStructure * | get (agx::RigidBody *body) |
| static const LinkedStructure * | get (const agx::RigidBody *body) |
| static agxCable::CablePtrVector | getAll (agxSDK::Simulation *simulation) |
| Collect all Cables in the given simulation. More... | |
| static agxCable::Cable * | getCableForBody (agx::RigidBody *body) |
| static const agxCable::Cable * | getCableForBody (const agx::RigidBody *body) |
| static agxCable::Cable * | getCableForGeometry (agxCollide::Geometry *geometry) |
| static const agxCable::Cable * | getCableForGeometry (const agxCollide::Geometry *geometry) |
| static const char * | getConstructClassId () |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| Cable () | |
| Used for serialization only. More... | |
| virtual | ~Cable () |
| void | add (LinkedSegment *segment) |
| Add segment to this linked structure. More... | |
| bool | addParticleSystem (agx::ParticleSystem *particleSystem) |
| Add a particle system to this assembly. More... | |
| void | addToSimulation (Simulation *simulation) |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | generateUuid () |
| LinkedStructureObjectData * | getData (const agx::RigidBody *rb) const |
| agxCable::HomogeneousSegmentsRoute * | getRoute () const |
| LinkedSegment * | getSegment (agx::UInt index) const |
| template<typename ObjT > | |
| LinkedSegment * | getSegment (const ObjT *rb) const |
| template<typename T > | |
| LinkedSegmentIterator< T > | getSegmentIterator (agx::UInt index, agx::Bool boundaryless=false) const |
| template<typename T , typename ObjT > | |
| LinkedSegmentIterator< T > | getSegmentIterator (const ObjT *rb, agx::Bool boundaryless=false) const |
| template<typename T > | |
| LinkedSegmentRange< T > | getSegments (agx::UInt beginIndex, agx::UInt endIndex) const |
| Range given begin and end segment index. More... | |
| virtual void | onAddNotification (agxSDK::Simulation *simulation) override |
| Called when addNotification is executed when this linked structure is added to the simulation. More... | |
| virtual void | onGroupAdd (const IdData &group) |
| Called when a new group has been added. More... | |
| virtual void | onGroupRemove (const IdData &group) |
| Called when an existing group has been removed. More... | |
| virtual void | onLastStep () |
| Called on simulation last step event - after user lastStep. More... | |
| virtual void | onMaterialNew () |
| Called when a new material has been assigned. More... | |
| virtual void | onPostStep () override |
| Called on simulation post step event - after user postStep. More... | |
| virtual void | onPreCollideStep () |
| Called on simulation pre-collide step event - after user preCollide. More... | |
| virtual void | onPreStep () override |
| Called on simulation pre step event - after user preStep. More... | |
| virtual void | onRemoveNotification (agxSDK::Simulation *simulation) |
| Called when removeNotification is executed when this linked structure is removed from the simulation. More... | |
| virtual void | onSetEnableCollisions (agxCollide::Geometry *geometry, agx::Bool enable) |
| Called when collision state changed for given geometry. More... | |
| void | removeFromSimulation (Simulation *simulation) |
| bool | removeParticleSystem (agx::ParticleSystem *particleSystem) |
| Remove a particle system from this assembly. More... | |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| template<typename T > | |
| static T * | getT (agx::RigidBody *rb) |
| template<typename T > | |
| static const T * | getT (const agx::RigidBody *rb) |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes | |
| Mutex | m_mutex |
| AtomicValue | m_refCount |
A model of a cable using a lumped elements model.
A number of RigidBodies, called segments, are created and constrained together to represent the cable.
|
inherited |
Specifies the type an assembly is.
| Enumerator | |
|---|---|
| ASSEMBLY | This is a full fledged Assembly which uses Frame for the hierarchy. |
| COLLECTION | This is only a collection of objects NOT using Frame for the hierarchy. |
Definition at line 615 of file Assembly.h.
Create a new cable with the given radius and resolution.
The given resolution is used as a starting point, but particulars of the routing and initialization may cause the final resolution to differ from the given one. See tryInitialize.
At creation the cable will have zero length and no position in space. Route the cable by adding nodes to it.
| radius | - The radius of the cable. |
| resolutionPerUnitLength | - The number of lumped elements to create per unit length. |
| agxCable::Cable::Cable | ( | agx::Real | radius, |
| agxCable::HomogeneousSegmentsRoute * | routingAlgorithm | ||
| ) |
Create a new cable using the given routing algorithm.
The routing algorithm determines final segment placement when the cable is initialized.
The cable is routed using Cable::add(RoutingNode*) as usual. Different routing algorithm may impose various limitations on how how the cable may be routed.
| radius | - The radius of the cable. |
| routingAlgorithm | - The routing algorithm to use when creating cable segments from the routing nodes. |
|
protected |
Used for serialization only.
|
protectedvirtual |
|
inherited |
Add a constraint to the assembly.
| agx::Bool agxCable::Cable::add | ( | agxCable::RoutingNode * | node | ) |
Add the given cable node to the end of the cable.
The cable is extended from the most recently added node to the new node. The cable, by definition, starts at the first node added and ends at the last node.
All modes must be added before the cable initialization is finalized. This happens when the cable is added to the simulation.
| node | - The node to add to the cable route. |
|
inherited |
Add an interaction to this assembly.
|
inherited |
Add a listener to the assembly.
|
inherited |
Add a rigid body to the assembly.
|
inherited |
Add a geometry to the assembly.
|
inherited |
Add another assembly as child to this assembly.
|
inherited |
Add a contact material to this assembly.
|
inherited |
Add an emitter to this assembly.
|
inherited |
Add an ObserverFrame to this assembly.
|
inherited |
Add an object of type serialized.
The object will be dynamically cast to the types supported by add() methods an appropriately added to this Assembly.
|
protectedinherited |
Add segment to this linked structure.
The segment will inherit our material, unique id and all externally added groups.
segment to be a valid pointer and not already added. | segment | segment to add |
|
virtualinherited |
Add new component to this linked structure.
| component | - component to add |
|
virtualinherited |
Add group id to all segments in this linked structure.
| id | - id to add |
Add group name to all segments in this linked structure.
| name | - name to add |
|
finaloverridevirtualinherited |
Called when this linked structure is added to the simulation.
This callback is reserved for LinkedStructure but onAddNotification will be called in a similar way.
Reimplemented from agxSDK::Assembly.
Called when this assembly is added to another assembly.
Reimplemented in agxPowerLine::PowerLine.
Definition at line 589 of file Assembly.h.
|
protectedinherited |
Add a particle system to this assembly.
ParticleSystems should only be added to Collections.
|
protectedinherited |
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().
|
inherited |
|
inlinestaticinherited |
Definition at line 636 of file Assembly.h.
|
static |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
| bool agxCable::Cable::attach | ( | agxCable::CableIterator | segment, |
| agx::RigidBody * | body, | ||
| const agx::Vec3 & | relativeTranslate | ||
| ) |
Attach the given segment to the given rigid body using a BallJoint that lets the cable rotate freely around the point.
The relative translate is relative to the body's model coordinate frame.
| segment | - CableIterator pointing to the segment that is to be attached. |
| body | - RigidBody to attach the segment to. |
| relativeTranslate | - Point on the body that the cable is to be attached to. |
| bool agxCable::Cable::attach | ( | agxCable::CableIterator | segment, |
| agx::RigidBody * | body, | ||
| const agx::AffineMatrix4x4 & | relativeTransform | ||
| ) |
Attach the given segment to the given rigid body using a LockJoint.
The cable will be fixed relative to the body. The relative transform describe the transformation from the body's model coordinate frame to the point that the cable should pass through. The cable will pass through this point along the transformed Z axis.
| segment | - CableIterator pointing to the segment that is to be attached. |
| body | - RigidBody to attach the segment to. |
| relativeTransform | - Transformation describing the orientation of the cable relative to the body. |
| agxCable::CableIterator agxCable::Cable::begin | ( | ) | const |
Returns an iterator that walks over the segments of the cable.
From the iterator one can read information such as segment length and position, cable tension and get access to the underlying RigidBody.
| agxCable::CableIterator agxCable::Cable::begin | ( | ) |
|
inlinestaticinherited |
Definition at line 247 of file LinkedStructure.h.
|
inlinestaticinherited |
Definition at line 247 of file LinkedStructure.h.
|
protectedinherited |
| agxCable::CableIterator agxCable::Cable::end | ( | ) | const |
Returns an iterator pointing one-past the last segment.
This iterator may not be dereferenced.
| agxCable::CableIterator agxCable::Cable::end | ( | ) |
|
static |
|
static |
|
static |
This method will do a linear search in Simulation and return a vector with pointers to all matching Cables.
| simulation | - The instance of the simulation in which we are searching |
| name | - Name of the Cable's we are searching for |
|
virtualinherited |
| agxCable::CableIterator agxCable::Cable::findLast | ( | ) | const |
Returns an iterator pointing to the last segment.
|
protectedinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
static |
Collect all Cables in the given simulation.
| simulation | - The simulation to get cables from. |
|
virtualinherited |
|
inherited |
|
inherited |
Find (linear search) and return named Assembly.
| name | - name of the Assembly to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return named Assembly.
| name | - name of the Assembly to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return an Assembly matching the given uuid.
| uuid | - uuid of the Assembly to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return an Assembly matching the given uuid.
| uuid | - uuid of the Assembly to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
static |
|
static |
|
static |
|
static |
| agxCable::CableProperties* agxCable::Cable::getCableProperties | ( | ) | const |
Return the cable properties for this cable.
CableProperties may be shared among several cables.
|
inlineoverridevirtualinherited |
Reimplemented from agxSDK::Assembly.
Reimplemented in agxVehicle::Track.
Definition at line 247 of file LinkedStructure.h.
|
inherited |
Definition at line 482 of file LinkedStructure.h.
|
inherited |
|
inherited |
Find (linear search) and return a pointer to a Constraint with the given uuid.
| uuid | - uuid of the requested constraint |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find and return a pointer to a Constraint with the given uuid.
| uuid | - uuid of the requested constraint |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return named Constraint.
| name | - name of the Constraint to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return named Constraint.
| name | - name of the Constraint to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find and return named Constraint of a template type, for example Hinge:
agx::Hinge *hinge = simulation->getConstraint<agx::Hinge>("FrontWheelHinge");
| name | - name of the Constraint to find |
| recursive | - if true (default) the search will include sub-assemblies |
Definition at line 757 of file Assembly.h.
|
inherited |
Find and return named Constraint of a template type, for example Hinge:
const agx::Hinge* hinge = simulation->getConstraint<agx::Hinge>("FrontWheelHinge");
| name | - name of the Constraint to find |
| recursive | - if true (default) the search will include sub-assemblies |
Definition at line 763 of file Assembly.h.
|
inlineinherited |
Definition at line 632 of file Assembly.h.
|
inlineinherited |
Definition at line 633 of file Assembly.h.
|
inherited |
|
inlinestaticinherited |
Definition at line 247 of file LinkedStructure.h.
|
overridevirtual |
Get the current length of the cable, including any stretching.
The current length of an uninitialized cable is the length of the path created by the routing nodes added so far.
Reimplemented from agxSDK::LinkedStructure.
|
inlineprotectedinherited |
Definition at line 555 of file LinkedStructure.h.
|
staticprotectedinherited |
|
virtualinherited |
|
inherited |
|
virtualinherited |
|
virtualinherited |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
|
inlinevirtualinherited |
Return a reference to the frame containing transformation and velocity information for this assembly.
Definition at line 690 of file Assembly.h.
|
inlinevirtualinherited |
Definition at line 695 of file Assembly.h.
|
inherited |
Referenced by agxSDK::matchFilter().
|
inherited |
Find (linear search) and return named collision Geometry.
| name | - name of the collision Geometry to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return named collision Geometry.
| name | - name of the collision Geometry to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return a Geometry matching the given uuid.
| uuid | - uuid of the collision Geometry to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return a Geometry matching the given uuid.
| uuid | - uuid of the collision Geometry to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.h.
| agxCable::RouteInitializationReport agxCable::Cable::getInitializationReport | ( | ) | const |
|
inherited |
|
virtualinherited |
|
inherited |
|
inherited |
|
inherited |
|
virtualinherited |
Calculates and returns the total mass of this linked structure.
I.e., the total sum of all segments masses.
|
virtualinherited |
|
inherited |
| agx::UInt agxCable::Cable::getNumSegments | ( | ) | const |
Returns the number of segments in the cable.
Only valid after the cable has been fully initialized, i.e., added to a agxSDK::Simulation.
Results from the dry-runs performed by tryInitialize is not seen here. Inspect the report returned from tryInitialize instead.
|
inherited |
Find (linear search) and return an ObserverFrame matching the given uuid.
| name | - name of the ObserverFrame to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return an ObserverFrame matching the given uuid.
| name | - name of the ObserverFrame to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return an ObserverFrame matching the given uuid.
| uuid | - uuid of the ObserverFrame to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return an ObserverFrame matching the given uuid.
| uuid | - uuid of the ObserverFrame to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| agx::Real agxCable::Cable::getRadius | ( | ) | const |
|
inherited |
| agx::Real agxCable::Cable::getResolution | ( | ) | const |
Returns the resolution of the cable, measured in units of length per segment.
This value is updated by both the cable initialization and the dry-runs performed by tryInitialize.
|
overridevirtual |
Get the rest length of the cable.
For an initialized cable this is the sum of the segment lengths. For an uninitialized cable it is the length of the path created by the routing nodes added so far.
Reimplemented from agxSDK::LinkedStructure.
|
virtualinherited |
Calculates and returns the total volume of this linked structure, at rest.
|
inherited |
|
inherited |
Find (linear search) and return named RigidBody.
| name | - name of the body to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return named RigidBody.
| name | - name of the body to find |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return a pointer to a RigidBody with the given uuid.
| uuid | - uuid of the requested rigidbody |
| recursive | - if true (default) the search will include sub-assemblies |
|
inherited |
Find (linear search) and return a pointer to a RigidBody with the given uuid.
| uuid | - uuid of the requested rigidbody |
| recursive | - if true (default) the search will include sub-assemblies |
|
protected |
|
inlineprotectedinherited |
|
protectedinherited |
|
inlineinherited |
Definition at line 524 of file LinkedStructure.h.
References agx::InvalidIndex.
|
inlineinherited |
Definition at line 532 of file LinkedStructure.h.
References agx::InvalidIndex.
|
protectedinherited |
Definition at line 541 of file LinkedStructure.h.
|
protectedinherited |
Definition at line 547 of file LinkedStructure.h.
References agxSDK::LinkedSegmentIterator< T >::end().
| agxCable::SegmentRange agxCable::Cable::getSegments | ( | ) | const |
|
protectedinherited |
Range given begin and end segment index.
If end index is before begin, begin will become boundaryless. E.g., size = 10, begin = 8, end = 3, the resulting range will be 8, 9, 0, 1, 2 (3 is end).
Definition at line 511 of file LinkedStructure.h.
|
inlineinherited |
Definition at line 493 of file LinkedStructure.h.
|
inherited |
|
inherited |
|
inlineoverridevirtualinherited |
Reimplemented from agxSDK::Assembly.
Reimplemented in agxVehicle::Track.
Definition at line 247 of file LinkedStructure.h.
|
staticprotectedinherited |
Definition at line 469 of file LinkedStructure.h.
|
staticprotectedinherited |
Definition at line 476 of file LinkedStructure.h.
|
inherited |
|
virtualinherited |
|
inherited |
Definition at line 268 of file Serializable.h.
Referenced by agxSDK::UuidHashCollisionFilter::match().
|
virtualinherited |
|
virtualinherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
|
inherited |
Definition at line 252 of file Serializable.h.
References AGX_FORCE_INLINE.
|
overrideprotectedvirtual |
Called when addNotification is executed when this linked structure is added to the simulation.
Reimplemented from agxSDK::LinkedStructure.
Called when a new group has been added.
|
protectedvirtualinherited |
Called when an existing group has been removed.
|
protectedvirtualinherited |
Called on simulation last step event - after user lastStep.
|
protectedvirtualinherited |
Called when a new material has been assigned.
|
overrideprotectedvirtual |
Called on simulation post step event - after user postStep.
Reimplemented from agxSDK::LinkedStructure.
|
protectedvirtualinherited |
Called on simulation pre-collide step event - after user preCollide.
Reimplemented in agxVehicle::Track.
|
overrideprotectedvirtual |
Called on simulation pre step event - after user preStep.
Reimplemented from agxSDK::LinkedStructure.
|
protectedvirtualinherited |
Called when removeNotification is executed when this linked structure is removed from the simulation.
Reimplemented in agxVehicle::Track.
|
protectedvirtualinherited |
Called when collision state changed for given geometry.
|
virtualinherited |
Make the current relative positions of all nodes the rest state.
That is, when this call returns no constraint in this linked structure will be violated.
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.
|
inherited |
Remove a constraint from this assembly (does not recurse down in tree).
|
inherited |
Remove an interaction from this assembly.
|
inherited |
Remove an EventListener from the assembly.
|
inherited |
Remove a rigid body from this assembly (does not recurse down in tree).
| body | - The body to be removed |
| removeAssociatedGeometries | - If true, the geometries associated to this body will also be removed |
|
inherited |
Remove a geometry from this assembly (does not recurse down in tree).
|
inherited |
Remove a child assembly from a parent.
|
inherited |
Remove a contact material from this assembly.
|
inherited |
Remove an emitter from this assembly.
|
inherited |
Remove an ObserverFrame from this assembly.
|
virtualinherited |
Remove an added component from this linked structure.
| component | - component to remove |
|
protectedinherited |
|
virtualinherited |
Remove group id from all segments in this linked structure.
| id | - id to remove |
Remove group name from all segments in this linked structure.
| name | - name to remove |
|
finaloverridevirtualinherited |
Called when this linked structure is added to the simulation.
This callback is reserved for LinkedStructure but onRemoveNotification will be called in a similar way.
Reimplemented from agxSDK::Assembly.
Called when this assembly is removed from another assembly.
Reimplemented in agxPowerLine::PowerLine.
Definition at line 594 of file Assembly.h.
|
protectedinherited |
Remove a particle system from this assembly.
|
overridevirtualinherited |
Reimplemented from agxSDK::Assembly.
Reimplemented in agxVehicle::Track.
|
inherited |
Set the angular velocity (in world frame) recursively for all rigid bodies stored in assembly.
| velocity | - The angular velocity in world frame that will be set for all rigid bodies. |
|
virtualinherited |
Assigns angular velocity damping to all segments in this linked structure.
| angularVelocityDamping | - angular velocity damping (default: (0, 0, 0)) |
| void agxCable::Cable::setCableProperties | ( | agxCable::CableProperties * | cableProperties | ) |
Set the cable properties object used by this cable.
This will cause this cable to share properties with the cable from which the cable properties object was fetched.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
virtualinherited |
Enable/disable collisions between the rigid body and all segments of this linked structure.
| rb | - rigid body to enable/disable collisions with |
| enable | - true to enable, false to disable |
|
virtualinherited |
Enable/disable collisions between the geometry and all segments of this linked structure.
| geometry | - geometry to enable/disable collisions with |
| enable | - true to enable, false to disable |
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
|
virtualinherited |
Assigns linear velocity damping to all segments in this linked structure.
| linearVelocityDamping | - linear velocity damping (default: (0, 0, 0)) |
Set the position of the assembly relative to its frame's parent frame.
| p | - local translate of assembly as a 3D vector |
Set the position of the assembly relative to its frame's parent frame.
| x | - local x translate |
| y | - local y translate |
| z | - local z translate |
Set the rotation of the assembly relative to its frame's parent frame.
| q | - rotation given as a quaternion |
|
inherited |
Set the rotation of the assembly relative to its frame's parent frame.
| e | - rotation given as Euler angles |
|
inherited |
Assign the local transformation matrix for this assembly, ignoring any eventual parent transformation.
| matrix | - transformation matrix relative to parent transform for the assembly's frame |
|
virtualinherited |
Assign material to all segments in this linked structure.
| material | - material for the segments |
Set the name of this Assembly.
| name | - new name of this Assembly. |
|
inherited |
Set the parent frame of this assembly's frame.
This means that getLocalTranslate, getLocalRotate, getLocalTransform will be given in the parents coordinate frame. I.e., this frame's transformation will be concatenated with the parents.
| frame | - new parent frame, 0 to remove parent |
Set the position of the frame in world coordinates.
| p | - desired position in world coordinates. |
Set the position of the frame in world coordinates.
| x | - desired x-coordinate in world frame |
| y | - desired y-coordinate in world frame |
| z | - desired z-coordinate in world frame |
Set the rotation of the assembly relative to world frame.
| q | - rotation given as a quaternion |
|
inherited |
Set the rotation of the assembly relative to world frame.
| e | - rotation given as Euler angles |
|
inherited |
Set the rotation of the assembly relative to world frame.
| m | - rotation given as an orthogonal transformation matrix |
|
inherited |
Set the transform of the assembly.
Its frame will move to the specified transform, which is given in world coordinates.
| matrix | - desired transform for the frame in world coordinates. |
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!
Set the linear velocity (in world frame) recursively for all rigid bodies stored in assembly.
| velocity | - The linear velocity in world frame that will be set for all rigid bodies. |
|
overridevirtualinherited |
Reimplemented from agxSDK::Assembly.
Reimplemented in agxVehicle::Track.
|
virtualinherited |
Traverse the assembly tree recursively using a visitor.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
virtualinherited |
| agxCable::RouteInitializationReport agxCable::Cable::tryInitialize | ( | ) |
Make a dry-run of the cable initialization.
This will produce a report detailing the configuration of the cable that would be produced if added to the simulation right now. From this report one can read the routing error and the number of segments created.
The resolution of the cable is updated to match the resolution found by the test-initialization and can be queried using getResolution().
| agxCable::RouteInitializationReport agxCable::Cable::tryInitialize | ( | agx::Real | maxError | ) |
Make a dry-run with a specified maximum allowed routing error.
The error is the amount of overlap or gap between consecutive segments at initialization. The initialization process tries to find a resolution that produces an error that is below the given limit. This is not always possible.
If the cable is initialized without specifying a maximum error then an error limit is estimated from the route.
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.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
staticinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.