taoCNode Class Reference
[Dynamics]

Contact node class

This provides a base node class for other node involving collision. More...

#include <taoCNode.h>

Inheritance diagram for taoCNode:

Inheritance graph
[legend]
List of all members.

Coefficients of friction

where v is velocity, a is acceleration, y is impulse, and f is force at the contact point.
Note:
: (*)_n and (*)_t indicate the normal and tangential components of (*) respectively.


virtual void setCOF_grip (deFloat c)
 cofg : coefficient of grip friction when v != 0 and y != 0 : f_g = - sign(v_t) * cofg * y_n
virtual void setCOF_viscous (deFloat c)
 cofv : coefficient of viscous friction when v != 0 : f_v = - v_t * cofv
virtual void setCOF_static (deFloat c)
 cofs : coefficient of static friction when v == 0 and a != 0 : f_s = - sign(a_t) * cofs * f_n
virtual void setCOF_dynamic (deFloat c)
 cofd : coefficient of dynamic friction when v != 0 : f_d = - sign(v_t) * cofd * f_n
virtual deFloat effectiveMass (const deVector3 *Pie, const deVector3 *Ui)
virtual void linearVelocity (deVector3 *Vie, const deVector3 *Pie)
virtual void linearAcceleration (deVector3 *Aie, const deVector3 *Pie)
virtual void impulse (const deVector3 *Pie, const deVector3 *Yie)
 computes new velocity given impulse
virtual void impulseDist (const deVector3 *Pie, const deVector3 *Yie)
 computes new position given pseudo impulse
virtual void force (const deVector3 *Pie, const deVector3 *Fie)
 computes new force given force
virtual deInt impact1 (const deVector3 *Pie, const deVector3 *Ui, const deFloat cor2, const deFloat cofg2)
 computes new velocity and force given pos, vel, acc
virtual deInt impact2 (taoCNode *ni, const deVector3 *Pie, const deVector3 *Ui, taoCNode *nj, const deVector3 *Pje, const deVector3 *Uj)
 This method computes impulse/force and changes velocity/friction between two colliding nodes, ni and nj.
virtual deInt penetration1 (const deVector3 *Pie, const deVector3 *Ui, const deVector3 *pdist, const deFloat dt)
 This method computes impulse and changes position/orientation using impulseDist().

Public Member Functions

 taoCNode ()
virtual ~taoCNode ()
virtual deFrameframeGlobal ()=0
 global frame for the dynamics computation
virtual void getFrameGraphics (deFrame *Fg)=0
 global frame for graphics display
virtual void setID (const deInt id)
virtual deInt getID ()
virtual void setIsFixed (const deInt f)
virtual deInt getIsFixed ()
virtual deFloat getCOR ()
virtual deFloat getCOF_grip ()
virtual deFloat getCOF_viscous ()
virtual deFloat getCOF_static ()
virtual deFloat getCOF_dynamic ()
virtual void setCOR (deFloat c)
 coefficient of restitution

Detailed Description

Contact node class

This provides a base node class for other node involving collision.

See also:
taoDNode, taoNode, taoNodeRB, taoNodePS


Constructor & Destructor Documentation

taoCNode::taoCNode  )  [inline]
 

virtual taoCNode::~taoCNode  )  [inline, virtual]
 


Member Function Documentation

virtual deFloat taoCNode::effectiveMass const deVector3 Pie,
const deVector3 Ui
[inline, virtual]
 

virtual void taoCNode::force const deVector3 Pie,
const deVector3 Fie
[inline, virtual]
 

computes new force given force

This method replaces the accumulated force with the given force.

Remarks:
replaces the internal force with a new force
Precondition:
A, F
Postcondition:
F
  • Pie - contact point expressed in local frame.
  • Fie - force at the contact point expressed in local frame.
    Note:
    this method replaces the internal force in the node.

Reimplemented in taoNode.

virtual deFrame* taoCNode::frameGlobal  )  [pure virtual]
 

global frame for the dynamics computation

Note:
for taoNodeRB, this is the center of mass frame.

for taoNode, this is the same frame getFrameGraphics()

Implemented in taoNode, and taoNodeRoot.

virtual deFloat taoCNode::getCOF_dynamic  )  [inline, virtual]
 

virtual deFloat taoCNode::getCOF_grip  )  [inline, virtual]
 

virtual deFloat taoCNode::getCOF_static  )  [inline, virtual]
 

virtual deFloat taoCNode::getCOF_viscous  )  [inline, virtual]
 

virtual deFloat taoCNode::getCOR  )  [inline, virtual]
 

virtual void taoCNode::getFrameGraphics deFrame Fg  )  [pure virtual]
 

global frame for graphics display

