This class is intended to store an attribute list in a located or in a located bindable such as speed, color and so on. More...
#include <ps_attrib.h>
Public Types | |
Useful typedefs | |
| typedef CPSVector< T >::V | TContType |
| Container used by this class to store its datas. | |
| typedef T | value_type |
| The type used by the container. Its is the type used to instanciate this template. | |
| typedef TContType::iterator | iterator |
| an iterator on the datas | |
| typedef TContType::const_iterator | const_iterator |
| a const iterator on the datas | |
Public Member Functions | |
Object | |
| CPSAttrib () | |
| ctor | |
| void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| Serialization method. | |
| void | swap (CPSAttrib< T > &other) |
Size of the container | |
| void | resize (uint32 nbInstances) |
| Resize the attributes tab. | |
| uint32 | getSize (void) const |
| return the number of instance in the container | |
| uint32 | getMaxSize (void) const |
| return the max number of instance in the container | |
Element access. | |
| const T & | operator[] (uint32 index) const |
| get a const reference on an attribute instance | |
| T & | operator[] (uint32 index) |
| get a reference on an attribute instance | |
| const T & | back () const |
| T & | back () |
Iterator / enumeration | |
| iterator | begin (void) |
| Get an iterator at the beginning of the container. | |
| iterator | end (void) |
| Get an iterator at the end of the container. | |
| const_iterator | begin (void) const |
| Get a const_iterator at the beginning of the container. | |
| const_iterator | end (void) const |
| Get a const_iterator at the end of the container. | |
Add / remove methods | |
| sint32 | insert (const T &t=T()) |
| create a new object in the tab. | |
| void | remove (uint32 index) |
| remove an object from the tab | |
| void | clear (void) |
| clear the container | |
Protected Attributes | |
| TContType | _Tab |
| uint32 | _MaxSize |
This class is intended to store an attribute list in a located or in a located bindable such as speed, color and so on.
It is important to remember that a located holds all instance of object of one type (force, emitter, particles or both...).
Definition at line 262 of file ps_attrib.h.
| typedef TContType::const_iterator NL3D::CPSAttrib< T >::const_iterator |
a const iterator on the datas
Definition at line 292 of file ps_attrib.h.
| typedef TContType::iterator NL3D::CPSAttrib< T >::iterator |
an iterator on the datas
Definition at line 290 of file ps_attrib.h.
| typedef CPSVector<T>::V NL3D::CPSAttrib< T >::TContType |
Container used by this class to store its datas.
The container type is likely to change depending on memory requirement.
Definition at line 284 of file ps_attrib.h.
| typedef T NL3D::CPSAttrib< T >::value_type |
The type used by the container. Its is the type used to instanciate this template.
Definition at line 287 of file ps_attrib.h.
| NL3D::CPSAttrib< T >::CPSAttrib | ( | ) | [inline] |
ctor
Definition at line 398 of file ps_attrib.h.
References NL3D::CPSAttrib< T >::_MaxSize, and NL3D::DefaultMaxLocatedInstance.
| T& NL3D::CPSAttrib< T >::back | ( | ) | [inline] |
Definition at line 339 of file ps_attrib.h.
| const T& NL3D::CPSAttrib< T >::back | ( | ) | const [inline] |
Definition at line 333 of file ps_attrib.h.
| const_iterator NL3D::CPSAttrib< T >::begin | ( | void | ) | const [inline] |
Get a const_iterator at the beginning of the container.
Definition at line 360 of file ps_attrib.h.
| iterator NL3D::CPSAttrib< T >::begin | ( | void | ) | [inline] |
Get an iterator at the beginning of the container.
Definition at line 354 of file ps_attrib.h.
Referenced by NL3D::CPSLocated::allocateParametricInfos(), NL3D::CPSLocated::computeBBox(), NL3D::CPSZoneRectangle::computeCollisions(), NL3D::CPSZoneCylinder::computeCollisions(), NL3D::CPSZoneDisc::computeCollisions(), NL3D::CPSZoneSphere::computeCollisions(), NL3D::CPSZonePlane::computeCollisions(), NL3D::CPSBrownianForce::computeForces(), NL3D::CPSMagneticForce::computeForces(), NL3D::CPSCylindricVortex::computeForces(), NL3D::CPSSpring::computeForces(), NL3D::CPSCentralGravity::computeForces(), NL3D::CPSGravity::computeForces(), NL3D::CPSDirectionnalForce::computeForces(), NL3D::CIsotropicForceT< T >::computeForces(), NL3D::CPSShockWave::draw(), NL3D::CPSConstraintMesh::draw(), NL3D::CPSFanLight::draw(), NL3D::CPSFaceLookAt::draw(), NL3D::CPSDot::draw(), NL3D::FillQuadCoordsLocalTime(), NL3D::CPSBrownianForce::integrate(), NL3D::CPSGravity::integrate(), NL3D::CPSPlaneBasisFollowSpeed::make(), NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFuncRGBA >::make(), NL3D::CPSPlaneBasisFollowSpeed::make4(), NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFuncRGBA >::make4(), NL3D::CPSPlaneBasisFollowSpeed::makeN(), NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFuncRGBA >::makeN(), NL3D::CPSLocated::performParametricMotion(), NL3D::CPSEmitter::processRegularEmission(), NL3D::CPSEmitter::processRegularEmissionConsistent(), NL3D::CPSEmitter::processRegularEmissionConsistentWithNoLOD(), NL3D::CPSEmitter::processRegularEmissionWithNoLOD(), NL3D::CPSRibbonBase::resetFromOwner(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZoneSphere::show(), NL3D::CPSZonePlane::show(), NL3D::CPSGravity::show(), NL3D::CPSSphericalEmitter::showTool(), NL3D::CPSSound::step(), NL3D::CPSLight::step(), NL3D::CPSFace::step(), NL3D::CPSSound::stopSound(), NL3D::CPSRibbonBase::updateGlobals(), NL3D::CPSLocated::updateLife(), NL3D::CPSMesh::updatePos(), and NL3D::CPSMesh::~CPSMesh().
| void NL3D::CPSAttrib< T >::clear | ( | void | ) | [inline] |
clear the container
Definition at line 378 of file ps_attrib.h.
Referenced by NL3D::CPSLocated::serial().
| const_iterator NL3D::CPSAttrib< T >::end | ( | void | ) | const [inline] |
Get a const_iterator at the end of the container.
Definition at line 363 of file ps_attrib.h.
| iterator NL3D::CPSAttrib< T >::end | ( | void | ) | [inline] |
Get an iterator at the end of the container.
Definition at line 357 of file ps_attrib.h.
Referenced by NL3D::CPSLocated::allocateParametricInfos(), NL3D::CPSLocated::computeBBox(), NL3D::CPSZoneRectangle::computeCollisions(), NL3D::CPSZoneCylinder::computeCollisions(), NL3D::CPSZoneDisc::computeCollisions(), NL3D::CPSZoneSphere::computeCollisions(), NL3D::CPSZonePlane::computeCollisions(), NL3D::CPSMagneticForce::computeForces(), NL3D::CPSCylindricVortex::computeForces(), NL3D::CPSSpring::computeForces(), NL3D::CPSCentralGravity::computeForces(), NL3D::CPSGravity::computeForces(), NL3D::CPSDirectionnalForce::computeForces(), NL3D::CIsotropicForceT< T >::computeForces(), NL3D::GenEmitterPositions(), NL3D::GenEmitterPositionsWithLOD(), NL3D::CPSLocated::performParametricMotion(), NL3D::CPSEmitter::processRegularEmissionConsistent(), NL3D::CPSEmitter::processRegularEmissionConsistentWithNoLOD(), NL3D::CPSRibbonBase::resetFromOwner(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZoneSphere::show(), NL3D::CPSZonePlane::show(), NL3D::CPSGravity::show(), NL3D::CPSSphericalEmitter::showTool(), NL3D::CPSSound::stopSound(), NL3D::CPSLocated::updateLife(), and NL3D::CPSMesh::~CPSMesh().
| uint32 NL3D::CPSAttrib< T >::getMaxSize | ( | void | ) | const [inline] |
return the max number of instance in the container
Definition at line 307 of file ps_attrib.h.
Referenced by NL3D::CPSLocated::checkIntegrity(), NL3D::CPSZoneDisc::newElement(), NL3D::CPSZoneSphere::newElement(), NL3D::CPSZonePlane::newElement(), and NL3D::CPSEmitter::newElement().
| uint32 NL3D::CPSAttrib< T >::getSize | ( | void | ) | const [inline] |
return the number of instance in the container
Definition at line 304 of file ps_attrib.h.
Referenced by NL3D::CPSLocated::checkIntegrity(), NL3D::CPSZoneSphere::getMatrix(), NL3D::CPSSphericalEmitter::getMatrix(), NL3D::CPSZoneDisc::newElement(), NL3D::CPSZoneSphere::newElement(), NL3D::CPSZonePlane::newElement(), NL3D::CPSEmitter::newElement(), NL3D::CPSMesh::onShow(), NL3D::CPSLight::onShow(), NL3D::CPSEmitter::processRegularEmissionConsistent(), NL3D::CPSEmitter::processRegularEmissionConsistentWithNoLOD(), NL3D::CPSLight::releaseAllRef(), NL3D::CPSMesh::removeAllInstancesFromScene(), NL3D::CPSSound::removeAllSources(), NL3D::CPSSound::resize(), NL3D::CPSMesh::resize(), NL3D::CPSColorMemory::setColorType(), NL3D::CPSZoneDisc::setMatrix(), NL3D::CPSZoneSphere::setMatrix(), NL3D::CPSZonePlane::setMatrix(), NL3D::CPSCylindricVortex::setMatrix(), NL3D::CPSSphericalEmitter::setMatrix(), NL3D::CPSLight::show(), NL3D::CPSLight::step(), NL3D::CPSEmitter::updateMaxCountVect(), and NL3D::CPSLight::~CPSLight().
| sint32 NL3D::CPSAttrib< T >::insert | ( | const T & | t = T() |
) | [inline] |
create a new object in the tab.
It is append at the end of it
Definition at line 414 of file ps_attrib.h.
References NL3D::CPSAttrib< T >::_MaxSize, NL3D::CPSAttrib< T >::_Tab, and NL3D::DefaultMaxLocatedInstance.
Referenced by NL3D::CPSLocated::allocateParametricInfos(), NL3D::CPSZoneRectangle::newElement(), NL3D::CPSZoneCylinder::newElement(), NL3D::CPSZoneDisc::newElement(), NL3D::CPSZoneSphere::newElement(), NL3D::CPSZonePlane::newElement(), NL3D::CPSSound::newElement(), NL3D::CPSMesh::newElement(), NL3D::CPSLocated::newElement(), NL3D::CPSLight::newElement(), NL3D::CPSCylindricVortex::newElement(), NL3D::CPSSphericalEmitter::newElement(), NL3D::CPSEmitterRectangle::newElement(), NL3D::CPSEmitter::newElement(), NL3D::CPSLocated::queryCollisionInfo(), and NL3D::CPSEmitter::updateMaxCountVect().
| T& NL3D::CPSAttrib< T >::operator[] | ( | uint32 | index | ) | [inline] |
get a reference on an attribute instance
Definition at line 324 of file ps_attrib.h.
| const T& NL3D::CPSAttrib< T >::operator[] | ( | uint32 | index | ) | const [inline] |
get a const reference on an attribute instance
Definition at line 315 of file ps_attrib.h.
| void NL3D::CPSAttrib< T >::remove | ( | uint32 | index | ) | [inline] |
remove an object from the tab
Definition at line 426 of file ps_attrib.h.
References NL3D::CPSAttrib< T >::_Tab, and nlassert.
Referenced by NL3D::CPSZoneRectangle::deleteElement(), NL3D::CPSZoneCylinder::deleteElement(), NL3D::CPSZoneDisc::deleteElement(), NL3D::CPSZoneSphere::deleteElement(), NL3D::CPSZonePlane::deleteElement(), NL3D::CPSSound::deleteElement(), NL3D::CPSMesh::deleteElement(), NL3D::CPSLight::deleteElement(), NL3D::CPSCylindricVortex::deleteElement(), NL3D::CPSLocated::deleteElementBase(), NL3D::CPSSphericalEmitter::deleteElementBase(), NL3D::CPSEmitterRectangle::deleteElementBase(), NL3D::CPSEmitter::deleteElementBase(), and NL3D::CPSEmitter::updateMaxCountVect().
| void NL3D::CPSAttrib< T >::resize | ( | uint32 | nbInstances | ) | [inline] |
Resize the attributes tab.
This tells what is the max number of element in this tab, but don't add elements. The behaviour is much like std::vector::reserve
Definition at line 405 of file ps_attrib.h.
References NL3D::CPSAttrib< T >::_MaxSize, NL3D::CPSAttrib< T >::_Tab, and nlassert.
Referenced by NL3D::CPSLocated::allocateParametricInfos(), NL3D::CPSLocated::queryCollisionInfo(), NL3D::CPSZoneRectangle::resize(), NL3D::CPSZoneCylinder::resize(), NL3D::CPSZoneDisc::resize(), NL3D::CPSZoneSphere::resize(), NL3D::CPSZonePlane::resize(), NL3D::CPSSound::resize(), NL3D::CPSMesh::resize(), NL3D::CPSLocated::resize(), NL3D::CPSLight::resize(), NL3D::CPSCylindricVortex::resize(), NL3D::CPSSphericalEmitter::resize(), NL3D::CPSEmitterRectangle::resize(), NL3D::CPSEmitter::resize(), and NL3D::CPSEmitter::updateMaxCountVect().
| void NL3D::CPSAttrib< T >::serial | ( | NLMISC::IStream & | f | ) | throw (NLMISC::EStream) [inline] |
Serialization method.
Definition at line 439 of file ps_attrib.h.
References NLMISC::IStream::isReading(), nlassert, NLMISC::IStream::serial(), and NLMISC::IStream::serialVersion().
| void NL3D::CPSAttrib< T >::swap | ( | CPSAttrib< T > & | other | ) | [inline] |
Definition at line 565 of file ps_attrib.h.
References NL3D::CPSAttrib< T >::_MaxSize, and NL3D::CPSAttrib< T >::_Tab.
Referenced by NL3D::CPSLocated::computeMotion().
uint32 NL3D::CPSAttrib< T >::_MaxSize [protected] |
Definition at line 386 of file ps_attrib.h.
Referenced by NL3D::CPSAttrib< T >::CPSAttrib(), NL3D::CPSAttrib< sint32 >::getMaxSize(), NL3D::CPSAttrib< T >::insert(), NL3D::CPSAttrib< T >::resize(), and NL3D::CPSAttrib< T >::swap().
TContType NL3D::CPSAttrib< T >::_Tab [protected] |
Definition at line 385 of file ps_attrib.h.
Referenced by NL3D::CPSAttrib< sint32 >::back(), NL3D::CPSAttrib< sint32 >::begin(), NL3D::CPSAttrib< sint32 >::clear(), NL3D::CPSAttrib< sint32 >::end(), NL3D::CPSAttrib< sint32 >::getSize(), NL3D::CPSAttrib< T >::insert(), NL3D::CPSAttrib< sint32 >::operator[](), NL3D::CPSAttrib< T >::remove(), NL3D::CPSAttrib< T >::resize(), and NL3D::CPSAttrib< T >::swap().
1.6.1