| MULTIBODY SIMULATION SOFTWARE - API documentation |
#include <CHlinkMarkers.h>


Public Member Functions | |
| virtual void | Copy (ChLinkMarkers *source) |
| virtual ChLink * | new_Duplicate () |
| virtual int | GetType () |
| ChMarker * | GetMarker1 () |
| ChMarker * | GetMarker2 () |
| virtual void | SetMarker1 (ChMarker *mark1) |
| virtual void | SetMarker2 (ChMarker *mark2) |
| void | SetMarkers (ChMarker *mark1, ChMarker *mark2) |
| void | SwapMainSlaveMarkers () |
| void | SetMarkID1 (int mid) |
| void | SetMarkID2 (int mid) |
| int | GetMarkID1 () |
| int | GetMarkID2 () |
| int | ReferenceMarkers (ChMarker *mark1, ChMarker *mark2) |
| virtual int | Initialize (ChSharedPtr< ChMarker > &mark1, ChSharedPtr< ChMarker > &mark2) |
| virtual int | Initialize (ChSharedPtr< ChBody > &mbody1, ChSharedPtr< ChBody > &mbody2, ChCoordsys<> mpos) |
| virtual int | Initialize (ChSharedPtr< ChBody > &mbody1, ChSharedPtr< ChBody > &mbody2, bool pos_are_relative, ChCoordsys<> mpos1, ChCoordsys<> mpos2) |
| ChCoordsys | GetLinkRelativeCoords () |
| virtual void | UpdateRelMarkerCoords () |
| virtual void | UpdateForces (double mytime) |
| virtual void | Update (double mytime) |
| virtual void | ConstraintsFbLoadForces (double factor=1.) |
| Coordsys | GetRelM () |
| Coordsys | GetRelM_dt () |
| Coordsys | GetRelM_dtdt () |
| double | GetRelAngle () |
| Vector | GetRelAxis () |
| Vector | GetRelRotaxis () |
| Vector | GetRelWvel () |
| Vector | GetRelWacc () |
| double | GetDist () |
| double | GetDist_dt () |
| Vector * | Get_Scr_force () |
| Vector * | Get_Scr_torque () |
| void | Set_Scr_force (Vector mf) |
| void | Set_Scr_torque (Vector mf) |
| Vector | GetC_force () |
| Vector | GetC_torque () |
| virtual void | StreamIN (ChStreamInBinary &mstream) |
| virtual void | StreamOUT (ChStreamOutBinary &mstream) |
| virtual void | StreamOUT (ChStreamOutAscii &mstream) |
Protected Attributes | |
| ChMarker * | marker1 |
| ChMarker * | marker2 |
| int | markID1 |
| int | markID2 |
| Coordsys | relM |
| Coordsys | relM_dt |
| Coordsys | relM_dtdt |
| double | relAngle |
| Vector | relAxis |
| Vector | relRotaxis |
| Vector | relWvel |
| Vector | relWacc |
| double | dist |
| double | dist_dt |
| Vector | Scr_force |
| Vector | Scr_torque |
| Vector | C_force |
| Vector | C_torque |
Class for links which connect two 'markers'. The markers are two ChMarker objects each belonging to the two linked ChBody parts. Many specialized classes are based on this ChLinkMarkers class, for example the ChLinkSpring and all the family of the ChLinkLock classes - see them-. Also, ChLinkMarkers class allows an optional force vector and torque vector to be set between the two connected markers.
| void chrono::ChLinkMarkers::ConstraintsFbLoadForces | ( | double | factor = 1. | ) | [virtual] |
Overrides the empty behaviour of the parent ChLink implementation, which does not consider any user-imposed force between the two bodies. It adds the current link-forces, if any, (caused by springs, etc.) to the 'fb' vectors of the ChLcpVariables referenced by encapsulated ChLcpConstraints. In details, it adds the effect caused by C_force and C_torque. Both C_force and C_torque these forces are considered expressed in the reference coordsystem of marker2 (the MAIN marker), and their application point is the origin of marker1 (the SLAVE marker).
Reimplemented from chrono::ChPhysicsItem.
| Vector* chrono::ChLinkMarkers::Get_Scr_force | ( | ) |
To get & set the 'script' force buffers(only accessed by external scripts, so it's up to the script to remember to set& reset them -link class just add them to C_force etc.
| Vector chrono::ChLinkMarkers::GetC_force | ( | ) |
Get the total applied force accumulators (force, momentum) in link coords. These forces might be affected by additional springs, dampers, etc. but they do not include the reaction forces.
| ChCoordsys chrono::ChLinkMarkers::GetLinkRelativeCoords | ( | ) | [virtual] |
Get the link coordinate system, expressed relative to Body2 (the 'master' body). This represents the 'main' reference of the link: reaction forces and torques are expressed in this coordinate system. (It is the coordinate system of the 'master' marker2 relative to Body2)
Reimplemented from chrono::ChLink.
| int chrono::ChLinkMarkers::Initialize | ( | ChSharedPtr< ChMarker > & | mark1, |
| ChSharedPtr< ChMarker > & | mark2 | ||
| ) | [virtual] |
Use this function after link creation, to initialize the link from two markers to join. Each marker must belong to a rigid body, and both rigid bodies must belong to the same ChSystem. The position of mark2 is used as link's position and main reference.
| mark1 | first marker to join |
| mark2 | second marker to join (master) |
| int chrono::ChLinkMarkers::Initialize | ( | ChSharedPtr< ChBody > & | mbody1, |
| ChSharedPtr< ChBody > & | mbody2, | ||
| ChCoordsys<> | mpos | ||
| ) | [virtual] |
Use this function after link creation, to initialize the link from two joined rigid bodies. Both rigid bodies must belong to the same ChSystem. Two markers will be created and added to the rigid bodies (later, you can use GetMarker1() and GetMarker2() to access them. To specify the (absolute) position of link and markers, use 'mpos'.
| mbody1 | first body to join |
| mbody2 | second body to join |
| mpos | the current absolute pos.& alignment. |
| int chrono::ChLinkMarkers::Initialize | ( | ChSharedPtr< ChBody > & | mbody1, |
| ChSharedPtr< ChBody > & | mbody2, | ||
| bool | pos_are_relative, | ||
| ChCoordsys<> | mpos1, | ||
| ChCoordsys<> | mpos2 | ||
| ) | [virtual] |
Use this function after link creation, to initialize the link from two joined rigid bodies. Both rigid bodies must belong to the same ChSystem. Two markers will be created and added to the rigid bodies (later, you can use GetMarker1() and GetMarker2() to access them. To specify the (absolute) position of link and markers, use 'mpos'.
| mbody1 | first body to join |
| mbody2 | second body to join |
| pos_are_relative | if =true, following two positions are relative to bodies. If false, are absolute. |
| mpos1 | the position & alignment of 1st marker (relative to body1 cords, or absolute) |
| mpos2 | the position & alignment of 2nd marker (relative to body2 cords, or absolute) |
Set both constrained markers at once. Note that also Body1 and Body2 are automatically set (they are of course the owners of the two markers)
| void chrono::ChLinkMarkers::StreamIN | ( | ChStreamInBinary & | mstream | ) | [virtual] |
Method to allow deserializing a persistent binary archive (ex: a file) into transient data.
Reimplemented from chrono::ChLink.
Reimplemented in chrono::ChLinkMasked, chrono::ChLinkLock, chrono::ChLinkEngine, chrono::ChLinkWheel, chrono::ChLinkGear, chrono::ChLinkPulley, chrono::ChLinkSpring, chrono::ChLinkNumdiff, chrono::ChLinkPneumaticActuator, chrono::ChLinkLinActuator, chrono::ChLinkClearance, chrono::ChLinkTrajectory, chrono::ChLinkBrake, chrono::ChLinkPointSpline, and chrono::ChLinkScrew.
| void chrono::ChLinkMarkers::StreamOUT | ( | ChStreamOutBinary & | mstream | ) | [virtual] |
Method to allow serializing transient data into a persistent binary archive (ex: a file).
Reimplemented from chrono::ChLink.
Reimplemented in chrono::ChLinkMasked, chrono::ChLinkLock, chrono::ChLinkEngine, chrono::ChLinkWheel, chrono::ChLinkGear, chrono::ChLinkPulley, chrono::ChLinkSpring, chrono::ChLinkNumdiff, chrono::ChLinkPneumaticActuator, chrono::ChLinkLinActuator, chrono::ChLinkClearance, chrono::ChLinkTrajectory, chrono::ChLinkBrake, chrono::ChLinkPointSpline, and chrono::ChLinkScrew.
| virtual void chrono::ChLinkMarkers::StreamOUT | ( | ChStreamOutAscii & | mstream | ) | [virtual] |
Method to allow serialization of transient data in ascii, as a readable item, for example "chrono::GetLog() << myobject;"
Reimplemented from chrono::ChLink.
Reimplemented in chrono::ChLinkMasked, and chrono::ChLinkNumdiff.
| void chrono::ChLinkMarkers::SwapMainSlaveMarkers | ( | ) |
Exchange the master and the slave marker. The same happens for body1 and body2, automatically.
| void chrono::ChLinkMarkers::Update | ( | double | mytime | ) | [virtual] |
This is an important function, which is called by the owner ChSystem at least once per integration step. It may update all auxiliary data of the link, such as matrices if any, etc. The inherited classes, for example the ChLinkMask, often implement specialized versions of this Update(time) function, because they might need to update inner states, forces, springs, etc. This base version, by default, simply updates the time.
Reimplemented from chrono::ChLink.
Reimplemented in chrono::ChLinkMasked.
| void chrono::ChLinkMarkers::UpdateForces | ( | double | mytime | ) | [virtual] |
Updates auxiliary forces caused by springs/dampers/etc. which may be connected between the two bodies of the link. By default, it adds the forces which might have been added by the user using Set_Scr_force() and Set_Scr_torque(). Note, these forces are considered in the reference coordsystem of marker2 (the MAIN marker), and their application point is the origin of marker1 (the SLAVE marker).
Reimplemented in chrono::ChLinkMasked, chrono::ChLinkLock, chrono::ChLinkSpring, chrono::ChLinkWheel, chrono::ChLinkEngine, chrono::ChLinkPneumaticActuator, chrono::ChLinkBrake, and chrono::ChLinkClearance.
| void chrono::ChLinkMarkers::UpdateRelMarkerCoords | ( | ) | [virtual] |
Updates auxiliary vars relM, relM_dt, relM_dtdt, dist, dist_dt et similia.
UPDATING PROCEDURES
Reimplemented in chrono::ChLinkLock.
CHRONO::ENGINE