Note:
for taoNodeRB, this is the graphics origin frame without the offset.

for taoNodeRB, setFrameGraphics() should be used to set this frame.

for taoNode, this is the same frame as frameGlobal()

Return values:
Fg is filled with the frame info for graphics sync.

Implemented in taoNode, and taoNodeRoot.

virtual deInt taoCNode::getID  )  [inline, virtual]
 

virtual deInt taoCNode::getIsFixed  )  [inline, virtual]
 

deInt taoCNode::impact1 const deVector3 Pie,
const deVector3 Ui,
const deFloat  cor2,
const deFloat  cofg2
[virtual]
 

computes new velocity and force given pos, vel, acc

Remarks:
do not use ddQ after this call, replaces the internal force to the new force
Precondition:
T, Q, V, dQ, A
Postcondition:
V, dQ, F
  • Pie - contact point expressed in local frame.
  • Ui - unit contact direction vector expressed in local frame (outward normal vector)
  • cor2 - coefficient of restitution of the other collision node.
  • cof2 - coefficient of grip friction of the other collision node.
    Note:
    this method is assuming a node is colliding with a non-moving node.

deInt taoCNode::impact2 taoCNode ni,
const deVector3 Pie,
const deVector3 Ui,
taoCNode nj,
const deVector3 Pje,
const deVector3 Uj
[virtual]
 

This method computes impulse/force and changes velocity/friction between two colliding nodes, ni and nj.

  • Pie - contact point expressed in frame i : Pie = ^iP_e - ^iP_i
  • Pje - contact point expressed in frame j : Pje = ^jP_e - ^jP_j
  • Ui - unit contact direction vector expressed in frame i : Ui = (^iP_j - ^iP_i)/|^iP_j - ^iP_i|
  • Uj - Ui expressed in frame j
    Note:
    this method should be used for two moving nodes.

virtual void taoCNode::impulse const deVector3 Pie,
const deVector3 Yie
[inline, virtual]
 

computes new velocity given impulse

This method changes velocity instantaneously by applying the given impulse.

Remarks:
do not use ddQ after this call
Precondition:
T, Q, V, dQ, Y
Postcondition:
V, dQ
  • Pie - contact point expressed in local frame.
  • Yie - impulse at the contact point expressed in local frame.

Reimplemented in taoNode.

virtual void taoCNode::impulseDist const deVector3 Pie,
const deVector3 Yie
[inline, virtual]
 

computes new position given pseudo impulse

This method changes position and orientation instantaneously by applying the given pseudo impulse.

  • Pie - contact point expressed in local frame.
  • Yie - pseudo impulse at the contact point expressed in local frame.

Reimplemented in taoNode.

virtual void taoCNode::linearAcceleration deVector3 Aie,
const deVector3 Pie
[inline, virtual]
 

Reimplemented in taoNode.

virtual void taoCNode::linearVelocity deVector3 Vie,
const deVector3 Pie
[inline, virtual]
 

Reimplemented in taoNode.

deInt taoCNode::penetration1 const deVector3 Pie,
const deVector3 Ui,
const deVector3 pdist,
const deFloat  dt
[virtual]
 

This method computes impulse and changes position/orientation using impulseDist().

  • Pie - contact point expressed in local frame.
  • Ui - unit contact direction vector expressed in local frame (outward normal vector).
  • pdist - penetration distance vector : pdist = P_o - P_i
  • dt - integration time step.
    Note:
    this method is assuming a node is colliding with a non-moving node.

virtual void taoCNode::setCOF_dynamic deFloat  c  )  [inline, virtual]
 

cofd : coefficient of dynamic friction when v != 0 : f_d = - sign(v_t) * cofd * f_n

virtual void taoCNode::setCOF_grip deFloat  c  )  [inline, virtual]
 

cofg : coefficient of grip friction when v != 0 and y != 0 : f_g = - sign(v_t) * cofg * y_n

virtual void taoCNode::setCOF_static deFloat  c  )  [inline, virtual]
 

cofs : coefficient of static friction when v == 0 and a != 0 : f_s = - sign(a_t) * cofs * f_n

virtual void taoCNode::setCOF_viscous deFloat  c  )  [inline, virtual]
 

cofv : coefficient of viscous friction when v != 0 : f_v = - v_t * cofv

virtual void taoCNode::setCOR deFloat  c  )  [inline, virtual]
 

coefficient of restitution

virtual void taoCNode::setID const deInt  id  )  [inline, virtual]
 

virtual void taoCNode::setIsFixed const deInt  f  )  [inline, virtual]
 


The documentation for this class was generated from the following files:
Generated on Sun Apr 9 22:12:45 2006 for TAO by  doxygen 1.4.6-NO