chrono::cascade::ChBodyEasyCascade Class Reference

Description

Easy-to-use class for quick creation of rigid bodies with a OpenCASCADE shape.

Compared to the base ChBodyAuxRef class, this class also does automatically, at object creation, the following tasks that you would normally do by hand if using ChBodyAuxRef:

  • mass and moment of inertia is automatically set, according to the geometry in the OpenCASCADE shape.
  • the COG (center of mass) of the body is automatically moved where the Cascade shape has the barycenter, the REF (reference) is automatically moved where the Cascade shape has the reference
  • a visualization shape is created and added, if visualization asset is desired
  • a collision shape is created and added, if collision is desired (note: best performance when not using this triangle collision mesh and rather adding simplified coll.shapes by hand)

#include <ChBodyEasyCascade.h>

Inheritance diagram for chrono::cascade::ChBodyEasyCascade:
Collaboration diagram for chrono::cascade::ChBodyEasyCascade:

Public Member Functions

 ChBodyEasyCascade (TopoDS_Shape &mshape, double mdensity, bool collide=false, bool visual_asset=true)
 Creates a body plus adds a visualization shape and, optionally, a collision shape. More...
 
- Public Member Functions inherited from chrono::ChBodyAuxRef
 ChBodyAuxRef (ChMaterialSurfaceBase::ContactMethod contact_method=ChMaterialSurfaceBase::DVI)
 
 ChBodyAuxRef (std::shared_ptr< collision::ChCollisionModel > new_coll_model, ChMaterialSurfaceBase::ContactMethod contact_method=ChMaterialSurfaceBase::DVI)
 
 ChBodyAuxRef (const ChBodyAuxRef &other)
 
virtual ChBodyAuxRefClone () const override
 "Virtual" copy constructor (covariant return type).
 
void SetFrame_REF_to_abs (const ChFrame<> &mfra)
 Set the auxiliary reference frame with respect to the absolute frame. More...
 
virtual const ChFrameMovingGetFrame_REF_to_abs () const override
 Get the auxiliary reference frame with respect to the absolute frame. More...
 
void SetFrame_COG_to_REF (const ChFrame<> &mloc)
 Set the COG frame with respect to the auxiliary reference frame. More...
 
ChFrame GetFrame_COG_to_REF () const
 Get the COG frame with respect to the auxiliary reference frame.
 
void SetFrame_REF_to_COG (const ChFrame<> &mloc)
 Set the auxiliary reference frame with respect to the COG frame. More...
 
const ChFrameGetFrame_REF_to_COG () const
 Get the auxiliary reference frame with respect to the COG frame.
 
virtual void Update (bool update_assets=true) override
 Update all auxiliary data of the rigid body and of its children (markers, forces..)
 
virtual void ArchiveOUT (ChArchiveOut &marchive) override
 Method to allow serialization of transient data to archives.
 
virtual void ArchiveIN (ChArchiveIn &marchive) override
 Method to allow deserialization of transient data from archives. More...
 
- Public Member Functions inherited from chrono::ChBody
 ChBody (ChMaterialSurfaceBase::ContactMethod contact_method=ChMaterialSurfaceBase::DVI)
 Build a rigid body.
 
 ChBody (std::shared_ptr< collision::ChCollisionModel > new_collision_model, ChMaterialSurfaceBase::ContactMethod contact_method=ChMaterialSurfaceBase::DVI)
 Build a rigid body with a different collision model.
 
 ChBody (const ChBody &other)
 
virtual ~ChBody ()
 Destructor.
 
void SetBodyFixed (bool state)
 Sets the 'fixed' state of the body. More...
 
bool GetBodyFixed () const
 Return true if this body is fixed to ground.
 
void SetEvalContactCn (bool state)
 If true, the normal restitution coefficient is evaluated from painted material channel.
 
bool GetEvalContactCn () const
 
void SetEvalContactCt (bool state)
 If true, the tangential restitution coefficient is evaluated from painted material channel.
 
bool GetEvalContactCt () const
 
void SetEvalContactKf (bool state)
 If true, the kinetic friction coefficient is evaluated from painted material channel.
 
bool GetEvalContactKf () const
 
void SetEvalContactSf (bool state)
 If true, the static friction coefficient is evaluated from painted material channel. More...
 
bool GetEvalContactSf () const
 
void SetCollide (bool state)
 Enable/disable the collision for this rigid body. More...
 
virtual bool GetCollide () const override
 Return true if collision is enabled for this body.
 
void SetShowCollisionMesh (bool state)
 Show collision mesh in 3D views.
 
bool GetShowCollisionMesh () const
 Return true if collision mesh is shown in 3D views.
 
void SetLimitSpeed (bool state)
 Enable the maximum linear speed limit (beyond this limit it will be clamped). More...
 
bool GetLimitSpeed () const
 Return true if maximum linear speed is limited.
 
void SetNoGyroTorque (bool state)
 Deactivate the gyroscopic torque (quadratic term). More...
 
bool GetNoGyroTorque () const
 Return true if gyroscopic torque is deactivated.
 
void SetUseSleeping (bool state)
 Enable/disable option for setting bodies to "sleep". More...
 
bool GetUseSleeping () const
 Return true if 'sleep' mode is activated.
 
void SetSleeping (bool state)
 Force the body in sleeping mode or not (usually this state change is not handled by users, anyway, because it is mostly automatic). More...
 
bool GetSleeping () const
 Return true if this body is currently in 'sleep' mode.
 
bool TrySleeping ()
 Test if a body could go in sleeping state if requirements are satisfied. More...
 
bool IsActive ()
 Return true if the body is active; i.e. More...
 
void SetId (int id)
 Set body id for indexing (used only internally)
 
unsigned int GetId ()
 Set body id for indexing (used only internally)
 
virtual int GetDOF () override
 Number of coordinates of body: 7 because uses quaternions for rotation.
 
virtual int GetDOF_w () override
 Number of coordinates of body: 6 because derivatives use angular velocity.
 
ChVariablesBodyOwnMassVariablesBody () override
 Returns reference to the encapsulated ChVariablesBody, representing body variables (pos, speed, or accel.) and forces. More...
 
ChVariablesVariables () override
 
virtual void IntStateGather (const unsigned int off_x, ChState &x, const unsigned int off_v, ChStateDelta &v, double &T) override
 From item's state to global state vectors y={x,v} pasting the states at the specified offsets. More...
 
virtual void IntStateScatter (const unsigned int off_x, const ChState &x, const unsigned int off_v, const ChStateDelta &v, const double T) override
 From global state vectors y={x,v} to item's state (and update) fetching the states at the specified offsets. More...
 
