AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxWire::NodeMaterial Class Reference

Material definition for a wire node Specifies the friction of a wire for sliding through an EyeNode. More...

#include <Node.h>

Public Types

enum  Direction { NEGATIVE = 0 , POSITIVE , BOTH }
 Friction direction in a wire. More...
 
enum  FrictionDirection { GO_FORWARD = 1 , IS_DIRTY = (1<<1) , FIX_FRICTION_DIRECTION = (1<<2) }
 Internal. More...
 

Public Member Functions

 NodeMaterial ()
 Default constructor.
 
bool getActive () const
 Internal method.
 
Direction getActiveDirection () const
 
bool getEnable () const
 
agx::Real getFrictionCoefficient (Direction dir) const
 
agx::Real getKinematicContactNodeVelocityScale (Direction dir) const
 
agx::Real getMaxForce (Direction dir)
 
agx::Real getNormalForceMagnitude () const
 
bool hasValidRestLength () const
 Internal method.
 
bool isEnabled () const
 
bool isInfCoefficient (Direction dir) const
 
bool isStick () const
 Internal method.
 
bool isStick (Direction dir) const
 Internal method.
 
void setActive (bool active)
 Internal method.
 
void setFrictionCoefficient (agx::Real coeff, Direction dir=BOTH)
 Set stick friction coefficient in one or both directions.
 
void setKinematicContactNodeVelocityScale (agx::Real scaler, Direction dir=BOTH)
 Set slide friction coefficient in one or both directions.
 
void setStick (bool stick, Direction dir)
 Internal method.
 

Protected Types

enum  CurrentType { VELOCITY_SCALER = 0 , FRICTION_COEFFICIENT }
 

Protected Member Functions

agx::Real getViolationPerUnitLength ()
 
void setNormalForceMagnitude (agx::Real normalForce)
 Assign the current normal force magnitude.
 
void setRestLength (agx::Real restLength)
 Assign the rest length of the friction constraint.
 
void setViolation (agx::Real violation)
 Assign current violation in the friction constraint.
 
void setViolationPerUnitLength (agx::Real violationPerUnitLength)
 Assign violation per unit length.
 

Protected Attributes

bool m_activeConstraint
 Tells you if the friction constraint is active.
 
agx::Real m_frictionCoeffs [2][BOTH]
 VELOCITY_SCALER, FRICTION_COEFFICIENT and POSITIVE, NEGATIVE.
 
char m_goForward
 Bit mask for GO_FORWARD, IS_DIRTY...
 
agx::Real m_normalForceMagnitude
 Magnitude of the normal force.
 
agx::Real m_restLength
 Rest length of the friction constraint.
 
bool m_stick [BOTH]
 NEGATIVE and POSITIVE.
 
agx::Real m_violationPerUnitLength
 Violation of the friction constraint.
 

Detailed Description

Material definition for a wire node Specifies the friction of a wire for sliding through an EyeNode.

Definition at line 181 of file agxWire/Node.h.

Member Enumeration Documentation

◆ CurrentType

Enumerator
VELOCITY_SCALER 
FRICTION_COEFFICIENT 

Definition at line 407 of file agxWire/Node.h.

◆ Direction

Friction direction in a wire.

Enumerator
NEGATIVE 

Direction towards begin of the wire.

POSITIVE 

Direction towards end of the wire.

BOTH 

For mutators only, assigns both values.

Definition at line 187 of file agxWire/Node.h.

◆ FrictionDirection

Internal.

Direction of friction.

Enumerator
GO_FORWARD 

Friction direction is forward.

IS_DIRTY 

Friction direction has been changed.

FIX_FRICTION_DIRECTION 

Friction direction is by definition on in one direction.

Definition at line 197 of file agxWire/Node.h.

Constructor & Destructor Documentation

◆ NodeMaterial()

agxWire::NodeMaterial::NodeMaterial ( )

Default constructor.

Member Function Documentation

◆ getActive()

bool agxWire::NodeMaterial::getActive ( ) const

Internal method.

Returns
true if this material has been assigned to generate constraints

◆ getActiveDirection()

Direction agxWire::NodeMaterial::getActiveDirection ( ) const
Returns
the active direction given forward or not for friction constraints (transforms from FrictionDirection to Direction)

◆ getEnable()

bool agxWire::NodeMaterial::getEnable ( ) const
Returns
true if this material is enabled

◆ getFrictionCoefficient()

agx::Real agxWire::NodeMaterial::getFrictionCoefficient ( Direction  dir) const
Returns
the wire friction coefficient in negative or positive direction (Direction::BOTH is not defined)

◆ getKinematicContactNodeVelocityScale()

agx::Real agxWire::NodeMaterial::getKinematicContactNodeVelocityScale ( Direction  dir) const
Returns
the edge velocity scaler in negative or positive direction (Direction::BOTH is not defined)

