MULTIBODY SIMULATION SOFTWARE - API documentation
Public Member Functions | Protected Attributes
chrono::ChLink Class Reference

#include <CHlink.h>

Inheritance diagram for chrono::ChLink:
Inheritance graph
[legend]
Collaboration diagram for chrono::ChLink:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void Copy (ChLink *source)
virtual ChLinknew_Duplicate ()
virtual bool IsValid ()
virtual void SetValid (bool mon)
virtual bool IsDisabled ()
virtual void SetDisabled (bool mdis)
virtual bool IsBroken ()
virtual void SetBroken (bool mon)
virtual bool IsActive ()
virtual bool IsCreatedByCollisionDetection ()
virtual int GetType ()
virtual int GetLeftDOF ()
int GetNumCoords ()
ChBodyGetBody1 ()
ChBodyGetBody2 ()
virtual ChCoordsys GetLinkRelativeCoords ()
ChVector Get_react_force ()
ChVector Get_react_torque ()
virtual int RestoreRedundant ()
virtual void Set2Dmode (int mode)
virtual bool IsRequiringWaking ()
virtual void UpdateTime (double mytime)
virtual void Update (double mytime)
virtual void Update ()
virtual void UpdateExternalGeometry ()
virtual void UpdatedExternalTime (double prevtime, double time)
virtual void StreamIN (ChStreamInBinary &mstream)
virtual void StreamOUT (ChStreamOutBinary &mstream)
virtual void StreamOUT (ChStreamOutAscii &mstream)

Protected Attributes

ChBodyBody1
ChBodyBody2
Vector react_force
Vector react_torque
bool disabled
bool valid
bool broken

Detailed Description

Base class for joints betwenn two ChBody objects.

Links are objects which can be created to constrain two rigid bodies (i.e. objects from the ChBody class) in 3D space, like with revolute joints, guides, etc.

Note that there are many specializations of this base class, for example the ChLinkEngine class inherits this base class and implements specific functions to represent an engine between two bodies, etc. etc. (In fact, this base ChLink class does basically _nothing_ unless it is specialized by some child class).


Member Function Documentation

virtual ChCoordsys chrono::ChLink::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 reaction torques are expressed in this coordinate system. By default is in the origin of Body2, but child classes should implement this.

Reimplemented in chrono::ChLinkMarkers, chrono::ChLinkMateGeneric, chrono::ChLinkDistance, and chrono::ChLinkFastContact.

virtual bool chrono::ChLink::IsActive ( ) [virtual]

An important function! Tells if the link is currently active, in general, that is tells if it must be included into the system solver or not. This method cumulates the effect of various flags (so a link may be not active either because disabled, or broken, or not valid)

virtual bool chrono::ChLink::IsCreatedByCollisionDetection ( ) [virtual]

If this link has been created automatically by collision detection, returns true (false by default). (Was used in the past, now useless)

Reimplemented in chrono::ChLinkContact.

virtual bool chrono::ChLink::IsDisabled ( ) [virtual]

Tells if all constraints of this link are currently turned on or off by the user.

virtual bool chrono::ChLink::IsRequiringWaking ( ) [virtual]

Tells if this link requires that the connected ChBody objects must be waken if they are sleeping. By default =true, i.e. always keep awaken, but child classes might return false for optimizing sleeping, in case no time-dependant.

virtual bool chrono::ChLink::IsValid ( ) [virtual]

Tells if the link data is currently valid. (i.e. pointers to other items are correct)

void chrono::ChLink::Set2Dmode ( int  mode) [virtual]
Returns:
number of changed constraints

Reimplemented in chrono::ChLinkLock.

virtual void chrono::ChLink::SetDisabled ( bool  mdis) [virtual]

User can use this to enable/disable all the constraint of the link as desired.

Reimplemented in chrono::ChLinkMateGeneric, chrono::ChLinkMasked, and chrono::ChLinkBrake.

void chrono::ChLink::StreamIN ( ChStreamInBinary mstream) [virtual]
void chrono::ChLink::StreamOUT ( ChStreamOutBinary mstream) [virtual]
virtual void chrono::ChLink::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::ChObj.

Reimplemented in chrono::ChLinkMasked, chrono::ChLinkMarkers, chrono::ChLinkNumdiff, and chrono::ChLinkMate.

void chrono::ChLink::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::ChPhysicsItem.

Reimplemented in chrono::ChLinkMateOrthogonal, chrono::ChLinkMateXdistance, chrono::ChLinkMatePlane, chrono::ChLinkMasked, chrono::ChLinkMateGeneric, chrono::ChLinkMarkers, chrono::ChLinkDistance, and chrono::ChLinkFastContact.

virtual void chrono::ChLink::UpdatedExternalTime ( double  prevtime,
double  time 
) [virtual]

Called from a foreign software (i.e. a plugin, a CAD appl.), if any, to report that time has changed. Most often you can leave this unimplemented.

Reimplemented in chrono::ChLinkEngine.

void chrono::ChLink::UpdateExternalGeometry ( ) [virtual]

Tells to the associated external object of class ChExternalObject(), if any, that its 3D shape must be updated in order to syncronize to link state (for example, if chrono is a plugin for a 3D modeler, the wireframe display of the link may change depending on link state.

void chrono::ChLink::UpdateTime ( double  time) [virtual]

Given new time, current body state, updates time-dependant stuff in link state, for example motion laws, moving markers, etc. (Default: do nothing but setting new time.)

UPDATING PROCEDURES

Reimplemented in chrono::ChLinkLock, chrono::ChLinkWheel, chrono::ChLinkEngine, chrono::ChLinkTrajectory, chrono::ChLinkPulley, chrono::ChLinkGear, chrono::ChLinkPneumaticActuator, chrono::ChLinkLinActuator, chrono::ChLinkPointSpline, chrono::ChLinkBrake, and chrono::ChLinkClearance.


CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on Tue Jul 10 2012 by Doxygen