virtual void IntStateGatherAcceleration (const unsigned int off_a, ChStateDelta &a) override
 From item's state acceleration to global acceleration vector.
 
virtual void IntStateScatterAcceleration (const unsigned int off_a, const ChStateDelta &a) override
 From global acceleration vector to item's state acceleration.
 
virtual void IntStateIncrement (const unsigned int off_x, ChState &x_new, const ChState &x, const unsigned int off_v, const ChStateDelta &Dv) override
 Computes x_new = x + Dt , using vectors at specified offsets. More...
 
virtual void IntLoadResidual_F (const unsigned int off, ChVectorDynamic<> &R, const double c) override
 Takes the F force term, scale and adds to R at given offset: R += c*F.
 
virtual void IntLoadResidual_Mv (const unsigned int off, ChVectorDynamic<> &R, const ChVectorDynamic<> &w, const double c) override
 Takes the M*v term, multiplying mass by a vector, scale and adds to R at given offset: R += c*M*w.
 
virtual void IntToDescriptor (const unsigned int off_v, const ChStateDelta &v, const ChVectorDynamic<> &R, const unsigned int off_L, const ChVectorDynamic<> &L, const ChVectorDynamic<> &Qc) override
 Prepare variables and constraints for a solution: From a vector R into the F 'force' term of the variables From a vector Qc into the Qb 'constraint' term of the constraints From a vector v into the q 'unknowns' term of the variables (for warm starting) From a vector L into the L 'lagrangian ' term of the constraints (for warm starting)
 
virtual void IntFromDescriptor (const unsigned int off_v, ChStateDelta &v, const unsigned int off_L, ChVectorDynamic<> &L) override
 After a solver solution, fetch values from variables and constraints: To a vector v from the q 'unknowns' term of the variables To a vector L from the L 'lagrangian ' term of the constraints.
 
virtual void VariablesFbReset () override
 Sets the 'fb' part of the encapsulated ChVariablesBodyOwnMass to zero.
 
virtual void VariablesFbLoadForces (double factor=1) override
 Adds the current forces applied to body (including gyroscopic torque) in encapsulated ChVariablesBody, in the 'fb' part: qf+=forces*factor.
 
virtual void VariablesQbLoadSpeed () override
 Initialize the 'qb' part of the ChVariablesBody with the current value of body speeds. More...
 
virtual void VariablesFbIncrementMq () override
 Adds M*q (masses multiplied current 'qb') to Fb, ex. More...
 
virtual void VariablesQbSetSpeed (double step=0) override
 Fetches the body speed (both linear and angular) from the 'qb' part of the ChVariablesBody (does not updates the full body&markers state) and sets it as the current body speed. More...
 
virtual void VariablesQbIncrementPosition (double step) override
 Increment body position by the 'qb' part of the ChVariablesBody, multiplied by a 'step' factor. More...
 
virtual void InjectVariables (ChSystemDescriptor &mdescriptor) override
 Tell to a system descriptor that there are variables of type ChVariables in this object (for further passing it to a solver)
 
void SetNoSpeedNoAcceleration () override
 Set no speed and no accelerations (but does not change the position)
 
void SetCollisionModel (std::shared_ptr< collision::ChCollisionModel > new_collision_model)
 Change the collision model.
 
std::shared_ptr
< collision::ChCollisionModel
GetCollisionModel ()
 Acess the collision model for the collision engine. More...
 
virtual void SyncCollisionModels () override
 Synchronize coll.model coordinate and bounding box to the position of the body.
 
virtual void AddCollisionModelsToSystem () override
 If this physical item contains one or more collision models, add them to the system's collision engine. More...
 
virtual void RemoveCollisionModelsFromSystem () override
 If this physical item contains one or more collision models, remove them from the system's collision engine. More...
 
bool RecomputeCollisionModel ()
 Update the optimization structures (OOBB, ABB, etc.) of the collision model, from the associated geometry in some external object (es.CAD). More...
 
