AGX Dynamics 2.41.3.0
Loading...
Searching...
No Matches
agx::ConstraintImplementation::ConstrainedBodiesState Class Reference

Object that holds the state seen from the user and from the solver. More...

#include <ConstraintImplementation.h>

Classes

class  BodiesInfo
 Info with number of dynamic and non-static body counters. More...
 

Public Member Functions

 ConstrainedBodiesState ()
 Default constructor.
 
agx::Bool finalize (agx::Bool valid)
 Finalize given state of constraint.
 
agx::Int32VectorgetBodyIndices ()
 
const agx::Int32VectorgetBodyIndices () const
 
agx::UInt getNumRecurrentMergedBodies () const
 Counter that increments each time a merged body already has been registered and comes back.
 
const BodiesInfogetOriginalInfo () const
 
agx::Int32VectorgetPermutation ()
 
const agx::Int32VectorgetPermutation () const
 
const agx::ConstraintRigidBodyContainergetSolverBodies () const
 
const BodiesInfogetSolverInfo () const
 
agx::Bool increment (agx::RigidBody *rb)
 Increments data given a rigid body.
 
void reset (agx::UInt numBodies)
 Resets all data and allocates for a maximum of numBodies.
 

Detailed Description

Object that holds the state seen from the user and from the solver.

Definition at line 112 of file ConstraintImplementation.h.

Constructor & Destructor Documentation

◆ ConstrainedBodiesState()

agx::ConstraintImplementation::ConstrainedBodiesState::ConstrainedBodiesState ( )

Default constructor.

Member Function Documentation

◆ finalize()

agx::Bool agx::ConstraintImplementation::ConstrainedBodiesState::finalize ( agx::Bool  valid)

Finalize given state of constraint.

If valid == false the counters will be set to 0.

Returns
true if the constraint should be active, otherwise false

◆ getBodyIndices() [1/2]

Int32Vector & agx::ConstraintImplementation::ConstrainedBodiesState::getBodyIndices ( )
inline
Returns
the body indices for the solver (includes merged bodies)

Definition at line 1298 of file ConstraintImplementation.h.

◆ getBodyIndices() [2/2]

const Int32Vector & agx::ConstraintImplementation::ConstrainedBodiesState::getBodyIndices ( ) const
inline
Returns
the body indices for the solver (includes merged bodies)

Definition at line 1293 of file ConstraintImplementation.h.

◆ getNumRecurrentMergedBodies()

agx::UInt agx::ConstraintImplementation::ConstrainedBodiesState::getNumRecurrentMergedBodies ( ) const

Counter that increments each time a merged body already has been registered and comes back.

Note that it still can be several different merged bodies in the constraint! (E.g., 4 bodies, 2 merged to mb1 and two to mb2. Recurrent merged bodies will be 2 in that case.)

◆ getOriginalInfo()

const ConstraintImplementation::ConstrainedBodiesState::BodiesInfo & agx::ConstraintImplementation::ConstrainedBodiesState::getOriginalInfo ( ) const
inline
Returns
body info as seen from the user

Definition at line 1273 of file ConstraintImplementation.h.

◆ getPermutation() [1/2]

Int32Vector & agx::ConstraintImplementation::ConstrainedBodiesState::getPermutation ( )
inline
Returns
the permutation vector (includes merged bodies)

Definition at line 1288 of file ConstraintImplementation.h.

◆ getPermutation() [2/2]

const Int32Vector & agx::ConstraintImplementation::ConstrainedBodiesState::getPermutation ( ) const
inline
Returns
the permutation vector (includes merged bodies)

Definition at line 1283 of file ConstraintImplementation.h.

◆ getSolverBodies()

const ConstraintRigidBodyContainer & agx::ConstraintImplementation::ConstrainedBodiesState::getSolverBodies ( ) const
inline
Returns
the bodies to use by the solver

Definition at line 1303 of file ConstraintImplementation.h.

◆ getSolverInfo()

const ConstraintImplementation::ConstrainedBodiesState::BodiesInfo & agx::ConstraintImplementation::ConstrainedBodiesState::getSolverInfo ( ) const
inline
Returns
body info as seen from the solver (includes info about merged bodies)

Definition at line 1278 of file ConstraintImplementation.h.

◆ increment()

agx::Bool agx::ConstraintImplementation::ConstrainedBodiesState::increment ( agx::RigidBody rb)

Increments data given a rigid body.

Note
This body should not be a root body.

◆ reset()

void agx::ConstraintImplementation::ConstrainedBodiesState::reset ( agx::UInt  numBodies)

Resets all data and allocates for a maximum of numBodies.

Parameters
numBodies- maximum amount of bodies (i.e., the number of bodies in the original setup)

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