a cylindric vortex. More...
#include <ps_force.h>
Inherits NL3D::CPSForceIntensityHelper, and NL3D::IPSMover.
Public Member Functions | |
| virtual void | computeForces (CPSLocated &target) |
| Compute the force on the targets. | |
| virtual void | show () |
| Show the force (edition mode). | |
| CPSCylindricVortex (float intensity=1.f) | |
| virtual bool | supportUniformScaling (void) const |
| Send back true if uniform scaling can be applied If it sends false, uniform scaling leads to undefine results. | |
| virtual bool | supportNonUniformScaling (void) const |
| Send back true if non-uniform scaling can be applied If it sends false, non-uniform scaling leads to undefine results (default has no effect). | |
| virtual void | setScale (uint32 k, float scale) |
| virtual NLMISC::CVector | getScale (uint32 k) const |
| virtual bool | onlyStoreNormal (void) const |
| some object may not store a whole matrix (e.g planes) this return true if only a normal is needed to set the orientation of the object | |
| virtual NLMISC::CVector | getNormal (uint32 index) |
| if the object only needs a normal, this return the normal. If not, is return (0, 0, 0) | |
| virtual void | setNormal (uint32 index, NLMISC::CVector n) |
| if the object only stores a normal, this set the normal of the object. Otherwise it has no effect | |
| virtual void | setMatrix (uint32 index, const NLMISC::CMatrix &m) |
| virtual NLMISC::CMatrix | getMatrix (uint32 index) const |
| void | setRadialViscosity (float v) |
| float | getRadialViscosity (void) const |
| void | setTangentialViscosity (float v) |
| float | getTangentialViscosity (void) const |
| NLMISC_DECLARE_CLASS (CPSCylindricVortex) | |
| virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| Serial the force definition. MUST be called by deriver during their serialisation. | |
Protected Member Functions | |
| virtual CPSLocated * | getForceIntensityOwner (void) |
| inherited from CPSForceIntensity | |
| virtual void | newElement (const CPSEmitterInfo &info) |
| Generate a new element for this bindable. | |
| virtual void | deleteElement (uint32 index) |
| Delete an element given its index Attributes of the located that hold this bindable are still accessible for of the index given index out of range -> nl_assert. | |
| virtual void | resize (uint32 size) |
| Resize the bindable attributes containers DERIVERS SHOULD CALL THEIR PARENT VERSION should not be called directly. | |
Protected Attributes | |
| CPSAttrib< NLMISC::CVector > | _Normal |
| TPSAttribFloat | _Radius |
| float | _RadialViscosity |
| float | _TangentialViscosity |
a cylindric vortex.
It has a limited extend It has unlimited extension in the z direction The model is aimed at tunability rather than realism
Definition at line 728 of file ps_force.h.
| NL3D::CPSCylindricVortex::CPSCylindricVortex | ( | float | intensity = 1.f |
) | [inline] |
Definition at line 738 of file ps_force.h.
References NL3D::CPSLocatedBindable::_Name, NL3D::CParticleSystem::getSerializeIdentifierFlag(), and NL3D::CPSForceIntensity::setIntensity().
| void NL3D::CPSCylindricVortex::computeForces | ( | CPSLocated & | target | ) | [virtual] |
Compute the force on the targets.
Implements NL3D::CPSForce.
Definition at line 829 of file ps_force.cpp.
References NL3D::CPSForceIntensity::_IntensityScheme, NL3D::CPSForceIntensity::_K, _Normal, NL3D::CPSLocatedBindable::_Owner, _RadialViscosity, _Radius, _TangentialViscosity, NL3D::CPSAttrib< T >::begin(), NL3D::CParticleSystem::EllapsedTime, NL3D::CPSAttrib< T >::end(), NL3D::CPSAttribMaker< T >::get(), NL3D::CPSLocated::getConversionMatrix(), NL3D::CPSLocated::getInvMass(), NL3D::CPSLocated::getPos(), NL3D::CPSLocated::getSize(), NL3D::CPSLocated::getSpeed(), NL3D::CParticleSystem::InsideSimLoop, NLMISC::CMatrix::mulVector(), NLMISC::n, NL_PS_FUNC, and nlassert.
| void NL3D::CPSCylindricVortex::deleteElement | ( | uint32 | index | ) | [protected, virtual] |
Delete an element given its index Attributes of the located that hold this bindable are still accessible for of the index given index out of range -> nl_assert.
Reimplemented from NL3D::CPSForceIntensityHelper.
Definition at line 945 of file ps_force.cpp.
References _Normal, _Radius, NL_PS_FUNC, and NL3D::CPSAttrib< T >::remove().
| virtual CPSLocated* NL3D::CPSCylindricVortex::getForceIntensityOwner | ( | void | ) | [inline, protected, virtual] |
inherited from CPSForceIntensity
Reimplemented from NL3D::CPSForceIntensityHelper.
Definition at line 777 of file ps_force.h.
References NL3D::CPSLocatedBindable::_Owner.
Implements NL3D::IPSMover.
Definition at line 917 of file ps_force.cpp.
References _Normal, NL3D::CPSLocatedBindable::_Owner, NL3D::CPSUtil::buildSchmidtBasis(), NL3D::CPSLocated::getPos(), NL_PS_FUNC, and NLMISC::CMatrix::setPos().
| virtual NLMISC::CVector NL3D::CPSCylindricVortex::getNormal | ( | uint32 | index | ) | [inline, virtual] |
if the object only needs a normal, this return the normal. If not, is return (0, 0, 0)
Reimplemented from NL3D::IPSMover.
Definition at line 750 of file ps_force.h.
References _Normal.
| float NL3D::CPSCylindricVortex::getRadialViscosity | ( | void | ) | const [inline] |
Definition at line 758 of file ps_force.h.
References _RadialViscosity.
| virtual NLMISC::CVector NL3D::CPSCylindricVortex::getScale | ( | uint32 | k | ) | const [inline, virtual] |
| float NL3D::CPSCylindricVortex::getTangentialViscosity | ( | void | ) | const [inline] |
Definition at line 761 of file ps_force.h.
References _TangentialViscosity.
| void NL3D::CPSCylindricVortex::newElement | ( | const CPSEmitterInfo & | info | ) | [protected, virtual] |
Generate a new element for this bindable.
They are generated according to the propertie of the class
Reimplemented from NL3D::CPSForceIntensityHelper.
Definition at line 938 of file ps_force.cpp.
References _Normal, _Radius, NL3D::CPSAttrib< T >::insert(), NLMISC::CVector::K, and NL_PS_FUNC.
| NL3D::CPSCylindricVortex::NLMISC_DECLARE_CLASS | ( | CPSCylindricVortex | ) |
| virtual bool NL3D::CPSCylindricVortex::onlyStoreNormal | ( | void | ) | const [inline, virtual] |
some object may not store a whole matrix (e.g planes) this return true if only a normal is needed to set the orientation of the object
Reimplemented from NL3D::IPSMover.
Definition at line 749 of file ps_force.h.
| void NL3D::CPSCylindricVortex::resize | ( | uint32 | size | ) | [protected, virtual] |
Resize the bindable attributes containers DERIVERS SHOULD CALL THEIR PARENT VERSION should not be called directly.
Call CPSLOcated::resize instead
Reimplemented from NL3D::CPSForceIntensityHelper.
Definition at line 952 of file ps_force.cpp.
References _Normal, _Radius, NL_PS_FUNC, nlassert, and NL3D::CPSAttrib< T >::resize().
| void NL3D::CPSCylindricVortex::serial | ( | NLMISC::IStream & | f | ) | throw (NLMISC::EStream) [virtual] |
Serial the force definition. MUST be called by deriver during their serialisation.
Reimplemented from NL3D::CPSForceIntensityHelper.
Definition at line 927 of file ps_force.cpp.
References NL_PS_FUNC, and NL3D::CPSForceIntensityHelper::serial().
| void NL3D::CPSCylindricVortex::setMatrix | ( | uint32 | index, | |
| const NLMISC::CMatrix & | m | |||
| ) | [virtual] |
Implements NL3D::IPSMover.
Definition at line 909 of file ps_force.cpp.
References _Normal, NL3D::CPSLocatedBindable::_Owner, NLMISC::CMatrix::getK(), NLMISC::CMatrix::getPos(), NL3D::CPSLocated::getPos(), NL3D::CPSAttrib< T >::getSize(), NL_PS_FUNC, and nlassert.
| virtual void NL3D::CPSCylindricVortex::setNormal | ( | uint32 | index, | |
| NLMISC::CVector | n | |||
| ) | [inline, virtual] |
if the object only stores a normal, this set the normal of the object. Otherwise it has no effect
Reimplemented from NL3D::IPSMover.
Definition at line 751 of file ps_force.h.
References _Normal.
| void NL3D::CPSCylindricVortex::setRadialViscosity | ( | float | v | ) | [inline] |
Definition at line 757 of file ps_force.h.
References _RadialViscosity.
| void NL3D::CPSCylindricVortex::setTangentialViscosity | ( | float | v | ) | [inline] |
Definition at line 760 of file ps_force.h.
References _TangentialViscosity.
| void NL3D::CPSCylindricVortex::show | ( | ) | [virtual] |
Show the force (edition mode).
Implements NL3D::CPSForce.
Definition at line 883 of file ps_force.cpp.
References _Normal, NL3D::CPSLocatedBindable::_Owner, _Radius, NL3D::CPSUtil::buildSchmidtBasis(), NL3D::CPSUtil::displayArrow(), NL3D::CPSUtil::displayDisc(), NL3D::CParticleSystem::getCurrentEditedElement(), NL3D::CPSLocatedBindable::getDriver(), NL3D::CPSLocatedBindable::getFontGenerator(), NL3D::CPSLocatedBindable::getFontManager(), NL3D::CParticleSystemProcess::getOwner(), NL3D::CPSLocated::getPos(), NL3D::CPSLocated::getSize(), NL_PS_FUNC, nlassert, NL3D::CPSUtil::print(), NLMISC::CRGBA::Red, and NL3D::CPSLocatedBindable::setupDriverModelMatrix().
| virtual bool NL3D::CPSCylindricVortex::supportNonUniformScaling | ( | void | ) | const [inline, virtual] |
Send back true if non-uniform scaling can be applied If it sends false, non-uniform scaling leads to undefine results (default has no effect).
Reimplemented from NL3D::IPSMover.
Definition at line 746 of file ps_force.h.
| virtual bool NL3D::CPSCylindricVortex::supportUniformScaling | ( | void | ) | const [inline, virtual] |
Send back true if uniform scaling can be applied If it sends false, uniform scaling leads to undefine results.
Reimplemented from NL3D::IPSMover.
Definition at line 745 of file ps_force.h.
CPSAttrib<NLMISC::CVector> NL3D::CPSCylindricVortex::_Normal [protected] |
Definition at line 780 of file ps_force.h.
Referenced by computeForces(), deleteElement(), getMatrix(), getNormal(), newElement(), resize(), setMatrix(), setNormal(), and show().
float NL3D::CPSCylindricVortex::_RadialViscosity [protected] |
Definition at line 785 of file ps_force.h.
Referenced by computeForces(), getRadialViscosity(), and setRadialViscosity().
TPSAttribFloat NL3D::CPSCylindricVortex::_Radius [protected] |
Definition at line 782 of file ps_force.h.
Referenced by computeForces(), deleteElement(), getScale(), newElement(), resize(), setScale(), and show().
float NL3D::CPSCylindricVortex::_TangentialViscosity [protected] |
Definition at line 788 of file ps_force.h.
Referenced by computeForces(), getTangentialViscosity(), and setTangentialViscosity().
1.6.1