AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxSDK::MergedBodySolverData Class Reference

Collection of external (active) interactions, interacting with merged rigid bodies. More...

#include <MergedBodySolverData.h>

Classes

struct  ForceData
 Object containing force and torque from a graph node. More...
 
struct  ForceFrame
 Force frame where the resultant force is u + v + n. More...
 

Public Types

using BodyForceDataContainer = agx::HashVector< const agx::RigidBody *, ForceDataVector >
 
using ContactEdgeStrengthVisitor = std::function< void(ForceFrame, const agx::RigidBody *)>
 Visitor callback where ForceFrame is edge strength in world coordinates and 'otherRb'. More...
 
using ContactEdgeStrengthVisitorPredicate = std::function< agx::Bool(const agx::RigidBody *)>
 Predicate to calculate force frame and visit ContactEdgeStrengthVisitor. More...
 
using ForceDataVector = agx::VectorPOD< ForceData >
 
using GlobalGraphNodeIndexContainer = agx::UIntVector
 
using MergedBodyGraphNodeIndexContainer = agx::HashTable< const agx::MergedBody *, GlobalGraphNodeIndexContainer >
 

Public Member Functions

 MergedBodySolverData ()
 Default constructor. More...
 
agx::Bool calculateContactEdgeStrength (const agx::RigidBody *rb, MergedBodySolverData::ForceFrame &contactStrength) const
 Calculates the total contact edge strength given merged rigid body. More...
 
void collectData (const agx::MergedBody *mergedBody, const MergeSplitPostSolveData &data, const GlobalGraphNodeIndexContainer *externalInteractions, const GeometryContactMergeSplitAlgorithm *geometryContactAlgorithm, const ConstraintMergeSplitAlgorithm *constraintAlgorithm)
 Collect data given sources. More...
 
const BodyForceDataContainer & getForceData () const
 
const agx::MergedBody * getMergedBody () const
 
void traverseContactEdgeStrength (const agx::RigidBody *rb, ContactEdgeStrengthVisitorPredicate pred, ContactEdgeStrengthVisitor visitor) const
 Traverses all contact edges associated to rb where the visitor arguments are the edge strength and other rigid body in the interaction. More...
 
const ForceDataVector * tryGetForceData (const agx::RigidBody *rb) const
 

Detailed Description

Collection of external (active) interactions, interacting with merged rigid bodies.

Definition at line 31 of file MergedBodySolverData.h.

Member Typedef Documentation

Visitor callback where ForceFrame is edge strength in world coordinates and 'otherRb'.

Definition at line 114 of file MergedBodySolverData.h.

Predicate to calculate force frame and visit ContactEdgeStrengthVisitor.

Definition at line 119 of file MergedBodySolverData.h.

Constructor & Destructor Documentation

agxSDK::MergedBodySolverData::MergedBodySolverData ( )

Default constructor.

Member Function Documentation

agx::Bool agxSDK::MergedBodySolverData::calculateContactEdgeStrength ( const agx::RigidBody *  rb,
MergedBodySolverData::ForceFrame &  contactStrength 
) const

Calculates the total contact edge strength given merged rigid body.

Parameters
rb- merged rigid body such that this->getMergedBody() == agx::MergedBody::getActive( rb )
[out]contactStrength- contact force frame reprecenting how hard rb is merged to this merged body
Returns
true if data was added to contactStrength
void agxSDK::MergedBodySolverData::collectData ( const agx::MergedBody *  mergedBody,
const MergeSplitPostSolveData &  data,
const GlobalGraphNodeIndexContainer *  externalInteractions,
const GeometryContactMergeSplitAlgorithm *  geometryContactAlgorithm,
const ConstraintMergeSplitAlgorithm *  constraintAlgorithm 
)

Collect data given sources.

const BodyForceDataContainer& agxSDK::MergedBodySolverData::getForceData ( ) const
Returns
force data container {rb: [ForceData]}
const agx::MergedBody * agxSDK::MergedBodySolverData::getMergedBody ( ) const
inline
Returns
the merged body

Definition at line 137 of file MergedBodySolverData.h.

void agxSDK::MergedBodySolverData::traverseContactEdgeStrength ( const agx::RigidBody *  rb,
ContactEdgeStrengthVisitorPredicate  pred,
ContactEdgeStrengthVisitor  visitor 
) const

Traverses all contact edges associated to rb where the visitor arguments are the edge strength and other rigid body in the interaction.

Parameters
rb- rigid body to traverse contact edges for
visitor- edge strength and other rigid body visitor
const ForceDataVector* agxSDK::MergedBodySolverData::tryGetForceData ( const agx::RigidBody *  rb) const
Returns
force data for given rigid body if present - otherwise null

The documentation for this class was generated from the following file: