NL3D::CPSTurbulForceFunc Struct Reference

#include <ps_force.h>


Detailed Description

a turbulence force functor

Definition at line 636 of file ps_force.h.

Public Member Functions

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

Data Fields

float _Intensity
uint32 _NumOctaves
float _Scale


Member Function Documentation

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

Definition at line 641 of file ps_force.h.

References nlassert, and NL3D::TAnimationTime.

00642         {
00643                 nlassert(0);
00644 
00645                 // TODO : complete that
00646 
00647         /*      static const NLMISC::CVector v1(1.235f, - 45.32f, 157.5f);
00648                 static const NLMISC::CVector v2(-0.35f, 7.77f, 220.77f);
00649 
00650 
00651                 speed += ellapsedTime * _Intensity 
00652                            * NLMISC::CVector(2.f * (-0.5f + CPSUtil::buildPerlinNoise(_Scale * pos, _NumOctaves))
00653                                                  , 2.f * (-0.5f +  CPSUtil::buildPerlinNoise(_Scale * (pos +  v1) , _NumOctaves))
00654                                                  , 2.f * (-0.5f +  CPSUtil::buildPerlinNoise(_Scale * (pos +  v2) , _NumOctaves))
00655                                                  );
00656                                                  */
00657         }

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

Definition at line 659 of file ps_force.h.

References _NumOctaves, and _Scale.

00660          {
00661                 f.serialVersion(1);
00662                 f.serial(_Scale, _NumOctaves);
00663          }


Field Documentation

float NL3D::CPSTurbulForceFunc::_Intensity
 

Definition at line 666 of file ps_force.h.

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

uint32 NL3D::CPSTurbulForceFunc::_NumOctaves
 

Definition at line 667 of file ps_force.h.

Referenced by NL3D::CPSTurbul::getNumOctaves(), serial(), and NL3D::CPSTurbul::setNumOctaves().

float NL3D::CPSTurbulForceFunc::_Scale
 

Definition at line 665 of file ps_force.h.

Referenced by NL3D::CPSTurbul::getScale(), serial(), and NL3D::CPSTurbul::setScale().


The documentation for this struct was generated from the following file:
Generated on Tue Mar 16 07:29:01 2004 for NeL by doxygen 1.3.6