NL3D::CPSFluidFrictionFunctor Class Reference

#include <ps_force.h>


Detailed Description

a fluid friction functor, it is used by the fluid friction class

Definition at line 496 of file ps_force.h.

Public Member Functions

 CPSFluidFrictionFunctor ()
float getK (void) const
void operator() (const NLMISC::CVector &pos, NLMISC::CVector &speed, float invMass, TAnimationTime ellapsedTime)
virtual void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
void setK (float coeff)

Protected Attributes

float _K


Constructor & Destructor Documentation

NL3D::CPSFluidFrictionFunctor::CPSFluidFrictionFunctor  )  [inline]
 

Definition at line 499 of file ps_force.h.

00499                                   : _K(1.f) 
00500         {               
00501         }


Member Function Documentation

float NL3D::CPSFluidFrictionFunctor::getK void   )  const [inline]
 

Definition at line 518 of file ps_force.h.

00518 { return _K; }

void NL3D::CPSFluidFrictionFunctor::operator() const NLMISC::CVector pos,
NLMISC::CVector speed,
float  invMass,
TAnimationTime  ellapsedTime
[inline]
 

Definition at line 506 of file ps_force.h.

References NL3D::TAnimationTime.

00507          {
00508                 speed -= (ellapsedTime * _K * invMass * speed);
00509          }

virtual void NL3D::CPSFluidFrictionFunctor::serial NLMISC::IStream f  )  throw (NLMISC::EStream) [inline, virtual]
 

Definition at line 511 of file ps_force.h.

00512          {
00513                  f.serialVersion(1);
00514                  // we don't save intensity info : it is saved by the owning object (and set before each use of this functor)
00515          }

void NL3D::CPSFluidFrictionFunctor::setK float  coeff  )  [inline]
 

Definition at line 521 of file ps_force.h.

Referenced by NL3D::CPSFluidFriction::setupFunctor().

00521 { _K = coeff; }


Field Documentation

float NL3D::CPSFluidFrictionFunctor::_K [protected]
 

Definition at line 524 of file ps_force.h.


The documentation for this class was generated from the following file:
Generated on Tue Mar 16 07:14:15 2004 for NeL by doxygen 1.3.6