a spring class More...
#include <ps_force.h>
Inherits NL3D::CPSForceIntensityHelper.
Public Member Functions | |
| CPSSpring (float k=1.0f) | |
| ctor : k is the coefficient of the spring | |
| virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| serialization | |
| virtual void | computeForces (CPSLocated &target) |
| Compute the force on the targets. | |
| virtual void | show () |
| Show the force (edition mode). | |
| NLMISC_DECLARE_CLASS (CPSSpring) | |
a spring class
Definition at line 461 of file ps_force.h.
| NL3D::CPSSpring::CPSSpring | ( | float | k = 1.0f |
) | [inline] |
ctor : k is the coefficient of the spring
Definition at line 466 of file ps_force.h.
References NL3D::CPSLocatedBindable::_Name, NL3D::CParticleSystem::getSerializeIdentifierFlag(), and NL3D::CPSForceIntensity::setIntensity().
| void NL3D::CPSSpring::computeForces | ( | CPSLocated & | target | ) | [virtual] |
Compute the force on the targets.
Implements NL3D::CPSForce.
Definition at line 767 of file ps_force.cpp.
References NL3D::CPSForceIntensity::_IntensityScheme, NL3D::CPSForceIntensity::_K, NL3D::CPSLocatedBindable::_Owner, 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, NL_PS_FUNC, and nlassert.
| NL3D::CPSSpring::NLMISC_DECLARE_CLASS | ( | CPSSpring | ) |
| void NL3D::CPSSpring::serial | ( | NLMISC::IStream & | f | ) | throw (NLMISC::EStream) [virtual] |
serialization
Reimplemented from NL3D::CPSForceIntensityHelper.
Definition at line 791 of file ps_force.cpp.
References NL_PS_FUNC, and NL3D::CPSForceIntensityHelper::serial().
| void NL3D::CPSSpring::show | ( | ) | [virtual] |
Show the force (edition mode).
Implements NL3D::CPSForce.
Definition at line 800 of file ps_force.cpp.
References NL3D::CPSLocatedBindable::displayIcon2d(), NLMISC::CVector::I, I, NLMISC::CVector::J, and NL_PS_FUNC.
1.6.1