◆ getMaxForce()

agx::Real agxWire::NodeMaterial::getMaxForce ( Direction  dir)
Returns
the force in direction dir for the friction constraints force range

◆ getNormalForceMagnitude()

agx::Real agxWire::NodeMaterial::getNormalForceMagnitude ( ) const
Returns
the assigned normal force magnitude

◆ getViolationPerUnitLength()

agx::Real agxWire::NodeMaterial::getViolationPerUnitLength ( )
protected
Returns
the violation per unit length

◆ hasValidRestLength()

bool agxWire::NodeMaterial::hasValidRestLength ( ) const

Internal method.

Returns
true if the rest length is valid (i.e., >= 0)

◆ isEnabled()

bool agxWire::NodeMaterial::isEnabled ( ) const
Returns
true if this material is enabled

◆ isInfCoefficient()

bool agxWire::NodeMaterial::isInfCoefficient ( Direction  dir) const
Returns
true if there is infinite friction in dir and stick (true) coefficient or edge velocity scaler (stick = false)

◆ isStick() [1/2]

bool agxWire::NodeMaterial::isStick ( ) const

Internal method.

Returns
true if either negative, positive direction or both are stick

◆ isStick() [2/2]

bool agxWire::NodeMaterial::isStick ( Direction  dir) const

Internal method.

Returns
true if the contact state is stick

◆ setActive()

void agxWire::NodeMaterial::setActive ( bool  active)

Internal method.

Set if this material should generate constraints or not.

Parameters
active- true to activate constraints

◆ setFrictionCoefficient()

void agxWire::NodeMaterial::setFrictionCoefficient ( agx::Real  coeff,
Direction  dir = BOTH 
)

Set stick friction coefficient in one or both directions.

Parameters
coeff- stick friction coefficient
dir- direction (Default: BOTH, valid NEGATIVE, POSITIVE or BOTH)

◆ setKinematicContactNodeVelocityScale()

void agxWire::NodeMaterial::setKinematicContactNodeVelocityScale ( agx::Real  scaler,
Direction  dir = BOTH 
)

Set slide friction coefficient in one or both directions.

Parameters
scaler- edge velocity scaler
dir- direction (Default: BOTH, valid NEGATIVE, POSITIVE or BOTH)

◆ setNormalForceMagnitude()

void agxWire::NodeMaterial::setNormalForceMagnitude ( agx::Real  normalForce)
protected

Assign the current normal force magnitude.

Parameters
normalForce- current normal force magnitude

◆ setRestLength()

void agxWire::NodeMaterial::setRestLength ( agx::Real  restLength)
protected

Assign the rest length of the friction constraint.

Parameters
restLength- new rest length

◆ setStick()

void agxWire::NodeMaterial::setStick ( bool  stick,
Direction  dir 
)

Internal method.

Set that negative, positive or both direction has stick friction.

◆ setViolation()

void agxWire::NodeMaterial::setViolation ( agx::Real  violation)
protected

Assign current violation in the friction constraint.

Parameters
violation- current violation

◆ setViolationPerUnitLength()

void agxWire::NodeMaterial::setViolationPerUnitLength ( agx::Real  violationPerUnitLength)
protected

Assign violation per unit length.

Parameters
violationPerUnitLength- new violation per unit length

Member Data Documentation

◆ m_activeConstraint

bool agxWire::NodeMaterial::m_activeConstraint
protected

Tells you if the friction constraint is active.

Definition at line 415 of file agxWire/Node.h.

◆ m_frictionCoeffs

agx::Real agxWire::NodeMaterial::m_frictionCoeffs[2][BOTH]
protected

VELOCITY_SCALER, FRICTION_COEFFICIENT and POSITIVE, NEGATIVE.

Definition at line 410 of file agxWire/Node.h.

◆ m_goForward

char agxWire::NodeMaterial::m_goForward
protected

Bit mask for GO_FORWARD, IS_DIRTY...

Definition at line 414 of file agxWire/Node.h.

◆ m_normalForceMagnitude

agx::Real agxWire::NodeMaterial::m_normalForceMagnitude
protected

Magnitude of the normal force.

Definition at line 412 of file agxWire/Node.h.

◆ m_restLength

agx::Real agxWire::NodeMaterial::m_restLength
protected

Rest length of the friction constraint.

Definition at line 411 of file agxWire/Node.h.

◆ m_stick

bool agxWire::NodeMaterial::m_stick[BOTH]
protected

NEGATIVE and POSITIVE.

Definition at line 413 of file agxWire/Node.h.

◆ m_violationPerUnitLength

agx::Real agxWire::NodeMaterial::m_violationPerUnitLength
protected

Violation of the friction constraint.

Definition at line 416 of file agxWire/Node.h.


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