Public Methods |
| CPSLocated () |
| Constructor. More...
|
virtual | ~CPSLocated () |
| dtor. More...
|
void | bind (CPSLocatedBindable *lb) |
| sorted insertion (by decreasing priority order) of a bindable (particle e.g an aspect, emitter) in a located. More...
|
void | remove (const CPSLocatedBindable *lb) |
| remove a bound object from the located if the object doesnt exist -> nlassert it is deleted. More...
|
uint32 | getNbBoundObjects (void) const |
| count the number of bound objects. More...
|
const CPSLocatedBindable* | getBoundObject (uint32 index) const |
| get a reference to a bound object. More...
|
sint32 | newElement (const NLMISC::CVector &pos = CVector::Null , const CVector &speed = CVector::Null, CPSLocatedBindable *emitterLocated = NULL, uint32 indexInEmitter = 0) |
| Generate one more instance in a located. More...
|
void | deleteElement (uint32 index) |
| delete an element. More...
|
uint32 | getNewElementIndex (void) const |
| Get the index of the new element that is created Valid only after the newElement method (overridable) of a LocatedBindable is called : you get the index of the located being generated, if you need its pos, speed, or mass. More...
|
bool | computeBBox (NLMISC::CAABBox &aabbox) const |
| Compute the aabbox of this located, (expressed in world basis. More...
|
void | setMaxMass (float mass) |
| Set the maximum mass of located to be generated. More...
|
float | getMaxMass (void) const |
| Get the maximum mass of located to be generated. More...
|
void | setMinMass (float mass) |
| Set the minimum mass of located to be generated. More...
|
float | getMinMass (void) const |
| Get the minimum mass of located to be generated. More...
|
float | setMass (float min, float max) |
| Set both min and max mass. More...
|
void | setLifeTime (CAnimationTime min, CAnimationTime max) |
| Set the duration of locateds. More...
|
CAnimationTime | getMinLife (void) const |
| Retrieve min duration of locateds. They must not be immortal -> nlassert. More...
|
CAnimationTime | getMaxLife (void) const |
| Retrieve max duration of locateds. They must not be immortal -> nlassert. More...
|
void | setLastForever (void) |
| set immortality for located. More...
|
bool | getLastForever (void) const |
| retrieve immortality for locateds. More...
|
TPSAttribFloat& | getInvMass (void) |
| get mass inverse attrib ref. More...
|
const TPSAttribFloat& | getInvMass (void) const |
| get mass inverse attrib const ref. More...
|
TPSAttribVector& | getPos (void) |
| get Pos attrib ref. More...
|
const TPSAttribVector& | getPos (void) const |
| get Pos attrib const ref. More...
|
TPSAttribVector& | getSpeed (void) |
| get Speed attrib ref. More...
|
const TPSAttribVector& | getSpeed (void) const |
| get Speed attrib const ref. More...
|
TPSAttribTime& | getTime (void) |
| get Time attrib ref. More...
|
const TPSAttribTime& | getTime (void) const |
| get Time attrib const ref. More...
|
TPSAttribTime& | getTimeIncrement (void) |
| get TotalTime attrib ref. More...
|
const TPSAttribTime& | getTimeIncrement (void) const |
| get TotalTime attrib const ref. More...
|
virtual void | step (TPSProcessPass pass, CAnimationTime ellapsedTime) |
| process the system. More...
|
uint32 | getSize (void) const |
| get the current number of instance in this located container. More...
|
uint32 | getMaxSize (void) const |
| get the max number of instance in this located container. More...
|
void | resize (uint32 newSize) |
| Resize the located container. More...
|
void | serial (NLMISC::IStream &f) |
| serialization. More...
|
IDriver* | getDriver () const |
| Shortcut to get an instance of the 3d driver. More...
|
| NLMISC_DECLARE_CLASS (CPSLocated) |
void | setupDriverModelMatrix (void) |
| Setup the driver model matrix. It is set accordingly to the basis used for rendering. More...
|
CVector | computeI (void) const |
| Compute a vector that will map to (1 0 0) after view and model transform. More...
|
CVector | computeK (void) const |
| Compute a vector that will map to (0 0 1) after view and model transform. More...
|
void | queryCollisionInfo (void) |
| call this if you need collision infos. More...
|
void | releaseCollisionInfo (void) |
| Release the collideInfos attribute. More...
|
TPSAttribCollisionInfo& | getCollisionInfo (void) |
| get a ref to the collision infos. More...
|
const TPSAttribCollisionInfo& | getCollisionInfo (void) const |
| get a const ref to the collision infos. More...
|
void | collisionOccured (const CPSCollisionInfo &ci, uint32 index) |
| A collider must call this when a collision occurs If the collider was nearer that another one it will be taken in account \index the index of instance that collided. More...
|
void | registerDtorObserver (CPSTargetLocatedBindable *observerInterface) |
| Register a dtor observer; (that derives from CPSTargetLocatedBindable) Each observer will be called when this object dtor is called This allow for objects that hold this as a target to know when the located is suppressed (example : collision objects hold located as targets) When an observer is detroyed, it MUST call removeDtorObserver, unless the located has been destroyed which will be notified by the call of releaseTargetRsc in CPSTargetLocatedBindable The same observer can only register once, otherwise, an assertion occurs. More...
|
void | unregisterDtorObserver (CPSTargetLocatedBindable *anObserver) |
| remove a dtor observer (not present -> nlassert). More...
|
Static Public Methods |
const CMatrix& | getConversionMatrix (const CPSLocated *A, const CPSLocated *B) |
| get a matrix that helps to express located B coordinate in located A basis. More...
|
Protected Types |
typedef std::vector< CPSLocatedBindable *> | TLocatedBoundCont |
typedef std::stack<CPostNewElementRequestInfo> | TNewElementRequestStack |
typedef std::vector<CPSTargetLocatedBindable *> | TDtorObserversVect |
Protected Methods |
void | updateNewElementRequestStack (void) |
| generate the located that were posted. More...
|
void | postNewElement (const NLMISC::CVector &pos = CVector::Null , const CVector &speed = CVector::Null) |
| Post a request for the generation of a new located. More...
|
void | resetCollisionInfo (void) |
| this prepare the located ofr collision tests. More...
|
Protected Attributes |
TLocatedBoundCont | _LocatedBoundCont |
uint32 | _MaxSize |
uint32 | _Size |
bool | _LastForever |
TPSAttribFloat | _InvMass |
TPSAttribVector | _Pos |
TPSAttribVector | _Speed |
TPSAttribTime | _Time |
TPSAttribTime | _TimeIncrement |
TPSAttribCollisionInfo* | _CollisionInfo |
| Used to solve collision detection it is not always instanciated. More...
|
uint32 | _CollisionInfoNbRef |
float | _MinMass |
float | _MaxMass |
float | _MaxLife |
float | _MinLife |
TNewElementRequestStack | _RequestStack |
| this stack is used after each update to generate located. More...
|
bool | _UpdateLock |
| this is used to tell wether a newElement or a deleteElement if being performed During these method, creation should use postNewElement to generate new elements Because of the data structures (each located bindable are updated one after each other) inconsistency can happen, when a located generated another located of the same type when he's deleted. More...
|
TDtorObserversVect | _DtorObserversVect |
A located don't do anything by itself. You must bind objects to it, such as a particle, a force and so on. It is important to remember that a located holds all instance of object of one type (force, emitter, particles or both...), not only one.