const ChCoordsysGetLastCollPos () const
 Gets the last position when the collision detection was performed last time (i.e. More...
 
void SynchronizeLastCollPos ()
 Stores the current position in the last-collision-position buffer.
 
virtual const ChFrameMovingGetFrame_COG_to_abs () const
 Get the rigid body coordinate system that represents the GOG (Center of Gravity). More...
 
virtual ChFrame GetAssetsFrame (unsigned int nclone=0) override
 Get the master coordinate system for the assets (this will return the main coordinate system of the rigid body)
 
virtual void GetTotalAABB (ChVector<> &bbmin, ChVector<> &bbmax) override
 Get the entire AABB axis-aligned bounding box of the object, as defined by the collision model (if any). More...
 
virtual void StreamINstate (ChStreamInBinary &mstream) override
 Method to deserialize only the state (position, speed)
 
virtual void StreamOUTstate (ChStreamOutBinary &mstream) override
 Method to serialize only the state (position, speed)
 
ChMaterialSurfaceBase::ContactMethod GetContactMethod ()
 Infer the contact method from the underlying material properties object.
 
std::shared_ptr
< ChMaterialSurface
GetMaterialSurface ()
 Access the DVI material surface properties associated with this body. More...
 
std::shared_ptr
< ChMaterialSurfaceDEM
GetMaterialSurfaceDEM ()
 Access the DEM material surface properties associated with this body. More...
 
void SetMaterialSurface (const std::shared_ptr< ChMaterialSurfaceBase > &mnewsurf)
 Set the material surface properties by passing a ChMaterialSurface or ChMaterialSurfaceDEM object. More...
 
void SetDensity (float mdensity)
 The density of the rigid body, as [mass]/[unit volume]. More...
 
void AddMarker (std::shared_ptr< ChMarker > amarker)
 Attach a marker to this body.
 
void AddForce (std::shared_ptr< ChForce > aforce)
 Attach a force to this body.
 
void RemoveMarker (std::shared_ptr< ChMarker > amarker)
 Remove a specific marker from this body. Warning: linear time search.
 
void RemoveForce (std::shared_ptr< ChForce > aforce)
 Remove a specific force from this body. Warning: linear time search.
 
void RemoveAllForces ()
 Remove all markers at once. More...
 
void RemoveAllMarkers ()
 Remove all markers at once. More...
 
std::shared_ptr< ChMarkerSearchMarker (const char *m_name)
 Finds a marker from its ChObject name.
 
std::shared_ptr< ChForceSearchForce (const char *m_name)
 Finds a force from its ChObject name.
 
const std::vector
< std::shared_ptr< ChMarker > > & 
GetMarkerList () const
 Gets the list of children markers. More...
 
const std::vector
< std::shared_ptr< ChForce > > & 
GetForceList () const
 Gets the list of children forces. More...
 
ChVector Point_World2Body (const ChVector<> &mpoint)
 
ChVector Point_Body2World (const ChVector<> &mpoint)
 
ChVector Dir_World2Body (const ChVector<> &mpoint)
 
ChVector Dir_Body2World (const ChVector<> &mpoint)
 
ChVector RelPoint_AbsSpeed (const ChVector<> &mrelpoint)
 
ChVector RelPoint_AbsAcc (const ChVector<> &mrelpoint)
 
void SetMass (double newmass)
 Mass of the rigid body. More...
 
double GetMass ()
 
void SetInertia (const ChMatrix33<> &newXInertia)
 Set the inertia tensor of the body. More...
 
const ChMatrix33GetInertia ()
 Get a reference to the inertia tensor, expressed in local coordinate system. More...
 
void SetInertiaXX (const ChVector<> &iner)
 Set the diagonal part of the inertia tensor (Ixx, Iyy, Izz values). More...
 
ChVector GetInertiaXX ()
 Get the diagonal part of the inertia tensor (Ixx, Iyy, Izz values). More...
 
void SetInertiaXY (const ChVector<> &iner)
 Set the off-diagonal part of the inertia tensor (Ixy, Ixz, Iyz values). More...
 
ChVector GetInertiaXY ()
 Get the extradiagonal part of the inertia tensor (Ixy, Ixz, Iyz values) Warning about sign: in some books they write the inertia tensor as I=[Ixx, -Ixy, -Ixz; etc. More...
 
void SetMaxSpeed (float m_max_speed)
 Set the maximum linear speed (beyond this limit it will be clamped). More...
 
float GetMaxSpeed () const
 
void SetMaxWvel (float m_max_wvel)
 Set the maximum angualar speed (beyond this limit it will be clamped). More...
 
float GetMaxWvel () const
 
void ClampSpeed ()
 Clamp the body speed to the provided limits. More...
 
void SetSleepTime (float m_t)
 Set the amount of time which must pass before going automatically in sleep mode when the body has very small movements. More...
 
float GetSleepTime () const
 
void SetSleepMinSpeed (float m_t)
 Set the max linear speed to be kept for 'sleep_time' before freezing.
 
float GetSleepMinSpeed () const
 
void SetSleepMinWvel (float m_t)
 Set the max linear speed to be kept for 'sleep_time' before freezing.
 
float GetSleepMinWvel () const
 
void ComputeQInertia (ChMatrixNM< double, 4, 4 > *mQInertia)
 Computes the 4x4 inertia tensor in quaternion space, if needed.
 
void ComputeGyro ()
 Computes the gyroscopic torque. More...
 
void Add_as_lagrangian_force (const ChVector<> &force, const ChVector<> &appl_point, bool local, ChMatrixNM< double, 7, 1 > *mQf)
 Transform and adds a cartesian force to a generic 7x1 vector of body lagrangian forces mQf . More...
 
void Add_as_lagrangian_torque (const ChVector<> &torque, bool local, ChMatrixNM< double, 7, 1 > *mQf)
 
void Accumulate_force (const ChVector<> &force, const ChVector<> &appl_point, bool local)
 Add forces and torques into the "accumulators", as increment. More...
 
void Accumulate_torque (const ChVector<> &torque, bool local)
 
void Empty_forces_accumulators ()
 
const ChVectorGet_accumulated_force () const
 
const ChVectorGet_accumulated_torque () const
 
const ChVectorGet_Scr_force () const
 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 all other forces. More...
 
const ChVectorGet_Scr_torque () const
 
void Set_Scr_force (const ChVector<> &mf)
 
void Set_Scr_torque (const ChVector<> &mf)
 
void Accumulate_script_force (const ChVector<> &force, const ChVector<> &appl_point, bool local)
 
void Accumulate_script_torque (const ChVector<> &torque, bool local)
 
const ChVectorGet_gyro () const
 Return the gyroscopic torque.
 
const ChVectorGet_Xforce () const
 Get the total force applied to the rigid body (applied at center of mass. More...
 
const ChVectorGet_Xtorque () const
 Get the total torque applied to the rigid body (expressed in body coordinates). More...
 
void UpdateMarkers (double mytime)
 Update all children markers of the rigid body, at current body state.
 
void UpdateForces (double mytime)
 Update all children forces of the rigid body, at current body state.
 
void UpdateTime (double mytime)
 Update local time of rigid body, and time-dependant data.
 
virtual void Update (double mytime, bool update_assets=true) override
 Update all auxiliary data of the rigid body and of its children (markers, forces..), at given time.
 
virtual ChVariablesGetVariables1 () override
 
virtual bool IsContactActive () override
 Tell if the object must be considered in collision detection.
 
virtual int ContactableGet_ndof_x () override
 Get the number of DOFs affected by this object (position part)
 
virtual int ContactableGet_ndof_w () override
 Get the number of DOFs affected by this object (speed part)
 
virtual void ContactableGetStateBlock_x (ChState &x) override
 Get all the DOFs packed in a single vector (position part)
 
virtual void ContactableGetStateBlock_w (ChStateDelta &w) override
 Get all the DOFs packed in a single vector (speed part)
 
virtual void ContactableIncrementState (const ChState &x, const ChStateDelta &dw, ChState &x_new) override
 Increment the provided state of this object by the given state-delta increment. More...
 
virtual std::shared_ptr
< ChMaterialSurfaceBase > & 
GetMaterialSurfaceBase () override
 Return the pointer to the surface material. More...
 
ChVector GetContactForce ()
 Get the resultant contact force acting on this body.
 
ChVector GetContactTorque ()
 Get the resultant contact torque acting on this body.
 
virtual ChVector GetContactPoint (const ChVector<> &loc_point, const ChState &state_x) override
 Express the local point in absolute frame, for the given state position.
 
virtual ChVector GetContactPointSpeed (const ChVector<> &loc_point, const ChState &state_x, const ChStateDelta &state_w) override
 Get the absolute speed of a local point attached to the contactable. More...
 
virtual ChVector GetContactPointSpeed (const ChVector<> &abs_point) override
 Get the absolute speed of point abs_point if attached to the surface.
 
virtual ChCoordsys GetCsysForCollisionModel () override
 Return the coordinate system for the associated collision model. More...
 
virtual void ContactForceLoadResidual_F (const ChVector<> &F, const ChVector<> &abs_point, ChVectorDynamic<> &R) override
 Apply the force, expressed in absolute reference, applied in pos, to the coordinates of the variables. More...
 
virtual void ContactForceLoadQ (const ChVector<> &F, const ChVector<> &point, const ChState &state_x, ChVectorDynamic<> &Q, int offset) override
 Apply the given force at the given point and load the generalized force array. More...
 
virtual void ComputeJacobianForContactPart (const ChVector<> &abs_point, ChMatrix33<> &contact_plane, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_N, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_U, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_V, bool second) override
 Compute the jacobian(s) part(s) for this contactable item. More...
 
virtual void ComputeJacobianForRollingContactPart (const ChVector<> &abs_point, ChMatrix33<> &contact_plane, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_N, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_U, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_V, bool second) override
 Compute the jacobian(s) part(s) for this contactable item, for rolling about N,u,v. More...
 
virtual double GetContactableMass () override
 Used by some DEM code.
 
virtual ChPhysicsItemGetPhysicsItem () override
 This is only for backward compatibility.
 
virtual int LoadableGet_ndof_x () override
 Gets the number of DOFs affected by this element (position part)
 
virtual int LoadableGet_ndof_w () override
 Gets the number of DOFs affected by this element (speed part)
 
virtual void LoadableGetStateBlock_x (int block_offset, ChState &mD) override
 Gets all the DOFs packed in a single vector (position part)
 
virtual void LoadableGetStateBlock_w (int block_offset, ChStateDelta &mD) override
 Gets all the DOFs packed in a single vector (speed part)
 
virtual void LoadableStateIncrement (const unsigned int off_x, ChState &x_new, const ChState &x, const unsigned int off_v, const ChStateDelta &Dv) override
 Increment all DOFs using a delta.
 
virtual int Get_field_ncoords () override
 Number of coordinates in the interpolated field, ex=3 for a tetrahedron finite element or a cable, etc. More...
 
virtual int GetSubBlocks () override
 Tell the number of DOFs blocks (ex. =1 for a body, =4 for a tetrahedron, etc.)
 
virtual unsigned int GetSubBlockOffset (int nblock) override
 Get the offset of the i-th sub-block of DOFs in global vector.
 
virtual unsigned int GetSubBlockSize (int nblock) override
 Get the size of the i-th sub-block of DOFs in global vector.
 
virtual void LoadableGetVariables (std::vector< ChVariables * > &mvars) override
 Get the pointers to the contained ChVariables, appending to the mvars vector.
 
virtual void ComputeNF (const double U, const double V, const double W, ChVectorDynamic<> &Qi, double &detJ, const ChVectorDynamic<> &F, ChVectorDynamic<> *state_x, ChVectorDynamic<> *state_w) override
 Evaluate Q=N'*F , for Q generalized lagrangian load, where N is some type of matrix evaluated at point P(U,V,W) assumed in absolute coordinates, and F is a load assumed in absolute coordinates. More...
 
virtual double GetDensity () override
 This is not needed because not used in quadrature.
 
- Public Member Functions inherited from chrono::ChPhysicsItem
 ChPhysicsItem (const ChPhysicsItem &other)
 
ChSystemGetSystem () const
 Get the pointer to the parent ChSystem()
 
virtual void SetSystem (ChSystem *m_system)
 Set the pointer to the parent ChSystem() and also add to new collision system / remove from old coll.system.
 
void AddAsset (std::shared_ptr< ChAsset > masset)
 Add an optional asset (it can be used to define visualization shapes, es ChSphereShape, or textures, or custom attached properties that the user can define by creating his class inherited from ChAsset)
 
std::vector< std::shared_ptr
< ChAsset > > & 
GetAssets ()
 Access to the list of optional assets.
 
std::shared_ptr< ChAssetGetAssetN (unsigned int num)
 Access the Nth asset in the list of optional assets.
 
virtual unsigned int GetAssetsFrameNclones ()
 Optionally, a ChPhysicsItem can return multiple asset coordinate systems; this can be helpful if, for example, when a ChPhysicsItem contains 'clones' with the same assets (ex. More...
 
virtual void GetCenter (ChVector<> &mcenter)
 Get a symbolic 'center' of the object. More...
 
virtual void Setup ()
 This might recompute the number of coordinates, DOFs, constraints, in case this might change (ex in ChAssembly), as well as state offsets of contained items (ex in ChMesh)
 
virtual int GetDOC ()
 Get the number of scalar constraints, if any, in this item.
 
virtual int GetDOC_c ()
 Get the number of scalar constraints, if any, in this item (only bilateral constr.) Children classes might override this. More...
 
virtual int GetDOC_d ()
 Get the number of scalar constraints, if any, in this item (only unilateral constr.) Children classes might override this. More...
 
unsigned int GetOffset_x ()
 Get offset in the state vector (position part)
 
unsigned int GetOffset_w ()
 Get offset in the state vector (speed part)
 
unsigned int GetOffset_L ()
 Get offset in the lagrangian multipliers.
 
void SetOffset_x (const unsigned int moff)
 Set offset in the state vector (position part) Note: only the ChSystem::Setup function should use this.
 
void SetOffset_w (const unsigned int moff)
 Set offset in the state vector (speed part) Note: only the ChSystem::Setup function should use this.
 
void SetOffset_L (const unsigned int moff)
 Set offset in the lagrangian multipliers Note: only the ChSystem::Setup function should use this.
 
virtual void IntStateGatherReactions (const unsigned int off_L, ChVectorDynamic<> &L)
 From item's reaction forces to global reaction vector. More...
 
virtual void IntStateScatterReactions (const unsigned int off_L, const ChVectorDynamic<> &L)
 From global reaction vector to item's reaction forces. More...
 
virtual void IntLoadResidual_CqL (const unsigned int off_L, ChVectorDynamic<> &R, const ChVectorDynamic<> &L, const double c)
 Takes the term Cq'*L, scale and adds to R at given offset: R += c*Cq'*L. More...
 
virtual void IntLoadConstraint_C (const unsigned int off, ChVectorDynamic<> &Qc, const double c, bool do_clamp, double recovery_clamp)
 Takes the term C, scale and adds to Qc at given offset: Qc += c*C. More...
 
virtual void IntLoadConstraint_Ct (const unsigned int off, ChVectorDynamic<> &Qc, const double c)
 Takes the term Ct, scale and adds to Qc at given offset: Qc += c*Ct. More...
 
virtual void InjectConstraints (ChSystemDescriptor &mdescriptor)
 Tell to a system descriptor that there are contraints of type ChConstraint in this object (for further passing it to a solver) Basically does nothing, but maybe that inherited classes may specialize this. More...
 
virtual void ConstraintsBiReset ()
 Sets to zero the known term (b_i) of encapsulated ChConstraints.
 
virtual void ConstraintsBiLoad_C (double factor=1, double recovery_clamp=0.1, bool do_clamp=false)
 Adds the current C (constraint violation) to the known term (b_i) of encapsulated ChConstraints.
 
virtual void ConstraintsBiLoad_Ct (double factor=1)
 Adds the current Ct (partial t-derivative, as in C_dt=0-> [Cq]*q_dt=-Ct) to the known term (b_i) of encapsulated ChConstraints.
 
virtual void ConstraintsBiLoad_Qc (double factor=1)
 Adds the current Qc (the vector of C_dtdt=0 -> [Cq]*q_dtdt=Qc ) to the known term (b_i) of encapsulated ChConstraints.
 
virtual void ConstraintsFbLoadForces (double factor=1)
 Adds the current link-forces, if any, (caused by springs, etc.) to the 'fb' vectors of the ChVariables referenced by encapsulated ChConstraints.
 
virtual void ConstraintsLoadJacobians ()
 Adds the current jacobians in encapsulated ChConstraints.
 
virtual void ConstraintsFetch_react (double factor=1)
 Fetches the reactions from the lagrangian multiplier (l_i) of encapsulated ChConstraints. More...
 
virtual void InjectKRMmatrices (ChSystemDescriptor &mdescriptor)
 Tell to a system descriptor that there are items of type ChKblock in this object (for further passing it to a solver) Basically does nothing, but maybe that inherited classes may specialize this. More...
 
virtual void KRMmatricesLoad (double Kfactor, double Rfactor, double Mfactor)
 Adds the current stiffness K and damping R and mass M matrices in encapsulated ChKblock item(s), if any. More...
 
- Public Member Functions inherited from chrono::ChObj
 ChObj (const ChObj &other)
 
int GetIdentifier () const
 Gets the numerical identifier of the object.
 
void SetIdentifier (int id)
 Sets the numerical identifier of the object.
 
double GetChTime () const
 Gets the simulation time of this object.
 
void SetChTime (double m_time)
 Sets the simulation time of this object.
 
const char * GetName () const
 Gets the name of the object as C Ascii null-terminated string -for reading only!
 
void SetName (const char myname[])
 Sets the name of this object, as ascii string.
 
std::string GetNameString () const
 Gets the name of the object as C Ascii null-terminated string.
 
void SetNameString (const std::string &myname)
 Sets the name of this object, as std::string.
 
void MFlagsSetAllOFF (int &mflag)
 
void MFlagsSetAllON (int &mflag)
 
void MFlagSetON (int &mflag, int mask)
 
void MFlagSetOFF (int &mflag, int mask)
 
int MFlagGet (int &mflag, int mask)
 
- Public Member Functions inherited from chrono::ChBodyFrame
 ChBodyFrame (const ChBodyFrame &other)
 
void To_abs_forcetorque (const ChVector<> &force, const ChVector<> &appl_point, bool local, ChVector<> &resultforce, ChVector<> &resulttorque)
 Transform generic cartesian force into absolute force+torque applied to body COG. More...
 
void To_abs_torque (const ChVector<> &torque, bool local, ChVector<> &resulttorque)
 Transform generic cartesian torque into absolute torque applied to body COG. More...
 
- Public Member Functions inherited from chrono::ChFrameMoving< double >
 ChFrameMoving (const ChVector< double > &mv=ChVector< double >(0, 0, 0), const ChQuaternion< double > &mq=ChQuaternion< double >(1, 0, 0, 0))
 Construct from pos and rot (as a quaternion)
 
 ChFrameMoving (const ChVector< double > &mv, const ChMatrix33< double > &ma)
 Construct from pos and rotation (as a 3x3 matrix)
 
 ChFrameMoving (const ChCoordsys< double > &mc)
 Construct from a coordsys.
 
 ChFrameMoving (const ChFrame< double > &mc)
 Construct from a frame.
 
 ChFrameMoving (const ChFrameMoving< double > &other)
 Copy constructor, build from another moving frame.
 
virtual ~ChFrameMoving ()
 Destructor.
 
ChFrameMoving< double > & operator= (const ChFrameMoving< double > &other)
 Assignment operator: copy from another moving frame.
 
ChFrameMoving< double > & operator= (const ChFrame< double > &other)
 Assignment operator: copy from another frame.
 
bool operator== (const ChFrameMoving< double > &other) const
 Returns true for identical frames.
 
bool operator!= (const ChFrameMoving< double > &other) const
 Returns true for different frames.
 
ChFrameMoving< double > operator>> (const ChFrameMoving< double > &Fb) const
 The '>>' operator transforms a coordinate system, so transformations can be represented with this syntax: new_frame = old_frame >> tr_frame; For a sequence of transformations, i.e. More...
 
ChFrameMoving< double > operator* (const ChFrameMoving< double > &Fb) const
 The '*' operator transforms a coordinate system, so transformations can be represented with this syntax: new_frame = tr_frame * old_frame; For a sequence of transformations, i.e. More...
 
ChFrameMoving< double > & operator>>= (const ChFrameMoving< double > &T)
 Performs pre-multiplication of this frame by another frame, for example: A>>=T means A'=T*A ; or A'=A >> T.
 
ChFrameMoving< double > & operator>>= (const ChVector< double > &D)
 Performs pre-multiplication of this frame by a vector D, to 'move' by a displacement D:
 
ChFrameMoving< double > & operator>>= (const ChQuaternion< double > &R)
 Performs pre-multiplication of this frame by a quaternion R, to 'rotate' it by R:
 
ChFrameMoving< double > & operator>>= (const ChCoordsys< double > &F)
 Performs pre-multiplication of this frame by a ChCoordsys F:
 
ChFrameMoving< double > & operator>>= (const ChFrame< double > &F)
 Performs pre-multiplication of this frame by a ChFrame F:
 
ChFrameMoving< double > & operator%= (const ChFrameMoving< double > &T)
 Performs pre-multiplication of this frame by another frame, for example: A%=T means A'=T*A ; or A'=A >> T Note: DEPRECATED, use >>= instead. More...
 
ChFrameMoving< double > & operator*= (const ChFrameMoving< double > &T)
 Performs post-multiplication of this frame by another frame, for example: A*=T means A'=A*T ; or A'=T >> A.
 
ChCoordsys< double > & GetCoord_dt ()
 Return both current rotation and translation speeds as a coordsystem object, with vector and quaternion.
 
const ChCoordsys< double > & GetCoord_dt () const
 
ChCoordsys< double > & GetCoord_dtdt ()
 Return both current rotation and translation accelerations as a coordsystem object, with vector and quaternion.
 
const ChCoordsys< double > & GetCoord_dtdt () const
 
ChVector< double > & GetPos_dt ()
 Return the current speed as a 3d vector.
 
const ChVector< double > & GetPos_dt () const
 
ChVector< double > & GetPos_dtdt ()
 Return the current acceleration as a 3d vector.
 
const ChVector< double > & GetPos_dtdt () const
 
ChQuaternion< double > & GetRot_dt ()
 Return the current rotation speed as a quaternion.
 
const ChQuaternion< double > & GetRot_dt () const
 
ChQuaternion< double > & GetRot_dtdt ()
 Return the current rotation acceleration as a quaternion.
 
const ChQuaternion< double > & GetRot_dtdt () const
 
ChVector< double > GetWvel_loc () const
 Computes the actual angular speed (expressed in local coords)
 
ChVector< double > GetWvel_par () const
 Computes the actual angular speed (expressed in parent coords)
 
ChVector< double > GetWacc_loc () const
 Computes the actual angular acceleration (expressed in local coords)
 
ChVector< double > GetWacc_par () const
 Computes the actual angular acceleration (expressed in parent coords)
 
virtual void SetCoord_dt (const ChCoordsys< double > &mcoord_dt)
 Set both linear speed and rotation speed as a single ChCoordsys derivative. More...
 
virtual void SetPos_dt (const ChVector< double > &mvel)
 Set the linear speed.
 
virtual void SetRot_dt (const ChQuaternion< double > &mrot_dt)
 Set the rotation speed as a quaternion. More...
 
virtual void SetWvel_loc (const ChVector< double > &wl)
 Set the rotation speed from given angular speed (expressed in local csys)
 
virtual void SetWvel_par (const ChVector< double > &wp)
 Set the rotation speed from given angular speed (expressed in parent csys)
 
virtual void SetCoord_dtdt (const ChCoordsys< double > &mcoord_dtdt)
 Set both linear acceleration and rotation acceleration as a single ChCoordsys derivative. More...
 
virtual void SetPos_dtdt (const ChVector< double > &macc)
 Set the linear acceleration.
 
virtual void SetRot_dtdt (const ChQuaternion< double > &mrot_dtdt)
 Set the rotation acceleration as a quaternion derivative. More...
 
virtual void SetWacc_loc (const ChVector< double > &al)
 Set the rotation acceleration from given angular acceleration (expressed in local csys)
 
virtual void SetWacc_par (ChVector< double > &ap)
 Set the rotation speed from given angular speed (expressed in parent csys)
 
void Compute_Adt (ChMatrix33< double > &mA_dt) const
 Computes the time derivative of rotation matrix, mAdt.
 
void Compute_Adtdt (ChMatrix33< double > &mA_dtdt)
 Computes the 2nd time derivative of rotation matrix, mAdtdt.
 
ChMatrix33< double > GetA_dt ()
 Computes and returns an Adt matrix (-note: prefer using Compute_Adt() directly for better performance)
 
ChMatrix33< double > GetA_dtdt ()
 Computes and returns an Adt matrix (-note: prefer using Compute_Adtdt() directly for better performance)
 
void ConcatenatePreTransformation (const ChFrameMoving< double > &T)
 Apply a transformation (rotation and translation) represented by another ChFrameMoving T. More...
 
void ConcatenatePostTransformation (const ChFrameMoving< double > &T)
 Apply a transformation (rotation and translation) represented by another ChFrameMoving T in local coordinate. More...
 
ChVector< double > PointSpeedLocalToParent (const ChVector< double > &localpos) const
 Given the position of a point in local frame coords, and assuming it is sticky to frame, return the speed in parent coords. More...
 
ChVector< double > PointSpeedLocalToParent (const ChVector< double > &localpos, const ChVector< double > &localspeed) const
 Given the position localpos of a point in the local reference frame, assuming that the point moves in the local reference frame with localspeed, return the speed in the parent reference frame. More...
 
ChVector< double > PointAccelerationLocalToParent (const ChVector< double > &localpos) const
 Given the position of a point in local frame coords, and assuming it is sticky to frame, return the acceleration in parent coords. More...
 
ChVector< double > PointAccelerationLocalToParent (const ChVector< double > &localpos, const ChVector< double > &localspeed, const ChVector< double > &localacc) const
 Given the position of a point in local frame coords, and assuming it has a frame-relative speed localspeed and frame-relative acceleration localacc, return the acceleration in parent coords. More...
 
ChVector< double > PointSpeedParentToLocal (const ChVector< double > &parentpos, const ChVector< double > &parentspeed) const
 Given the position of a point in parent frame coords, and assuming it has an absolute speed parentspeed, return the speed in local coords. More...
 
ChVector< double > PointAccelerationParentToLocal (const ChVector< double > &parentpos, const ChVector< double > &parentspeed, const ChVector< double > &parentacc) const
 Given the position of a point in parent frame coords, and assuming it has an absolute speed parentspeed and absolute acceleration parentacc, return the acceleration in local coords. More...
 
void TransformLocalToParent (const ChFrameMoving< double > &local, ChFrameMoving< double > &parent) const
 This function transforms a frame from 'this' local coordinate system to parent frame coordinate system, and also transforms the speed and acceleration of the frame. More...
 
void TransformParentToLocal (const ChFrameMoving< double > &parent, ChFrameMoving< double > &local) const
 This function transforms a frame from the parent coordinate system to 'this' local frame coordinate system. More...
 
bool Equals (const ChFrameMoving< double > &other) const
 Returns true if coordsys is identical to other coordsys.
 
bool Equals (const ChFrameMoving< double > &other, doubletol) const
 Returns true if coordsys is equal to other coordsys, within a tolerance 'tol'.
 
virtual void Invert () override
 The transformation (also for speeds, accelerations) is inverted in place. More...
 
ChFrameMoving< double > GetInverse () const
 
- Public Member Functions inherited from chrono::ChFrame< double >
 ChFrame (const ChVector< double > &mv=ChVector< double >(0, 0, 0), const ChQuaternion< double > &mq=ChQuaternion< double >(1, 0, 0, 0))
 Default constructor, or construct from pos and rot (as a quaternion)
 
 ChFrame (const ChVector< double > &mv, const ChMatrix33< double > &ma)
 Construct from pos and rotation (as a 3x3 matrix)
 
 ChFrame (const ChCoordsys< double > &mc)
 Construct from a coordsys.
 
 ChFrame (const ChVector< double > &mv, const doublealpha, const ChVector< double > &mu)
 Construct from position mv and rotation of angle alpha around unit vector mu.
 
 ChFrame (const ChFrame< double > &other)
 Copy constructor, build from another frame.
 
ChFrame< double > & operator= (const ChFrame< double > &other)
 Assignment operator: copy from another frame.
 
virtual bool operator== (const ChFrame< double > &other) const
 Returns true for identical frames.
 
virtual bool operator!= (const ChFrame< double > &other) const
 Returns true for different frames.
 
ChFrame< double > operator>> (const ChFrame< double > &Fb) const
 The '>>' operator transforms a coordinate system, so transformations can be represented with this syntax: new_frame = old_frame >> tr_frame; For a sequence of transformations, i.e. More...
 
ChFrame< double > operator* (const ChFrame< double > &Fb) const
 The '>>' operator transforms a vector, so transformations can be represented with this syntax: new_v = old_v >> tr_frame; For a sequence of transformations, i.e. More...
 
ChVector< double > operator* (const ChVector< double > &V) const
 The '*' operator transforms a vector, so transformations can be represented with this syntax: new_v = tr_frame * old_v; For a sequence of transformations, i.e. More...
 
ChVector< double > operator/ (const ChVector< double > &V) const
 The '/' is like the '*' operator (see), but uses the inverse transformation for A, in A/b. More...
 
ChFrame< double > & operator>>= (const ChFrame< double > &T)
 Performs pre-multiplication of this frame by another frame, for example: A>>=T means A'=T*A ; or A'=A >> T.
 
ChFrame< double > & operator>>= (const ChVector< double > &D)
 Performs pre-multiplication of this frame by a vector D, to 'move' by a displacement D:
 
ChFrame< double > & operator>>= (const ChQuaternion< double > &R)
 Performs pre-multiplication of this frame by a quaternion R, to 'rotate' it by R:
 
ChFrame< double > & operator>>= (const ChCoordsys< double > &F)
 Performs pre-multiplication of this frame by a ChCoordsys F, to transform it:
 
ChFrame< double > & operator%= (const ChFrame< double > &T)
 Performs pre-multiplication of this frame by another frame, for example: A%=T means A'=T*A ; or A'=A >> T Note: DEPRECATED, use >>= instead. More...
 
ChFrame< double > & operator*= (const ChFrame< double > &T)
 Performs post-multiplication of this frame by another frame, for example: A*=T means A'=A*T ; or A'=T >> A.
 
ChCoordsys< double > & GetCoord ()
 Return both current rotation and translation as a coordsystem object, with vector and quaternion.
 
const ChCoordsys< double > & GetCoord () const
 
ChVector< double > & GetPos ()
 Return the current translation as a 3d vector.
 
const ChVector< double > & GetPos () const
 
ChQuaternion< double > & GetRot ()
 Return the current rotation as a quaternion.
 
const ChQuaternion< double > & GetRot () const
 
ChMatrix33< double > & GetA ()
 Return the current rotation as a 3x3 matrix.
 
const ChMatrix33< double > & GetA () const
 
ChVector< double > GetRotAxis ()
 Get axis of finite rotation, in parent space.
 
double GetRotAngle ()
 Get angle of rotation about axis of finite rotation.
 
virtual void SetCoord (const ChCoordsys< double > &mcoord)
 Impose both translation and rotation as a single ChCoordsys. More...
 
virtual void SetCoord (const ChVector< double > &mv, const ChQuaternion< double > &mq)
 Impose both translation and rotation. More...
 
virtual void SetRot (const ChQuaternion< double > &mrot)
 Impose the rotation as a quaternion. More...
 
virtual void SetRot (const ChMatrix33< double > &mA)
 Impose the rotation as a 3x3 matrix. More...
 
virtual void SetPos (const ChVector< double > &mpos)
 Impose the translation.
 
void ConcatenatePreTransformation (const ChFrame< double > &T)
 Apply a transformation (rotation and translation) represented by another ChFrame T. More...
 
void ConcatenatePostTransformation (const ChFrame< double > &T)
 Apply a transformation (rotation and translation) represented by another ChFrame T in local coordinate. More...
 
void Move (const ChVector< double > &V)
 An easy way to move the frame by the amount specified by vector V, (assuming V expressed in parent coordinates)
 
void Move (const ChCoordsys< double > &VR)
 Apply both translation and rotation, assuming both expressed in parent coordinates, as a vector for translation and quaternion for rotation,.
 
virtual ChVector< double > TransformLocalToParent (const ChVector< double > &local) const
 This function transforms a point from the local frame coordinate system to the parent coordinate system. More...
 
virtual void TransformLocalToParent (const ChFrame< double > &local, ChFrame< double > &parent) const
 This function transforms a frame from 'this' local coordinate system to parent frame coordinate system. More...
 
virtual ChVector< double > TransformPointLocalToParent (const ChVector< double > &local) const
 
virtual ChVector< double > TransformParentToLocal (const ChVector< double > &parent) const
 This function transforms a point from the parent coordinate system to local frame coordinate system. More...
 
virtual void TransformParentToLocal (const ChFrame< double > &parent, ChFrame< double > &local) const
 This function transforms a frame from the parent coordinate system to 'this' local frame coordinate system. More...
 
virtual ChVector< double > TransformPointParentToLocal (const ChVector< double > &parent) const
 
virtual ChVector< double > TransformDirectionParentToLocal (const ChVector<> &mdirection) const
 This function transforms a direction from 'this' local coordinate system to parent frame coordinate system. More...
 
virtual ChVector< double > TransformDirectionLocalToParent (const ChVector<> &mdirection) const
 This function transforms a direction from the parent frame coordinate system to 'this' local coordinate system. More...
 
bool Equals (const ChFrame< double > &other) const
 Returns true if coordsys is identical to other coordsys.
 
bool Equals (const ChFrame< double > &other, doubletol) const
 Returns true if coordsys is equal to other coordsys, within a tolerance 'tol'.
 
void Normalize ()
 Normalize the rotation, so that quaternion has unit length.
 
virtual void SetIdentity ()
 Sets to no translation and no rotation.
 
ChFrame< double > GetInverse () const
 
- Public Member Functions inherited from chrono::ChContactable_1vars< T1 >
virtual void ComputeJacobianForContactPart (const ChVector<> &abs_point, ChMatrix33<> &contact_plane, type_constraint_tuple &jacobian_tuple_N, type_constraint_tuple &jacobian_tuple_U, type_constraint_tuple &jacobian_tuple_V, bool second)=0
 Compute the jacobian(s) part(s) for this contactable item. More...
 
virtual void ComputeJacobianForRollingContactPart (const ChVector<> &abs_point, ChMatrix33<> &contact_plane, type_constraint_tuple &jacobian_tuple_N, type_constraint_tuple &jacobian_tuple_U, type_constraint_tuple &jacobian_tuple_V, bool second)
 Compute the jacobian(s) part(s) for this contactable item, for rolling about N,u,v (used only for rolling friction DVI contacts)
 
- Public Member Functions inherited from chrono::ChLoadableUVW
virtual bool IsTetrahedronIntegrationNeeded ()
 If true, use quadrature over u,v,w in [0..1] range as tetrahedron volumetric coords, with z=1-u-v-w otherwise use quadrature over u,v,w in [-1..+1] as box isoparametric coords. More...
 

Additional Inherited Members

- Public Types inherited from chrono::ChContactable_1vars< T1 >
typedef
ChVariableTupleCarrier_1vars
< T1 > 
type_variable_tuple_carrier
 
typedef
ChVariableTupleCarrier_1vars
< T1 >::type_constraint_tuple 
type_constraint_tuple
 
- Public Types inherited from chrono::ChVariableTupleCarrier_1vars< T1 >
typedef
ChConstraintTuple_1vars
< ChVariableTupleCarrier_1vars
< N1 > > 
type_constraint_tuple
 
- Static Public Member Functions inherited from chrono::ChFrame< double >
static void SetMatrix_Fp (ChMatrixNM< double, 3, 4 > &Fp, const ChQuaternion< double > &mq)
 Fills a 3x4 matrix [Fp(q)], as in [Fp(q)]*[Fm(q)]' = [A(q)].
 
static void SetMatrix_Fm (ChMatrixNM< double, 3, 4 > &Fm, const ChQuaternion< double > &mq)
 Fills a 3x4 matrix [Fm(q)], as in [Fp(q)]*[Fm(q)]' = [A(q)].
 
static void SetMatrix_Gl (ChMatrixNM< double, 3, 4 > &Gl, const ChQuaternion< double > &mq)
 Fast fill a 3x4 matrix [Gl(q)], as in local angular speed conversion Wl=[Gl]*q_dt (btw: [Gl(q)] = 2*[Fp(q')] = 2*[G] with G matrix as in Shabana)
 
static void SetMatrix_Gw (ChMatrixNM< double, 3, 4 > &Gw, const ChQuaternion< double > &mq)
 Fast fill a 3x4 matrix [Gw(q)], as in absolute angular speed conversion Ww=[Gw]*q_dt (btw: [Gw(q)] = 2*[Fm(q')] = 2*[E] with E matrix as in Shabana)
 
static ChVector< double > Gl_x_Quat (const ChQuaternion< double > &mq, const ChQuaternion< double > &qb)
 Computes the product v=[Gl(mq)]*qb without the need of having the [Gl] matrix (just pass the mq quaternion, since Gl is function of mq)
 
static ChQuaternion< double > GlT_x_Vect (const ChQuaternion< double > &mq, const ChVector< double > &v)
 Computes the product q=[Gl(mq)]*v without the need of having the [Gl] matrix (just pass the mq quaternion, since Gl is function of mq)
 
- Public Attributes inherited from chrono::ChFrameMoving< double >
ChCoordsys< double > coord_dt
 Rotation and position speed, as vector+quaternion.
 
ChCoordsys< double > coord_dtdt
 Rotation and position acceleration, as vector+quaternion.
 
- Public Attributes inherited from chrono::ChFrame< double >
ChCoordsys< double > coord
 Rotation and position, as vector+quaternion.
 
ChMatrix33< double > Amatrix
 3x3 orthogonal rotation matrix
 
- Static Public Attributes inherited from chrono::ChVariableTupleCarrier_1vars< T1 >
static const int nvars1
 
- Protected Attributes inherited from chrono::ChBody
std::shared_ptr
< collision::ChCollisionModel
collision_model
 Pointer to the collision model.
 
unsigned int body_id
 body specific identifier, used for indexing (internal use only)
 
std::vector< std::shared_ptr
< ChMarker > > 
marklist
 list of child markers
 
std::vector< std::shared_ptr
< ChForce > > 
forcelist
 list of child forces
 
ChVector gyro
 gyroscopic torque, i.e. Qm = Wvel x (XInertia*Wvel)
 
ChVector Xforce
 force acting on body, applied to COG -in abs. coords-
 
ChVector Xtorque
 torque acting on body -in body rel. coords-
 
ChVector Force_acc
 force accumulator; (in abs space, applied to COG)
 
ChVector Torque_acc
 torque accumulator;(in abs space)
 
ChVector Scr_force
 script force accumulator; (in abs space, applied to COG)
 
ChVector Scr_torque
 script torque accumulator;(in abs space)
 
std::shared_ptr
< ChMaterialSurfaceBase
matsurface
 data for surface contact and impact
 
ChCoordsys last_coll_pos
 cached position at last collision
 
float density
 used when doing the 'recompute mass' operation.
 
ChVariablesBodyOwnMass variables
 interface to solver (store inertia and coordinates)
 
float max_speed
 limit on linear speed (useful for VR & videogames)
 
float max_wvel
 limit on angular vel. (useful for VR & videogames)
 
float sleep_time
 
float sleep_minspeed
 
float sleep_minwvel
 
float sleep_starttime
 
- Protected Attributes inherited from chrono::ChPhysicsItem
ChSystemsystem
 parent system
 
std::vector< std::shared_ptr
< ChAsset > > 
assets
 set of assets
 
unsigned int offset_x
 offset in vector of state (position part)
 
unsigned int offset_w
 offset in vector of state (speed part)
 
unsigned int offset_L
 offset in vector of lagrangian multipliers
 
- Protected Attributes inherited from chrono::ChObj
double ChTime
 the time of simulation for the object
 

Constructor & Destructor Documentation

chrono::cascade::ChBodyEasyCascade::ChBodyEasyCascade ( TopoDS_Shape &  mshape,
double  mdensity,
bool  collide = false,
bool  visual_asset = true 
)

Creates a body plus adds a visualization shape and, optionally, a collision shape.

Mass and inertia are set automatically depending on density. COG is automatically displaced, and REF position is initialized as shape location. Sphere is assumed with center at body reference coordsystem.

Parameters
mshapepass the OpenCASCADE shape
mdensitydensity
collideif true, add a collision shape that uses the triangulation of shape
visual_assetif true, uses a triangulated shape for visualization