|
AGX Dynamics 2.41.2.0
|
Interface and placeholder of controllers/helpers for wires. More...
#include <Wire.h>
Inheritance diagram for agxWire::Wire:Classes | |
| struct | TensionData |
| Structure containing relevant tension data given one look-up. More... | |
Public Types | |
| typedef SimulationProxyT< agxSDK::StepEventListener > | base |
Public Member Functions | |
| Wire (agx::Real radius, agx::Real resolutionPerUnitLength, bool enableCollisions=true) | |
| Constructor given the basic parameters to create a wire. | |
| virtual bool | add (agxWire::Link *link, bool updateConnectionType=true) |
| Add link to the route. | |
| virtual bool | add (agxWire::Link *link, const agx::Vec3 &relativeTranslate) |
| Add link to the route. | |
| virtual bool | add (agxWire::Node *node) |
| Add node to this wire. | |
| virtual bool | add (agxWire::WireWinchController *winchController) |
| Add winch to this wire. | |
| virtual bool | add (agxWire::WireWinchController *winchController, agx::Real pulledInLength) |
| Add winch to this wire. | |
| void | addGroup (const agx::Name &name) |
| Add group for all geometries handled by this collision controller. | |
| void | addGroup (uint32_t id) |
| Add group for all geometries handled by this collision controller. | |
| virtual bool | attach (agxWire::Node *node, bool begin) |
| Attach this wire to a new object given new begin or end node and at which end. | |
| virtual bool | attach (agxWire::WireWinchController *winchController, bool begin) |
| Attach a winch to a free end of this wire. | |
| bool | changeRigidBody (agxWire::Node *node, agx::RigidBody *newRigidBody) const |
| Utility method to change rigid body in any node, given it has a valid node type. | |
| virtual agxWire::Wire * | clone (agxWire::Wire *newWire=nullptr) |
| Clone this wire object and return an empty, uninitialized wire. | |
| agxWire::WireRef | cut (agx::Real distanceAlongWire, size_t minimumResolution, bool includeWinchPulledInLength=true) |
| Cut this wire given distance from start (including winches). | |
| agxWire::WireRef | cut (const agx::Vec3 &worldPoint, size_t minimumResolution) |
| Cut this wire given any point in world. | |
| virtual bool | detach (bool begin) |
| Detach begin or end of this wire (if attached to something). | |
| agx::Vec3 | findPoint (agx::Real distanceFromStart) const |
Returns a point on this wire distanceFromStart meters from the beginning of this wire. | |
| agx::Vec3 | findPoint (agx::Real distanceFromStart, bool includesWinchesPulledInLength) const |
Returns a point on this wire distanceFromStart meters from the beginning of this wire. | |
| agx::Vec3 | findPoint (const agx::Vec3 &point) const |
| Given any point in 3D, this method will find a point on this wire which is closest to the given point. | |
| agx::Real | findRestLength (bool includeWinches=true) const |
| Extended functionality, compared to getRestLength, to find rest length of this wire in a agxWire::Winch and agxWire::Link system. | |
| agx::Real | findRestLengthFromStart (const agx::Vec3 &point, bool includeWinchesPulledInLength=true) const |
| Given any point in 3D, this method will find the distance along this wire which is closest to the given point. | |
| agxWire::WireContactController * | getActiveContactController () const |
| WireContactControllerType | getActiveContactControllerType () const |
| const agxWire::WireAttachmentController * | getBeginAttachment () const |
| Return pointer to the attachment controller used at begin of the wire constraint. | |
| agxWire::WireDistanceCompositeConstraint * | getConstraint () const |
| agx::Real | getContactNodeMomentum () const |
| agx::Real | getCurrentLength (bool includeWinches=true) const |
| Calculates the current length of this wire (stretched/compressed included). | |
| agx::Real | getCurrentLength (const agxWire::Node *node1, const agxWire::Node *node2) const |
| Calculates the current length between node1 and node2 in wire coordinates. | |
| agx::Real | getCurrentLengthScaler (const agxWire::Node *node) const |
| Given node on this wire, calculates the transform from rest length to current length. | |
| bool | getEnableCollisions () const |
| bool | getEnableCollisions (const agx::RigidBody *rb) const |
| bool | getEnableCollisions (const agxCollide::Geometry *geometry) const |
| bool | getEnableSplitting () const |
| const agxWire::WireAttachmentController * | getEndAttachment () const |
| Return pointer to the attachment controller used at end of the wire constraint. | |
| agxWire::Node * | getFirstNode () const |
| agx::Frame * | getFrame () const |
| This wire has a frame which is the parent frame of all internal bodies. | |
| void | getGeometries (agxCollide::GeometryPtrVector &geoms) const |
Fills geoms with all geometries used by this wire. | |
| agxWire::WireGeometryController * | getGeometryController () const |
| agxWire::Node * | getLastNode () const |
| agx::Real | getLinearVelocityDamping () const |
| agx::Real | getMass () const |
| agx::Material * | getMaterial () const |
| agxWire::WireMaterialController * | getMaterialController () const |
| agxWire::WireParameterController * | getParameterController () const |
| agx::PropertyContainer * | getPropertyContainer () |
| const agx::PropertyContainer * | getPropertyContainer () const |
| agx::Real | getRadius () const |
| agx::Real | getRadiusIncludingContactNodeOffsetDistanceMultiplier () const |
| agxWire::RenderIterator | getRenderBeginIterator () const |
| agxWire::RenderIterator | getRenderEndIterator () const |
| bool | getRenderListEmpty () const |
| agx::Real | getResolutionPerUnitLength () const |
| virtual agx::Real | getRestLength (bool includeWinches=true) const |
| Calculates the rest length of this wire. | |
| agx::Real | getRestLength (const agxWire::Node *node1, const agxWire::Node *node2) const |
| Calculates the rest length between two nodes (node1 and node2). | |
| agx::Real | getRestLengthScaler (const agxWire::Node *node) const |
| Given node on this wire, calculates the transform from current length to rest length. | |
| agxWire::WireRouteController * | getRouteController () const |
| agxWire::WireSimplifyController * | getSimplifyController () const |
| const agxUtil::SmoothingFilter * | getSmoothingFilter () const |
| agx::SolveIslandSplitAlgorithm * | getSplitAlgorithm () const |
| Get pointer to solve algorithm. | |
| agxWire::WireStabilityController * | getStabilityController () const |
| agxWire::WireSegmentTensionData | getTension (agx::Real distanceFromStart) const |
| Returns the current tension in a point given distance from start of this wire. | |
| agxWire::WireSegmentTensionData | getTension (const agx::Vec3 &point) const |
| Given any point in 3D, this method will find a point on this wire which is closest to the given point and returns the current tension in that point. | |
| agxWire::WireNodeTensionData | getTension (const agxWire::Node *node) const |
| agxWire::WireWinchController * | getWinchController (size_t i) const |
| bool | hasContactNodesOn (const agx::RigidBody *rb) const |
| bool | hasContactNodesOn (const agxCollide::Geometry *geometry) const |
| bool | hasGeometry (const agxCollide::Geometry *geometry) const |
| bool | hasGroup (const agx::Name &name) const |
| Find if wire geometries contains group. | |
| bool | hasGroup (const uint32_t id) const |
| Find if wire geometries contains group. | |
| bool | hasNode (const agxWire::Node *node) const |
| bool | hasPropertyContainer () const |
| bool | initialized () const |
| bool | insert (agxWire::Node *node, agx::Real distanceFromStart, bool includeWinchPulledInLength=true) |
| Insert a node in this given distance along this wire. | |
| bool | insert (agxWire::Node *node, const agx::Vec3 &worldPoint) |
| Insert a node given a point in world coordinate system. | |
| bool | isSimplified () const |
| bool | merge (agxWire::WireRef other) |
Merge this wire with other wire. | |
| virtual void | post (const agx::TimeStamp &t) override |
| Clean up after splitting. | |
| virtual void | pre (const agx::TimeStamp &t) override |
| Run stability update. | |
| virtual void | preCollide (const agx::TimeStamp &) override |
| Update geometries. | |
| virtual bool | remove (agxWire::Node *node) |
| Remove node from this wire. | |
| virtual bool | remove (agxWire::WireWinchController *winchController) |
| Remove winch from this wire. | |
| void | removeGeometries () |
| Removes all geometries. | |
| void | removeGroup (const agx::Name &name) |
| Remove group for all geometries handled by this collision controller. | |
| void | removeGroup (uint32_t id) |
| Remove group for all geometries handled by this collision controller. | |
| bool | replaceBodyInNodes (agx::RigidBody *currentBody, agx::RigidBody *newBody, agxCollide::Geometry *geometry=nullptr) |
Given currentBody, go through all bodies related to this Wire and replace them with newBody. | |
| void | replaceContactNodesWithShapeContacts () |
| Replace all contact nodes with shape contact nodes. | |
| bool | reverse () |
| Reverse this wire - use to match merge where first wire end is connected to second wire begin. | |
| agx::Real | scaleToCurrentlength (agx::Real restLength, const agxWire::Node *node) const |
| Scale rest length to current length. | |
| agx::Real | scaleToRestlength (agx::Real currentLength, const agxWire::Node *node) const |
| Scale current length in world coordinates to rest length. | |
| void | setActiveContactControllerType (const WireContactControllerType type) |
| Choose the type of WireContactController to use Default is the WireShapeContactController. | |
| void | setEnableCollisions (agx::RigidBody *rb, bool enable) |
| Enable or disable collisions between all geometries in a rigid body and this wire. | |
| void | setEnableCollisions (agxCollide::Geometry *geometry, bool enable, bool forceContactUpdate=false) |
| Enable or disable collisions between a geometry and this wire. | |
| void | setEnableCollisions (bool enable) |
| Enable or disable this wire collision handling (i.e., if false, this wire will only contain bodies and constraints, no geometries) | |
| void | setEnableSplitting (bool splitting) |
| enable/disable the ability to automatically split the wire at a body fixed node. | |
| void | setFrame (agx::Frame *frame) |
| Assign new parent frame to this wire. | |
| void | setInitializationController (agxWire::WireInitializationController *initializationController) |
| Assign initialization controller for this wire. | |
| void | setIsBendResistent (bool isBendResistant) |
| This determines if the wire should have a bend constraint or not. | |
| void | setLinearVelocityDamping (agx::Real linearVelocityDamping) |
| Assigns linear velocity damping to all lumped nodes (i.e., rigid bodies owned by this wire) in this wire. | |
| virtual void | setMaterial (agx::Material *material) |
| Sets the material for this wire. | |
| void | setPropertyContainer (agx::PropertyContainer *propertyContainer) |
| Property container for all rigid bodies and geometries that are owned by this wire. | |
| virtual void | setRadius (agx::Real radius) |
| Set the radius of this wire. | |
| void | setResolutionPerUnitLength (agx::Real resolutionPerUnitLength) |
| Assign new resolution per unit length. | |
| bool | setRouteController (agxWire::WireRouteController *routeController, bool copyCurrentRouteToNew=false) |
| Associate new, own implemented, route controller to this wire. | |
| void | setSmoothedTension (agx::Real newSmoothedTension) |
| Assign smoothed tension (can be useful after certain events, like cut) to this wire. | |
| void | setSmoothedTension (agx::Real newSmoothedTension, agxWire::NodeIterator from, agxWire::NodeIterator to) |
| Assign smoothed tension (can be useful after certain events, like cut) to part of this wire. | |
| void | setSmoothingFilter (agxUtil::SmoothingFilter *filter) |
| Assign filter that will be used to filter out the tension values for smoothed tension readings. | |
| void | setSolveType (agx::Constraint::SolveType solveType) |
| Set solve type, either DIRECT, ITERATIVE or DIRECT_AND_ITERATIVE. | |
| bool | shorten (const agxWire::Node *toNode, bool fromBegin) |
| Shorten this wire to a given node. | |
| bool | simplify (const agx::Frame *parentFrame=nullptr) |
| Simplify this wire. | |
| bool | unsimplify () |
| Unsimplify this wire. | |
| void | updateNodeTransforms () |
| Updates all node transforms. | |
Static Public Member Functions | |
| static agxWire::Wire * | find (agxSDK::Simulation *simulation, const agx::Name &name) |
| Find wire instance given simulation and name. | |
| static agxWire::Wire * | find (agxSDK::Simulation *simulation, const agx::Uuid &uuid) |
| Find wire instance given simulation and unique id. | |
| static agxWire::WirePtrVector | findAll (const agxSDK::Simulation *simulation) |
| Finds all agxWire::Wire instances in the given simulation. | |
| static agxWire::WirePtrVector | findAll (const agxSDK::Simulation *simulation, const agx::Name &name) |
| Finds all wire instances given simulation and name. | |
| static agxWire::BodyFixedNode * | getLumpedNode (agx::RigidBody *rb) |
| static const agxWire::BodyFixedNode * | getLumpedNode (const agx::RigidBody *rb) |
| static agxWire::Wire * | getWire (agx::RigidBody *rb) |
| static agxWire::Wire * | getWire (agxCollide::Geometry *geometry) |
| static const agxWire::Wire * | getWire (const agx::RigidBody *rb) |
| static const agxWire::Wire * | getWire (const agxCollide::Geometry *geometry) |
| static agx::Bool | isLumpedNode (const agx::RigidBody *rb) |
| static void | setEnableGroupWireCollision (agxCollide::Space *space, const agx::UInt32 group, bool enable) |
| Enable/Disable a group (unique group id) against all wires. | |
Protected Member Functions | |
| Wire () | |
| Serializable. | |
| virtual | ~Wire () |
| Reference counted class, protected destructor. | |
| virtual void | addNotification () override |
| Called when this wire is added to a simulation, if this wire hasn't been initialized before this call it will initialize it self during this call. | |
| agxWire::WireAttachmentController * | getBeginAttachment () |
| Return pointer to the attachment controller used at begin of the wire constraint. | |
| agxWire::WireAttachmentController * | getEndAttachment () |
| Return pointer to the attachment controller used at end of the wire constraint. | |
| agxSDK::EventListener::Type | getType () const |
| Hide eventListenerType getType() | |
| virtual void | removeNotification () override |
| Called when this wire is removed from the simulation. | |
| virtual void | setWinchController (agxWire::WireWinchController *winchController, bool begin) |
| Assign new winch controller to this wire. | |
| void | updateMaterial () |
| Loop through all nodes and update mass (and material NOT IMPLEMENTED) | |
Protected Attributes | |
| WireDistanceCompositeConstraintRef | m_constraint |
| agx::FrameRef | m_frame |
| WireFrictionControllerRef | m_frictionController |
| WireGeometryControllerRef | m_geometryController |
| WireInitializationControllerRef | m_initializationController |
| bool | m_initialized |
| agx::ref_ptr< agx::Referenced > | m_internalData |
| agx::Real | m_linearVelocityDamping |
| Only linear velocity damping as real is defined for lumped nodes. | |
| WireMaterialControllerRef | m_materialController |
| WireParameterController | m_parameterController |
| agx::PropertyContainerRef | m_propertyContainer |
| agx::ref_ptr< agx::Referenced > | m_propertyController |
| WireRouteControllerRef | m_routeController |
| WireSimplifyControllerRef | m_simplifyController |
| agxUtil::SmoothingFilterRef | m_smoothingFilter |
| agx::Constraint::SolveType | m_solveType |
| agx::ref_ptr< agx::Referenced > | m_splitAlgorithm |
| bool | m_splitEnabled |
| WireStabilityControllerRef | m_stabilityController |
| WireWinchControllerRefVector | m_winchControllers |
| Winch controller vector, always of size 2, default both 0. | |
| typedef SimulationProxyT< agxSDK::StepEventListener > agxWire::Wire::base |
| agxWire::Wire::Wire | ( | agx::Real | radius, |
| agx::Real | resolutionPerUnitLength, | ||
| bool | enableCollisions = true |
||
| ) |
Constructor given the basic parameters to create a wire.
| radius | - radius of this wire given in dimension of length |
| resolutionPerUnitLength | - resolution per unit length, i.e., how many discrete nodes that may appear per unit length (length = 10 m, resolutionPerUnitLength = 2 gives at maximum 20 nodes, length 10 m, resolutionPerUnitLength = 0.5 gives at maximum 5 nodes) |
| enableCollisions | - default true. If false, this wire can not collide with anything and will not handle or insert geometries |
|
protected |
Serializable.
Default constructor.
|
protectedvirtual |
Reference counted class, protected destructor.
|
virtual |
Add link to the route.
Default behavior is that the route determines the connection type of the link connection and overwrites the old connection type. If updateConnectionType is false this call will fail if the connection types mismatches.
| link | - link with predefined connection to this wire |
| updateConnectionType | - default true to update connection in the link given the current route of this wire, false to fail if connection type mismatch |
|
virtual |
Add link to the route.
This method will connect this wire to the link and add the link to the route, i.e., equivalent to: link->connect( wire, relativeTranslate, connectionType ); wire->add( link ); The connection type will be determined given the current route.
| link | - link to connect to and add to route |
| relativeTranslate | - position in this links frame where the connection point is |
|
virtual |
Add node to this wire.
Note that this call only is valid during initial route, i.e., it is not possible to add nodes when this wire is initialized.
| node | - node to add to this wire |
|
virtual |
Add winch to this wire.
Note that this call only is valid during initial route. I.e., it's not possible to add winches when this wire is initialized.
| winchController | - winch to add |
|
virtual |
Add winch to this wire.
Note that this call only is valid during initial route. I.e., it's not possible to add winches when this wire is initialized.
| winchController | - winch |
| pulledInLength | - length rolled up on the winch |
| void agxWire::Wire::addGroup | ( | const agx::Name & | name | ) |
Add group for all geometries handled by this collision controller.
| name | - name for the new group |
| void agxWire::Wire::addGroup | ( | uint32_t | id | ) |
Add group for all geometries handled by this collision controller.
| id | - id for the new group |
|
overrideprotectedvirtual |
Called when this wire is added to a simulation, if this wire hasn't been initialized before this call it will initialize it self during this call.
|
virtual |
Attach this wire to a new object given new begin or end node and at which end.
If this wire is attached (i.e., first or last node != free node) a detach will be performed before attach. Valid types of node is Node::BODY_FIXED and Node::CONNECTING. It is not valid to attach from an end where a winch is located.
| node | - new begin or end node (body fixed or connecting) |
| begin | - if true, node will be new begin attachment - otherwise new end attachment |
|
virtual |
Attach a winch to a free end of this wire.
If an object is attached to begin, it will be detached, and this winch controller will be attached at this position instead.
| winchController | - winch controller to attach |
| begin | - true if winchController should be attached at begin, false at end |
| bool agxWire::Wire::changeRigidBody | ( | agxWire::Node * | node, |
| agx::RigidBody * | newRigidBody | ||
| ) | const |
Utility method to change rigid body in any node, given it has a valid node type.
Valid node types are: agxWire::Node::BODY_FIXED, agxWire::Node::CONNECTING and agxWire::Node::EYE.
Notes: BODY_FIXED: If this fixed node is part of a connecting node (cm-node) the body will be changed in the connecting node as well. CONNECTING: If connecting node its center of mass node (fixed) will also change rigid body. EYE: If eye node, and "double eye" was created, both eye nodes will change rigid body.
The node will have the same position in world coordinates after the call to this method. I.e., a new local offset is calculated as well.
| node | - node to change rigid body on (see "Notes" above) |
| newRigidBody | - the new rigid body (if 0, the node will be connected in world) |
|
virtual |
Clone this wire object and return an empty, uninitialized wire.
Used during cut.
| newWire | - if not null this object is interpreted as the clone (i.e., no 'new' will be created in clone) |
| agxWire::WireRef agxWire::Wire::cut | ( | agx::Real | distanceAlongWire, |
| size_t | minimumResolution, | ||
| bool | includeWinchPulledInLength = true |
||
| ) |
Cut this wire given distance from start (including winches).
If successful cut, a new wire is returned with at least minimumResolution number of lumps. The new wire is added to the simulation if this wire was in a simulation.
| distanceAlongWire | - distance along this wire where the cut should be made |
| minimumResolution | - minimum number of lumps the wires (this and the new) after cut (if very short for example) |
| includeWinchPulledInLength | - default true, if false any pulled in length in begin winch will be ignored |
| agxWire::WireRef agxWire::Wire::cut | ( | const agx::Vec3 & | worldPoint, |
| size_t | minimumResolution | ||
| ) |
Cut this wire given any point in world.
The cut position will be the one closest to worldPoint on this wire. If successful cut, a new wire is returned with at least minimumResolution number of lumps. The new wire is added to the simulation if this wire was in a simulation.
| worldPoint | - any point in world |
| minimumResolution | - minimum number of lumps the wires (this and the new) after cut (if very short for example) |
|
virtual |
Detach begin or end of this wire (if attached to something).
| begin | - if true, begin of this wire will be detached - otherwise end |
|
static |
Find wire instance given simulation and name.
| simulation | - simulation |
| name | - name of wire instance to find |
|
static |
Find wire instance given simulation and unique id.
| simulation | - simulation |
| uuid | - UUID of wire instance to find |
|
static |
Finds all agxWire::Wire instances in the given simulation.
| simulation | - simulation |
|
static |
Finds all wire instances given simulation and name.
| simulation | - simulation |
| name | - name of wire instances to find |
Returns a point on this wire distanceFromStart meters from the beginning of this wire.
Any winch (etc) that can hold/hide parts of this wire is included in the distance. I.e., if a winch, at begin, has 500 meters pulled in and distanceFromStart = 501, the point at 1 meter from the winch is returned.
| distanceFromStart | - distance from start including winch pulled in length |
distanceFromStart away | agx::Vec3 agxWire::Wire::findPoint | ( | agx::Real | distanceFromStart, |
| bool | includesWinchesPulledInLength | ||
| ) | const |
Returns a point on this wire distanceFromStart meters from the beginning of this wire.
If includesWinchesPulledInLength is true, distanceFromStart is assumed to include any pulled in wire at the beginning of this wire. If includesWinchesPulledInLength is false, the distance is assumed to be given from the first visible node of the wire.
| distanceFromStart | - distance from start |
| includesWinchesPulledInLength | - true if distanceFromStart include a begin winch pulled in length, false if distanceFromStart does not include a begin winch pulled in length |
distanceFromStart away Given any point in 3D, this method will find a point on this wire which is closest to the given point.
| point | - any point |
point | agx::Real agxWire::Wire::findRestLength | ( | bool | includeWinches = true | ) | const |
Extended functionality, compared to getRestLength, to find rest length of this wire in a agxWire::Winch and agxWire::Link system.
If this wire is attached to a winch and a link is being pulled in, getRestLength will either return a misleading or zero length but this method will find the actual rest length.
| includeWinches | - if true, the winches pulled in length will be added to the simulated rest length. |
| agx::Real agxWire::Wire::findRestLengthFromStart | ( | const agx::Vec3 & | point, |
| bool | includeWinchesPulledInLength = true |
||
| ) | const |
Given any point in 3D, this method will find the distance along this wire which is closest to the given point.
| point | - any point |
| includeWinchesPulledInLength | - if true the algorithm will take the pulled in length, of the begin winch, into account |
| agxWire::WireContactController * agxWire::Wire::getActiveContactController | ( | ) | const |
| WireContactControllerType agxWire::Wire::getActiveContactControllerType | ( | ) | const |
|
protected |
Return pointer to the attachment controller used at begin of the wire constraint.
| const agxWire::WireAttachmentController * agxWire::Wire::getBeginAttachment | ( | ) | const |
Return pointer to the attachment controller used at begin of the wire constraint.
|
inline |
Definition at line 1082 of file Wire.h.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
| agx::Real agxWire::Wire::getContactNodeMomentum | ( | ) | const |
| agx::Real agxWire::Wire::getCurrentLength | ( | bool | includeWinches = true | ) | const |
Calculates the current length of this wire (stretched/compressed included).
If the winches are included their pulled in length will be added to the simulated current length.
| includeWinches | - if true, their pulled in length will be added to the simulated current length |
| agx::Real agxWire::Wire::getCurrentLength | ( | const agxWire::Node * | node1, |
| const agxWire::Node * | node2 | ||
| ) | const |
Calculates the current length between node1 and node2 in wire coordinates.
Note that node1 has to be before node2 in this wire, i.e., if you travel along the wire from the beginning, the first node of the two you meet is node1.
| node1 | - first wire node |
| node2 | - second wire node |
| agx::Real agxWire::Wire::getCurrentLengthScaler | ( | const agxWire::Node * | node | ) | const |
Given node on this wire, calculates the transform from rest length to current length.
| node | - node on this wire, close to where the scale is about to be used |
| bool agxWire::Wire::getEnableCollisions | ( | ) | const |
| bool agxWire::Wire::getEnableCollisions | ( | const agx::RigidBody * | rb | ) | const |
| bool agxWire::Wire::getEnableCollisions | ( | const agxCollide::Geometry * | geometry | ) | const |
| bool agxWire::Wire::getEnableSplitting | ( | ) | const |
|
protected |
Return pointer to the attachment controller used at end of the wire constraint.
| const agxWire::WireAttachmentController * agxWire::Wire::getEndAttachment | ( | ) | const |
Return pointer to the attachment controller used at end of the wire constraint.
| agxWire::Node * agxWire::Wire::getFirstNode | ( | ) | const |
| agx::Frame * agxWire::Wire::getFrame | ( | ) | const |
This wire has a frame which is the parent frame of all internal bodies.
| void agxWire::Wire::getGeometries | ( | agxCollide::GeometryPtrVector & | geoms | ) | const |
Fills geoms with all geometries used by this wire.
| geoms | - geometry vector to fill |
|
inline |
| agxWire::Node * agxWire::Wire::getLastNode | ( | ) | const |
| agx::Real agxWire::Wire::getLinearVelocityDamping | ( | ) | const |
|
static |
| rb | - any rigid body |
rb is a lumped node, otherwise null
|
static |
| rb | - any rigid body |
rb is a lumped node, otherwise null | agx::Real agxWire::Wire::getMass | ( | ) | const |
| agx::Material * agxWire::Wire::getMaterial | ( | ) | const |
|
inline |
|
inline |
| agx::PropertyContainer * agxWire::Wire::getPropertyContainer | ( | ) |
| const agx::PropertyContainer * agxWire::Wire::getPropertyContainer | ( | ) | const |
| agx::Real agxWire::Wire::getRadius | ( | ) | const |
| agx::Real agxWire::Wire::getRadiusIncludingContactNodeOffsetDistanceMultiplier | ( | ) | const |
| agxWire::RenderIterator agxWire::Wire::getRenderBeginIterator | ( | ) | const |
| agxWire::RenderIterator agxWire::Wire::getRenderEndIterator | ( | ) | const |
| bool agxWire::Wire::getRenderListEmpty | ( | ) | const |
| agx::Real agxWire::Wire::getResolutionPerUnitLength | ( | ) | const |
|
virtual |
Calculates the rest length of this wire.
If the winches are included their pulled in length will be added to the simulated rest length. Note that this wire doesn't have a rest length before it's initialized.
| includeWinches | - if true, their pulled in length will be added to the simulated rest length |
| agx::Real agxWire::Wire::getRestLength | ( | const agxWire::Node * | node1, |
| const agxWire::Node * | node2 | ||
| ) | const |
Calculates the rest length between two nodes (node1 and node2).
Note that node1 has to be before node2 in this wire, i.e., if you travel along the wire from the beginning, the first node of the two you meet is node1.
| node1 | - first wire node |
| node2 | - second wire node |
| agx::Real agxWire::Wire::getRestLengthScaler | ( | const agxWire::Node * | node | ) | const |
Given node on this wire, calculates the transform from current length to rest length.
| node | - node on this wire, close to where the scale is about to be used |
|
inline |
| agxWire::WireSimplifyController * agxWire::Wire::getSimplifyController | ( | ) | const |
| const agxUtil::SmoothingFilter * agxWire::Wire::getSmoothingFilter | ( | ) | const |
| agx::SolveIslandSplitAlgorithm * agxWire::Wire::getSplitAlgorithm | ( | ) | const |
Get pointer to solve algorithm.
|
inline |
| agxWire::WireSegmentTensionData agxWire::Wire::getTension | ( | agx::Real | distanceFromStart | ) | const |
Returns the current tension in a point given distance from start of this wire.
Any winch (etc) that can hold/hide parts of this wire is included in the distance. I.e., if a winch, at begin, has 500 meters pulled in and distanceFromStart = 501, the tension at 1 meter from the winch is returned.
| distanceFromStart | - distance from start including winch pulled in length |
| agxWire::WireSegmentTensionData agxWire::Wire::getTension | ( | const agx::Vec3 & | point | ) | const |
Given any point in 3D, this method will find a point on this wire which is closest to the given point and returns the current tension in that point.
| point | - any point |
point | agxWire::WireNodeTensionData agxWire::Wire::getTension | ( | const agxWire::Node * | node | ) | const |
|
protected |
Hide eventListenerType getType()
| agxWire::WireWinchController * agxWire::Wire::getWinchController | ( | size_t | i | ) | const |
i is larger than 2 or if there's no winch at the desired position.
|
static |
| rb | - any rigid body |
rb is an active wire lumped node, otherwise null
|
static |
| geometry | - any geometry |
geometry is an active wire geometry, otherwise null
|
static |
| rb | - any rigid body |
rb is an active wire lumped node, otherwise null
|
static |
| geometry | - any geometry |
geometry is an active wire geometry, otherwise null | bool agxWire::Wire::hasContactNodesOn | ( | const agx::RigidBody * | rb | ) | const |
rb | bool agxWire::Wire::hasContactNodesOn | ( | const agxCollide::Geometry * | geometry | ) | const |
geometry | bool agxWire::Wire::hasGeometry | ( | const agxCollide::Geometry * | geometry | ) | const |
| bool agxWire::Wire::hasGroup | ( | const agx::Name & | name | ) | const |
Find if wire geometries contains group.
| bool agxWire::Wire::hasGroup | ( | const uint32_t | id | ) | const |
Find if wire geometries contains group.
| bool agxWire::Wire::hasNode | ( | const agxWire::Node * | node | ) | const |
node - otherwise false | bool agxWire::Wire::hasPropertyContainer | ( | ) | const |
Definition at line 1099 of file Wire.h.
References agx::ref_ptr< T >::isValid().
|
inline |
| bool agxWire::Wire::insert | ( | agxWire::Node * | node, |
| agx::Real | distanceFromStart, | ||
| bool | includeWinchPulledInLength = true |
||
| ) |
Insert a node in this given distance along this wire.
If distanceFromStart exceeds the current total route length the node will be added instead.
| node | - node to insert |
| distanceFromStart | - distance from start, including pulled in length in begin winch, of this wire where the node should be inserted |
| includeWinchPulledInLength | - default true and should always be true unless a very special winch is used |
| bool agxWire::Wire::insert | ( | agxWire::Node * | node, |
| const agx::Vec3 & | worldPoint | ||
| ) |
Insert a node given a point in world coordinate system.
worldPoint will be projected onto the wire so the insert point will be the closest point on the wire to worldPoint.
| node | - node to insert |
| worldPoint | - point in world |
|
static |
| rb | - rigid body to check if a wire lumped node |
rb is a wire lumped node Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
| bool agxWire::Wire::isSimplified | ( | ) | const |
| bool agxWire::Wire::merge | ( | agxWire::WireRef | other | ) |
Merge this wire with other wire.
The end of this wire and the begin of the other wire has to be free. The end point of this and the start of the other will be merged.
All properties and parameters from this wire will be used. E.g., if this and other has different radii, the radius of this wire is the final.
| other | - other wire to merge this wire with |
other will be empty and removed from simulation) - otherwise false
|
overridevirtual |
Clean up after splitting.
|
overridevirtual |
Run stability update.
|
overridevirtual |
Update geometries.
|
virtual |
Remove node from this wire.
| node | - node to remove |
|
virtual |
Remove winch from this wire.
| winchController | - winch controller to remove |
| void agxWire::Wire::removeGeometries | ( | ) |
Removes all geometries.
| void agxWire::Wire::removeGroup | ( | const agx::Name & | name | ) |
Remove group for all geometries handled by this collision controller.
| name | - name for the group to remove |
| void agxWire::Wire::removeGroup | ( | uint32_t | id | ) |
Remove group for all geometries handled by this collision controller.
| id | - id for the group to remove |
|
overrideprotectedvirtual |
Called when this wire is removed from the simulation.
| bool agxWire::Wire::replaceBodyInNodes | ( | agx::RigidBody * | currentBody, |
| agx::RigidBody * | newBody, | ||
| agxCollide::Geometry * | geometry = nullptr |
||
| ) |
Given currentBody, go through all bodies related to this Wire and replace them with newBody.
If geom != nullptr then only operate on the contactnodes which is associated with the specified geometry (geom).
| currentBody | - The body currently present in the LineComposite |
| newBody | - The body that will replace the currentBody |
| geometry | - |
| void agxWire::Wire::replaceContactNodesWithShapeContacts | ( | ) |
Replace all contact nodes with shape contact nodes.
| bool agxWire::Wire::reverse | ( | ) |
Reverse this wire - use to match merge where first wire end is connected to second wire begin.
| agx::Real agxWire::Wire::scaleToCurrentlength | ( | agx::Real | restLength, |
| const agxWire::Node * | node | ||
| ) | const |
Scale rest length to current length.
| restLength | - length in world coordinates |
| node | - node where the scale should be calculated |
| agx::Real agxWire::Wire::scaleToRestlength | ( | agx::Real | currentLength, |
| const agxWire::Node * | node | ||
| ) | const |
Scale current length in world coordinates to rest length.
| currentLength | - length in world coordinates |
| node | - node where the scale should be calculated |
| void agxWire::Wire::setActiveContactControllerType | ( | const WireContactControllerType | type | ) |
Choose the type of WireContactController to use Default is the WireShapeContactController.
The alternative is WireOldContactController,
| void agxWire::Wire::setEnableCollisions | ( | agx::RigidBody * | rb, |
| bool | enable | ||
| ) |
Enable or disable collisions between all geometries in a rigid body and this wire.
| rb | - rigid body |
| enable | - if true, collisions will be enabled, if false, disabled |
| void agxWire::Wire::setEnableCollisions | ( | agxCollide::Geometry * | geometry, |
| bool | enable, | ||
| bool | forceContactUpdate = false |
||
| ) |
Enable or disable collisions between a geometry and this wire.
| geometry | - geometry to enable/disable collisions against |
| enable | - if true, collisions will be enabled, if false, disabled |
| forceContactUpdate | - if true when disabling contacts, existing contacts will be removed, otherwise not. |
| void agxWire::Wire::setEnableCollisions | ( | bool | enable | ) |
Enable or disable this wire collision handling (i.e., if false, this wire will only contain bodies and constraints, no geometries)
| enable | - if true, collision handling will be enabled, false disabled |
|
static |
Enable/Disable a group (unique group id) against all wires.
| void agxWire::Wire::setEnableSplitting | ( | bool | splitting | ) |
enable/disable the ability to automatically split the wire at a body fixed node.
That means temporarily making that body fixed node kinematic, and ignoring the bend constraint with that node in the middle.
Internal method chooses the body fixed nodes, and if it is possible to split.
| void agxWire::Wire::setFrame | ( | agx::Frame * | frame | ) |
Assign new parent frame to this wire.
All objects in this wire will inherit this parent transform.
| void agxWire::Wire::setInitializationController | ( | agxWire::WireInitializationController * | initializationController | ) |
Assign initialization controller for this wire.
If initializationController is zero the default controller will be assigned.
| initializationController | - new initialization controller |
| void agxWire::Wire::setIsBendResistent | ( | bool | isBendResistant | ) |
This determines if the wire should have a bend constraint or not.
| isBendResistant | - true if we want a bend constraint |
| void agxWire::Wire::setLinearVelocityDamping | ( | agx::Real | linearVelocityDamping | ) |
Assigns linear velocity damping to all lumped nodes (i.e., rigid bodies owned by this wire) in this wire.
Since all rigid bodies are particles it's defined to have direction dependent damping.
| linearVelocityDamping | - linear velocity damping > 0 |
|
virtual |
Sets the material for this wire.
| material | - new material |
| void agxWire::Wire::setPropertyContainer | ( | agx::PropertyContainer * | propertyContainer | ) |
Property container for all rigid bodies and geometries that are owned by this wire.
| propertyContainer | - new property container |
|
virtual |
Set the radius of this wire.
| radius | - new radius > 0 |
| void agxWire::Wire::setResolutionPerUnitLength | ( | agx::Real | resolutionPerUnitLength | ) |
Assign new resolution per unit length.
| resolutionPerUnitLength | - resolution per unit length, i.e., how many discrete nodes that may appear per unit length (length = 10 m, resolutionPerUnitLength = 2 gives at maximum 20 nodes, length 10 m, resolutionPerUnitLength = 0.5 gives at maximum 5 nodes) |
| bool agxWire::Wire::setRouteController | ( | agxWire::WireRouteController * | routeController, |
| bool | copyCurrentRouteToNew = false |
||
| ) |
Associate new, own implemented, route controller to this wire.
Implement add, remove and insert in your own route controller to define the behaviors during these calls.
| routeController | - new route controller, ignored if null |
| copyCurrentRouteToNew | - if true, and a route is partially done before this call, the routed nodes will be added to the new route |
| void agxWire::Wire::setSmoothedTension | ( | agx::Real | newSmoothedTension | ) |
Assign smoothed tension (can be useful after certain events, like cut) to this wire.
| newSmoothedTension | - the new smoothed tension |
| void agxWire::Wire::setSmoothedTension | ( | agx::Real | newSmoothedTension, |
| agxWire::NodeIterator | from, | ||
| agxWire::NodeIterator | to | ||
| ) |
Assign smoothed tension (can be useful after certain events, like cut) to part of this wire.
| newSmoothedTension | - the new smoothed tension |
| from | - from node |
| to | - to node |
| void agxWire::Wire::setSmoothingFilter | ( | agxUtil::SmoothingFilter * | filter | ) |
Assign filter that will be used to filter out the tension values for smoothed tension readings.
If no filter is set (or 0) in the argument, no filter will be used.
| filter | - filter which will be used to smooth the smoothed tension values |
| void agxWire::Wire::setSolveType | ( | agx::Constraint::SolveType | solveType | ) |
Set solve type, either DIRECT, ITERATIVE or DIRECT_AND_ITERATIVE.
|
protectedvirtual |
Assign new winch controller to this wire.
| winchController | - new winch controller |
| begin | - true if new winch controller is at begin, false at end |
| bool agxWire::Wire::shorten | ( | const agxWire::Node * | toNode, |
| bool | fromBegin | ||
| ) |
Shorten this wire to a given node.
All nodes from this wire's end to toNode will be removed.
| toNode | - node to short this wire to |
| fromBegin | - true if shorten this wire from begin, false from end |
| bool agxWire::Wire::simplify | ( | const agx::Frame * | parentFrame = nullptr | ) |
Simplify this wire.
| bool agxWire::Wire::unsimplify | ( | ) |
Unsimplify this wire.
|
protected |
Loop through all nodes and update mass (and material NOT IMPLEMENTED)
| void agxWire::Wire::updateNodeTransforms | ( | ) |
Updates all node transforms.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |