this is a class to set force instensity (acceleration for gravity, k coefficient for springs...) More...
#include <ps_force.h>
Inherited by NL3D::CPSFluidFriction, NL3D::CPSForceIntensityHelper, and NL3D::CPSTurbul.
Public Member Functions | |
| CPSForceIntensity () | |
| virtual | ~CPSForceIntensity () |
| float | getIntensity (void) const |
| get the constant intensity that was set for the force | |
| virtual void | setIntensity (float value) |
| set a constant intensity for the force. this discard any previous call to setIntensityScheme | |
| virtual void | setIntensityScheme (CPSAttribMaker< float > *scheme) |
| set a non-constant intensity | |
| virtual void | setupFunctor (uint32 indexInLocated) |
| CPSAttribMaker< float > * | getIntensityScheme (void) |
| get the attribute maker for a non constant intensity | |
| const CPSAttribMaker< float > * | getIntensityScheme (void) const |
| void | serialForceIntensity (NLMISC::IStream &f) throw (NLMISC::EStream) |
Protected Member Functions | |
| virtual CPSLocated * | getForceIntensityOwner (void)=0 |
| deriver must return the located that own them here | |
| void | newForceIntensityElement (const CPSEmitterInfo &info) |
| void | deleteForceIntensityElement (uint32 index) |
| void | resizeForceIntensity (uint32 size) |
Protected Attributes | |
| float | _K |
| CPSAttribMaker< float > * | _IntensityScheme |
this is a class to set force instensity (acceleration for gravity, k coefficient for springs...)
Definition at line 158 of file ps_force.h.
| NL3D::CPSForceIntensity::CPSForceIntensity | ( | ) | [inline] |
Definition at line 163 of file ps_force.h.
| NL3D::CPSForceIntensity::~CPSForceIntensity | ( | ) | [virtual] |
Definition at line 180 of file ps_force.cpp.
References _IntensityScheme, and NL_PS_FUNC.
| void NL3D::CPSForceIntensity::deleteForceIntensityElement | ( | uint32 | index | ) | [inline, protected] |
Definition at line 201 of file ps_force.h.
References _IntensityScheme, NL3D::CPSAttribMaker< T >::deleteElement(), and NL3D::CPSAttribMaker< T >::hasMemory().
Referenced by NL3D::CPSTurbul::deleteElement(), NL3D::CPSBrownianForce::deleteElement(), NL3D::CPSFluidFriction::deleteElement(), and NL3D::CPSForceIntensityHelper::deleteElement().
| virtual CPSLocated* NL3D::CPSForceIntensity::getForceIntensityOwner | ( | void | ) | [protected, pure virtual] |
deriver must return the located that own them here
Implemented in NL3D::CPSForceIntensityHelper, NL3D::CPSFluidFriction, NL3D::CPSBrownianForce, NL3D::CPSTurbul, and NL3D::CPSCylindricVortex.
Referenced by resizeForceIntensity(), and setIntensityScheme().
| float NL3D::CPSForceIntensity::getIntensity | ( | void | ) | const [inline] |
get the constant intensity that was set for the force
Definition at line 171 of file ps_force.h.
References _K.
| const CPSAttribMaker<float>* NL3D::CPSForceIntensity::getIntensityScheme | ( | void | ) | const [inline] |
Definition at line 184 of file ps_force.h.
References _IntensityScheme.
| CPSAttribMaker<float>* NL3D::CPSForceIntensity::getIntensityScheme | ( | void | ) | [inline] |
get the attribute maker for a non constant intensity
Definition at line 183 of file ps_force.h.
References _IntensityScheme.
| void NL3D::CPSForceIntensity::newForceIntensityElement | ( | const CPSEmitterInfo & | info | ) | [inline, protected] |
Definition at line 197 of file ps_force.h.
References _IntensityScheme, NL3D::CPSAttribMaker< T >::hasMemory(), and NL3D::CPSAttribMaker< T >::newElement().
Referenced by NL3D::CPSTurbul::newElement(), NL3D::CPSBrownianForce::newElement(), NL3D::CPSFluidFriction::newElement(), and NL3D::CPSForceIntensityHelper::newElement().
| void NL3D::CPSForceIntensity::resizeForceIntensity | ( | uint32 | size | ) | [inline, protected] |
Definition at line 205 of file ps_force.h.
References _IntensityScheme, getForceIntensityOwner(), NL3D::CPSAttribMaker< T >::hasMemory(), and NL3D::CPSAttribMaker< T >::resize().
Referenced by NL3D::CPSTurbul::resize(), NL3D::CPSBrownianForce::resize(), NL3D::CPSFluidFriction::resize(), and NL3D::CPSForceIntensityHelper::resize().
| void NL3D::CPSForceIntensity::serialForceIntensity | ( | NLMISC::IStream & | f | ) | throw (NLMISC::EStream) |
Definition at line 195 of file ps_force.cpp.
References NL_PS_FUNC.
Referenced by NL3D::CPSTurbul::serial(), and NL3D::CPSFluidFriction::serial().
| void NL3D::CPSForceIntensity::setIntensity | ( | float | value | ) | [virtual] |
set a constant intensity for the force. this discard any previous call to setIntensityScheme
Reimplemented in NL3D::CPSGravity, and NL3D::CPSBrownianForce.
Definition at line 168 of file ps_force.cpp.
References _IntensityScheme, _K, and NL_PS_FUNC.
Referenced by NL3D::CPSCentralGravity::CPSCentralGravity(), NL3D::CPSCylindricVortex::CPSCylindricVortex(), NL3D::CPSDirectionnalForce::CPSDirectionnalForce(), NL3D::CPSFluidFriction::CPSFluidFriction(), and NL3D::CPSSpring::CPSSpring().
| void NL3D::CPSForceIntensity::setIntensityScheme | ( | CPSAttribMaker< float > * | scheme | ) | [virtual] |
set a non-constant intensity
Reimplemented in NL3D::CPSGravity, and NL3D::CPSBrownianForce.
Definition at line 186 of file ps_force.cpp.
References _IntensityScheme, getForceIntensityOwner(), NL3D::CPSAttribMaker< T >::hasMemory(), NL_PS_FUNC, nlassert, and NL3D::CPSAttribMaker< T >::resize().
| virtual void NL3D::CPSForceIntensity::setupFunctor | ( | uint32 | indexInLocated | ) | [inline, virtual] |
Reimplemented in NL3D::CPSFluidFriction, and NL3D::CPSTurbul.
Definition at line 180 of file ps_force.h.
CPSAttribMaker<float>* NL3D::CPSForceIntensity::_IntensityScheme [protected] |
Definition at line 195 of file ps_force.h.
Referenced by NL3D::CPSBrownianForce::computeForces(), NL3D::CPSMagneticForce::computeForces(), NL3D::CPSCylindricVortex::computeForces(), NL3D::CPSSpring::computeForces(), NL3D::CPSCentralGravity::computeForces(), NL3D::CPSGravity::computeForces(), NL3D::CPSDirectionnalForce::computeForces(), deleteForceIntensityElement(), getIntensityScheme(), NL3D::CPSBrownianForce::isIntegrable(), NL3D::CPSGravity::isIntegrable(), newForceIntensityElement(), resizeForceIntensity(), NL3D::CPSBrownianForce::setIntensity(), NL3D::CPSGravity::setIntensity(), setIntensity(), NL3D::CPSBrownianForce::setIntensityScheme(), NL3D::CPSGravity::setIntensityScheme(), setIntensityScheme(), NL3D::CPSTurbul::setupFunctor(), NL3D::CPSFluidFriction::setupFunctor(), and ~CPSForceIntensity().
float NL3D::CPSForceIntensity::_K [protected] |
Definition at line 194 of file ps_force.h.
Referenced by NL3D::CPSBrownianForce::computeForces(), NL3D::CPSMagneticForce::computeForces(), NL3D::CPSCylindricVortex::computeForces(), NL3D::CPSSpring::computeForces(), NL3D::CPSCentralGravity::computeForces(), NL3D::CPSGravity::computeForces(), NL3D::CPSDirectionnalForce::computeForces(), getIntensity(), NL3D::CPSBrownianForce::integrate(), NL3D::CPSGravity::integrate(), NL3D::CPSBrownianForce::integrateSingle(), NL3D::CPSGravity::integrateSingle(), setIntensity(), NL3D::CPSTurbul::setupFunctor(), and NL3D::CPSFluidFriction::setupFunctor().
1.6.1