From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/a02691.html | 2512 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2512 insertions(+) create mode 100644 docs/doxygen/nel/a02691.html (limited to 'docs/doxygen/nel/a02691.html') diff --git a/docs/doxygen/nel/a02691.html b/docs/doxygen/nel/a02691.html new file mode 100644 index 00000000..0064acbe --- /dev/null +++ b/docs/doxygen/nel/a02691.html @@ -0,0 +1,2512 @@ + + +NeL: NL3D::CPSLocatedBindable class Reference + + + +
+

NL3D::CPSLocatedBindable Class Reference

#include <ps_located.h> +

+

Inheritance diagram for NL3D::CPSLocatedBindable: +

+ +NLMISC::IStreamable +NLMISC::IClassable +NL3D::CPSEmitter +NL3D::CPSLight +NL3D::CPSParticle +NL3D::CPSSound +NL3D::CPSTargetLocatedBindable +NL3D::CPSEmitterDirectionnal +NL3D::CPSEmitterOmni +NL3D::CPSEmitterRectangle +NL3D::CPSSphericalEmitter +NL3D::CPSConstraintMesh +NL3D::CPSDot +NL3D::CPSFanLight +NL3D::CPSMesh +NL3D::CPSQuad +NL3D::CPSRibbonBase +NL3D::CPSShockWave +NL3D::CPSForce +NL3D::CPSZone + +

Detailed Description

+an instance of these class can be bound to a particle system located this include forces, particle, and so on... +

+ +

+Definition at line 818 of file ps_located.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Object

 CPSLocatedBindable ()
 ***************************************************************************************

virtual void finalize (void)
 ***************************************************************************************

virtual void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 ***************************************************************************************

virtual ~CPSLocatedBindable ()
 ***************************************************************************************


Public Member Functions

virtual void basisChanged (TPSMatrixMode systemBasis)
virtual bool completeBBox (NLMISC::CAABBox &box) const
NLMISC::CVector computeI (void) const
NLMISC::CVector computeJ (void) const
NLMISC::CVector computeK (void) const
virtual bool doesProduceBBox (void) const
virtual void enumTexs (std::vector< NLMISC::CSmartPtr< ITexture > > &dest, IDriver &drv)
virtual std::string getClassName ()=0
IDrivergetDriver () const
 shortcut to get an instance of the driver

uint32 getExternID (void) const
 get the extern ID of this located bindable

const CFontGeneratorgetFontGenerator (void) const
 Shortcut to get the font generator if one was set (const version).

CFontGeneratorgetFontGenerator (void)
 Shortcut to get the font generator if one was set.

const CFontManagergetFontManager (void) const
 Shortcut to get the font manager if one was set (const version).

CFontManagergetFontManager (void)
 ***************************************************************************************

const NLMISC::CMatrixgetInvertedSysMat (void) const
 shortcut to get the inverted matrix of the system

const NLMISC::CMatrixgetInvertedViewMat (void) const
 shortcut to get the inverted view matrix

const NLMISC::CMatrixgetLocalToWorldMatrix () const
 Shortcut to get the local to world matrix.

TPSLod getLOD (void) const
 get the valid lods for that object

std::string getName (void) const
 get the located bindable name (edition purpose)

const CPSLocatedgetOwner (void) const
 get the located that owns this bindable (const version)

CPSLocatedgetOwner (void)
 get the located that owns this bindable

virtual uint32 getPriority (void) const=0
const NLMISC::CMatrixgetSysMat (void) const
 ***************************************************************************************

virtual uint32 getType (void) const=0
virtual bool getUserMatrixUsageCount () const
const NLMISC::CMatrixgetViewMat (void) const
 shortcut to get the view matrix

virtual bool hasEmitters (void) const
 tells wether there are alive emitters

virtual bool hasParticles (void) const
 tells wether there are alive entities / particles

bool isActive () const
virtual void motionTypeChanged (bool parametric)
 called when a located has switch between incrmental / parametric motion. The default does nothing

virtual void notifyTargetRemoved (CPSLocated *ptr)
 ***************************************************************************************

virtual void releaseAllRef ()
 ***************************************************************************************

virtual void releaseRefTo (const CParticleSystemProcess *other)
void setActive (bool active)
 Activate / Deactivate this object. When not active, the owning system won't try to call the 'step' method.

void setExternID (uint32 id)
 ***************************************************************************************

void setLOD (TPSLod lod)
void setName (const std::string &name)
 set the located bindable name (edition purpose)

void setupDriverModelMatrix (void)
 shortcut to setup the model matrix (system basis or world basis)

virtual void setZBias (float value)
virtual void step (TPSProcessPass pass, TAnimationTime ellapsedTime, TAnimationTime realEt)=0
 process one pass for this bindable

virtual void systemDateChanged ()

Protected Member Functions

virtual void bounceOccured (uint32 index)
virtual void deleteElement (uint32 index)=0
void displayIcon2d (const NLMISC::CVector tab[], uint nbSegs, float scale)
 ***************************************************************************************

virtual void newElement (CPSLocated *emitterLocated, uint32 emitterIndex)=0
virtual void resize (uint32 size)=0
virtual void setOwner (CPSLocated *psl)
 ***************************************************************************************


Protected Attributes

bool _Active
uint32 _ExternID
TPSLod _LOD
 tells when this object must be dealt with

std::string _Name
CPSLocated_Owner

Friends

class CPSLocated
+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NL3D::CPSLocatedBindable::CPSLocatedBindable  ) 
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+ +

+Definition at line 1942 of file ps_located.cpp. +

+References NL3D::PSLod1n2. +

+

01942                                        : _LOD(PSLod1n2), _Owner(NULL), _ExternID(0), _Active(true)
+01943 {
+01944         _Owner = NULL;
+01945 }
+
+

+ + + + +
+ + + + + + + + + +
NL3D::CPSLocatedBindable::~CPSLocatedBindable  )  [virtual]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+ +

+Definition at line 1984 of file ps_located.cpp. +

+References _ExternID, NL3D::CParticleSystemProcess::getOwner(), and NL3D::CParticleSystem::unregisterLocatedBindableExternID(). +

+

01985 {
+01986         if (_ExternID)
+01987         {
+01988                 if (_Owner && _Owner->getOwner())
+01989                 {
+01990                         _Owner->getOwner()->unregisterLocatedBindableExternID(this);
+01991                 }
+01992         }
+01993 }
+
+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::basisChanged TPSMatrixMode  systemBasis  )  [inline, virtual]
+
+ + + + + +
+   + + +

+Called when the basis of the owner changed. the default behaviour does nothing

Parameters:
+ + +
newBasis : True if in the system basis, false for the world basis.
+
+ +

+Reimplemented in NL3D::CPSForce. +

+Definition at line 968 of file ps_located.h. +

+

00968 {}
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::bounceOccured uint32  index  )  [inline, protected, virtual]
+
+ + + + + +
+   + + +

+a bounce occured, so some action could be done. The default behaviour does nothing

Parameters:
+ + +
index the index of the element that bounced
+
+ +

+Reimplemented in NL3D::CPSEmitter. +

+Definition at line 1011 of file ps_located.h. +

+References index, and uint32. +

+

01011 {}
+
+

+ + + + +
+ + + + + + + + + + +
virtual bool NL3D::CPSLocatedBindable::completeBBox NLMISC::CAABBox box  )  const [inline, virtual]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CPSFanLight, NL3D::CPSQuad, and NL3D::CPSShockWave. +

+Definition at line 884 of file ps_located.h. +

+

00884 { return false ;}
+
+

+ + + + +
+ + + + + + + + + + +
NLMISC::CVector NL3D::CPSLocatedBindable::computeI void   )  const [inline]
+
+ + + + + +
+   + + +

+Compute a vector that will map to (1 0 0) after view and model transform. This allow to have object that always faces the user, whatever basis they are in +

+Definition at line 931 of file ps_located.h. +

+References NL3D::CPSLocated::computeI(). +

+Referenced by displayIcon2d(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSGravity::show(), and NL3D::CPSEmitter::showTool(). +

+

00931 { return _Owner->computeI(); }
+
+

+ + + + +
+ + + + + + + + + + +
NLMISC::CVector NL3D::CPSLocatedBindable::computeJ void   )  const [inline]
+
+ + + + + +
+   + + +

+Compute a vector that will map to (0 1 0) after view and model transform. This allow to have object that always faces the user, whatever basis they are in +

+Definition at line 936 of file ps_located.h. +

+References NL3D::CPSLocated::computeJ(). +

+Referenced by NL3D::CPSFaceLookAtHelper::drawLookAt(). +

+

00936 { return _Owner->computeJ(); }
+
+

+ + + + +
+ + + + + + + + + + +
NLMISC::CVector NL3D::CPSLocatedBindable::computeK void   )  const [inline]
+
+ + + + + +
+   + + +

+Compute a vector that will map to (0 0 1) after view and model transform. This allow to have object that always faces the user, whatever basis they are in +

+Definition at line 940 of file ps_located.h. +

+References NL3D::CPSLocated::computeK(). +

+Referenced by displayIcon2d(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), and NL3D::CPSEmitter::showTool(). +

+

00940 { return _Owner->computeK(); }
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::deleteElement uint32  index  )  [protected, pure virtual]
+
+ + + + + +
+   + + +

+Delete an element given its index Attributes of the located that hold this bindable (pos etc...) are still accessible for the given index. index out of range -> nl_assert +

+Implemented in NL3D::CPSDot, NL3D::CPSEmitter, NL3D::CPSEmitterDirectionnal, NL3D::CPSEmitterOmni, NL3D::CPSEmitterRectangle, NL3D::CPSSphericalEmitter, NL3D::CPSFace, NL3D::CPSFaceLookAt, NL3D::CPSFanLight, NL3D::CPSForce, NL3D::CPSForceIntensityHelper, NL3D::CIsotropicForceT< T >, NL3D::CPSFluidFriction, NL3D::CPSBrownianForce, NL3D::CPSTurbul, NL3D::CPSCylindricVortex, NL3D::CPSLight, NL3D::CPSMesh, NL3D::CPSConstraintMesh, NL3D::CPSParticle, NL3D::CPSQuad, NL3D::CPSRibbon, NL3D::CPSRibbonBase, NL3D::CPSRibbonLookAt, NL3D::CPSShockWave, NL3D::CPSSound, NL3D::CPSTailDot, NL3D::CPSZonePlane, NL3D::CPSZoneSphere, NL3D::CPSZoneDisc, NL3D::CPSZoneCylinder, NL3D::CPSZoneRectangle, NL3D::CIsotropicForceT< CPSTurbulForceFunc >, and NL3D::CIsotropicForceT< CPSFluidFrictionFunctor >. +

+Referenced by setOwner().

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CPSLocatedBindable::displayIcon2d const NLMISC::CVector  tab[],
uint  nbSegs,
float  scale
[protected]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+show an drawing to represent the object, and in red if it is selected

Parameters:
+ + + + +
tab : a table of 2 * nbSeg vector. only the x and y coordinates are used
nbSeg : the number of segment
scale : the scale to use for drawing
+
+ +

+Definition at line 2038 of file ps_located.cpp. +

+References computeI(), computeK(), NL3D::CParticleSystem::getCurrentEditedElement(), getDriver(), NL3D::CParticleSystemProcess::getOwner(), NL3D::CPSLocated::getPos(), NL3D::CPSLocated::getSize(), index, NL3D::CMaterial::setBlend(), NL3D::CMaterial::setBlendFunc(), NL3D::CMaterial::setColor(), NL3D::CMaterial::setLighting(), setupDriverModelMatrix(), NL3D::CMaterial::setZFunc(), NL3D::CMaterial::setZWrite(), size, uint, uint32, NLMISC::CLine::V0, NLMISC::CLine::V1, NLMISC::CVector::x, and NLMISC::CVector::y. +

+Referenced by NL3D::CPSSpring::show(), NL3D::CPSCentralGravity::show(), and NL3D::CPSParticle::showTool(). +

+

02039 {
+02040         uint32 size = _Owner->getSize();
+02041         if (!size) return;              
+02042         setupDriverModelMatrix();       
+02043 
+02044         const CVector I = computeI();
+02045         const CVector K = computeK();
+02046 
+02047         static std::vector<NLMISC::CLine> lines;
+02048         
+02049         lines.clear();
+02050 
+02051         // ugly slow code, but not for runtime
+02052         for (uint  k = 0; k < size; ++k)
+02053         {
+02054                 // center of the current particle
+02055                 const CVector p = _Owner->getPos()[k];
+02056                 
+02057                 
+02058 
+02059                 for (uint l = 0; l < nbSegs; ++l)
+02060                 {
+02061                         NLMISC::CLine li;
+02062                         li.V0 = p + scale * (tab[l << 1].x * I + tab[l << 1].y * K);
+02063                         li.V1 = p + scale * (tab[(l << 1) + 1].x * I + tab[(l << 1) + 1].y * K);
+02064                         lines.push_back(li);
+02065                 }
+02066         
+02067                 CMaterial mat;
+02068 
+02069                 mat.setBlendFunc(CMaterial::one, CMaterial::one);
+02070                 mat.setZWrite(false);
+02071                 mat.setLighting(false);
+02072                 mat.setBlend(true);
+02073                 mat.setZFunc(CMaterial::less);
+02074                 
+02075         
+02076 
+02077                 CPSLocated *loc;
+02078                 uint32 index;           
+02079                 CPSLocatedBindable *lb;
+02080                 _Owner->getOwner()->getCurrentEditedElement(loc, index, lb);
+02081         
+02082                 mat.setColor((lb == NULL || this == lb) && loc == _Owner && index == k  ? CRGBA::Red : CRGBA(127, 127, 127));
+02083                 
+02084 
+02085                 CDRU::drawLinesUnlit(lines, mat, *getDriver() );
+02086         }
+02087 
+02088 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual bool NL3D::CPSLocatedBindable::doesProduceBBox void   )  const [inline, virtual]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CPSForce. +

+Definition at line 888 of file ps_located.h. +

+

00888 { return true; }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::enumTexs std::vector< NLMISC::CSmartPtr< ITexture > > &  dest,
IDriver drv
[inline, virtual]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CPSFanLight, NL3D::CPSQuad, NL3D::CPSRibbon, NL3D::CPSRibbonLookAt, and NL3D::CPSShockWave. +

+Definition at line 977 of file ps_located.h. +

+

00977 {}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::finalize void   )  [virtual]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+this should be called before to delete any bindable inserted in a system, but this is done by the system, so you should never need calling it. This has been introduced because calls in dtor are not polymorphic to derived class (which are already destroyed anyway), and some infos are needed in some dtor. The default behaviour does nothing +

+Reimplemented in NL3D::CPSTargetLocatedBindable. +

+Definition at line 1975 of file ps_located.cpp. +

+References NL3D::CParticleSystemProcess::getOwner(), getUserMatrixUsageCount(), and NL3D::CParticleSystem::releaseRefForUserSysCoordInfo(). +

+

01976 {
+01977         if (_Owner && _Owner->getOwner())
+01978         {
+01979                 _Owner->getOwner()->releaseRefForUserSysCoordInfo(getUserMatrixUsageCount());
+01980         }
+01981 }       
+
+

+ + + + +
+ + + + + + + + + +
virtual std::string NLMISC::IClassable::getClassName  )  [pure virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Implemented in NLAIAGENT::CNumericIndex, NLAIC::IPointerGestion, NLAIC::CIdentType, and CAutomataDesc. +

+Referenced by NLMISC::CClassRegistry::checkObject(), and NL3D::GetTextureSize().

+

+ + + + +
+ + + + + + + + + + +
IDriver* NL3D::CPSLocatedBindable::getDriver void   )  const [inline]
+
+ + + + + +
+   + + +

+shortcut to get an instance of the driver +

+ +

+Definition at line 890 of file ps_located.h. +

+References NL3D::CPSLocated::getDriver(), and nlassert. +

+Referenced by displayIcon2d(), NL3D::CPSTailDot::displayRibbons(), NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSRibbon::displayRibbons(), NL3D::CPSDot::draw(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), NL3D::CPSZoneRectangle::show(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZoneSphere::show(), NL3D::CPSZonePlane::show(), NL3D::CPSLight::show(), NL3D::CPSCylindricVortex::show(), NL3D::CPSGravity::show(), NL3D::CPSDirectionnalForce::show(), NL3D::CPSSphericalEmitter::showTool(), NL3D::CPSEmitterRectangle::showTool(), and NL3D::CPSEmitter::showTool(). +

+

00891          { 
+00892                  nlassert(_Owner);
+00893                  nlassert(_Owner->getDriver());
+00894                  return _Owner->getDriver();
+00895          }              
+
+

+ + + + +
+ + + + + + + + + + +
uint32 NL3D::CPSLocatedBindable::getExternID void   )  const [inline]
+
+ + + + + +
+   + + +

+get the extern ID of this located bindable +

+ +

+Definition at line 964 of file ps_located.h. +

+References _ExternID, and uint32. +

+Referenced by NL3D::CPSLocated::bind(), and NL3D::CParticleSystem::unregisterLocatedBindableExternID(). +

+

00964 { return _ExternID; }
+
+

+ + + + +
+ + + + + + + + + + +
const CFontGenerator* NL3D::CPSLocatedBindable::getFontGenerator void   )  const [inline]
+
+ + + + + +
+   + + +

+Shortcut to get the font generator if one was set (const version). +

+ +

+Definition at line 904 of file ps_located.h. +

+References NL3D::CParticleSystemProcess::getFontGenerator(), and nlassert. +

+

00905          {
+00906                 nlassert(_Owner);
+00907                 return _Owner->getFontGenerator();
+00908          }
+
+

+ + + + +
+ + + + + + + + + + +
CFontGenerator* NL3D::CPSLocatedBindable::getFontGenerator void   )  [inline]
+
+ + + + + +
+   + + +

+Shortcut to get the font generator if one was set. +

+ +

+Definition at line 897 of file ps_located.h. +

+References NL3D::CParticleSystemProcess::getFontGenerator(), and nlassert. +

+Referenced by NL3D::CPSZoneRectangle::show(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZonePlane::show(), NL3D::CPSCylindricVortex::show(), NL3D::CPSGravity::show(), and NL3D::CPSEmitterRectangle::showTool(). +

+

00898          {
+00899                 nlassert(_Owner);
+00900                 return _Owner->getFontGenerator();
+00901          }
+
+

+ + + + +
+ + + + + + + + + + +
const CFontManager * NL3D::CPSLocatedBindable::getFontManager void   )  const
+
+ + + + + +
+   + + +

+Shortcut to get the font manager if one was set (const version). +

+ +

+Definition at line 2099 of file ps_located.cpp. +

+References NL3D::CParticleSystemProcess::getFontManager(), and nlassert. +

+

02100 {
+02101         nlassert(_Owner);
+02102         return _Owner->getFontManager();
+02103 }
+
+

+ + + + +
+ + + + + + + + + + +
CFontManager * NL3D::CPSLocatedBindable::getFontManager void   ) 
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+ +

+Definition at line 2091 of file ps_located.cpp. +

+References NL3D::CParticleSystemProcess::getFontManager(), and nlassert. +

+Referenced by NL3D::CPSZoneRectangle::show(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZonePlane::show(), NL3D::CPSCylindricVortex::show(), NL3D::CPSGravity::show(), and NL3D::CPSEmitterRectangle::showTool(). +

+

02092 {
+02093         nlassert(_Owner);
+02094         return _Owner->getFontManager();
+02095 }
+
+

+ + + + +
+ + + + + + + + + + +
const NLMISC::CMatrix & NL3D::CPSLocatedBindable::getInvertedSysMat void   )  const
+
+ + + + + +
+   + + +

+shortcut to get the inverted matrix of the system +

+ +

+Definition at line 2116 of file ps_located.cpp. +

+References NL3D::CParticleSystem::getInvertedSysMat(), NL3D::CParticleSystemProcess::getOwner(), and nlassert. +

+

02117 {
+02118         nlassert(_Owner);
+02119                 return _Owner->getOwner()->getInvertedSysMat();
+02120 
+02121 }
+
+

+ + + + +
+ + + + + + + + + + +
const NLMISC::CMatrix & NL3D::CPSLocatedBindable::getInvertedViewMat void   )  const
+
+ + + + + +
+   + + +

+shortcut to get the inverted view matrix +

+ +

+Definition at line 2134 of file ps_located.cpp. +

+References NL3D::CParticleSystem::getInvertedViewMat(), NL3D::CParticleSystemProcess::getOwner(), and nlassert. +

+

02135 {
+02136         nlassert(_Owner);
+02137         return _Owner->getOwner()->getInvertedViewMat();        
+02138 }       
+
+

+ + + + +
+ + + + + + + + + +
const NLMISC::CMatrix & NL3D::CPSLocatedBindable::getLocalToWorldMatrix  )  const [inline]
+
+ + + + + +
+   + + +

+Shortcut to get the local to world matrix. +

+ +

+Definition at line 1144 of file ps_located.h. +

+References NL3D::CPSLocated::getLocalToWorldMatrix(), and nlassert. +

+Referenced by NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSSound::newElement(), NL3D::CPSZoneRectangle::show(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZonePlane::show(), NL3D::CPSLight::show(), NL3D::CPSGravity::show(), NL3D::CPSEmitterRectangle::showTool(), NL3D::CPSLight::step(), and NL3D::CPSMesh::updatePos(). +

+

01145 {
+01146         nlassert(_Owner);
+01147         return _Owner->getLocalToWorldMatrix();
+01148 }
+
+

+ + + + +
+ + + + + + + + + + +
TPSLod NL3D::CPSLocatedBindable::getLOD void   )  const [inline]
+
+ + + + + +
+   + + +

+get the valid lods for that object +

+ +

+Definition at line 954 of file ps_located.h. +

+References _LOD, and NL3D::TPSLod. +

+

00954 { return _LOD; }
+
+

+ + + + +
+ + + + + + + + + + +
std::string NL3D::CPSLocatedBindable::getName void   )  const [inline]
+
+ + + + + +
+   + + +

+get the located bindable name (edition purpose) +

+ +

+Definition at line 948 of file ps_located.h. +

+

00948 { return _Name; }       
+
+

+ + + + +
+ + + + + + + + + + +
const CPSLocated* NL3D::CPSLocatedBindable::getOwner void   )  const [inline]
+
+ + + + + +
+   + + +

+get the located that owns this bindable (const version) +

+ +

+Definition at line 944 of file ps_located.h. +

+

00944 { return _Owner; }              
+
+

+ + + + +
+ + + + + + + + + + +
CPSLocated* NL3D::CPSLocatedBindable::getOwner void   )  [inline]
+
+ + + + + +
+   + + +

+get the located that owns this bindable +

+ +

+Definition at line 942 of file ps_located.h. +

+Referenced by NL3D::CPSLocated::deleteElement(), NL3D::CParticleSystemInstanceUser::emit(), NL3D::CPSFaceLookAt::CSecondSize::getSizeOwner(), NL3D::CPSSound::newElement(), NL3D::CPSLocated::registerIntegrableForce(), NL3D::CParticleSystem::registerLocatedBindableExternID(), NL3D::CParticleSystemInstanceUser::removeByID(), NL3D::CPSSound::resize(), NL3D::CPSLight::resize(), NL3D::CPSSound::step(), NL3D::CPSLocated::unregisterIntegrableForce(), and NL3D::CParticleSystem::unregisterLocatedBindableExternID(). +

+

00942 { return _Owner; }
+
+

+ + + + +
+ + + + + + + + + + +
virtual uint32 NL3D::CPSLocatedBindable::getPriority void   )  const [pure virtual]
+
+ + + + + +
+   + + +

+Get the priority of the bindable The more high it is, the earlier it is dealt with +

+Implemented in NL3D::CPSEmitter, NL3D::CPSForce, NL3D::CPSLight, NL3D::CPSParticle, NL3D::CPSSound, and NL3D::CPSZone. +

+Referenced by NL3D::operator<().

+

+ + + + +
+ + + + + + + + + + +
const NLMISC::CMatrix & NL3D::CPSLocatedBindable::getSysMat void   )  const
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+ +

+Definition at line 2108 of file ps_located.cpp. +

+References NL3D::CParticleSystemProcess::getOwner(), NL3D::CParticleSystem::getSysMat(), and nlassert. +

+

02109 {
+02110         nlassert(_Owner);               
+02111         return _Owner->getOwner()->getSysMat();
+02112 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual uint32 NL3D::CPSLocatedBindable::getType void   )  const [pure virtual]
+
+ + + + + +
+   + + +

+Gives the type for this bindable. types are encoded as constant uint32 +

+Implemented in NL3D::CPSEmitter, NL3D::CPSForce, NL3D::CPSLight, NL3D::CPSParticle, NL3D::CPSSound, and NL3D::CPSZone. +

+Referenced by NL3D::CParticleSystem::activateEmitters(), NL3D::CPSLocated::deleteElement(), NL3D::CParticleSystemInstanceUser::emit(), NL3D::CParticleSystem::evalDuration(), NL3D::CParticleSystem::getCurrNumParticles(), NL3D::CParticleSystem::getMaxNumParticles(), NL3D::CParticleSystem::hasActiveEmitters(), NL3D::CParticleSystem::hasEmittersTemplates(), NL3D::CParticleSystem::hasLightableObjects(), NL3D::CParticleSystem::hasOpaqueObjects(), NL3D::CParticleSystem::hasTransparentObjects(), NL3D::CParticleSystem::reactivateSound(), and NL3D::CParticleSystem::stopSound().

+

+ + + + +
+ + + + + + + + + +
virtual bool NL3D::CPSLocatedBindable::getUserMatrixUsageCount  )  const [inline, virtual]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CPSEmitter. +

+Definition at line 974 of file ps_located.h. +

+Referenced by finalize(), and setOwner(). +

+

00974 { return 0; }
+
+

+ + + + +
+ + + + + + + + + + +
const NLMISC::CMatrix & NL3D::CPSLocatedBindable::getViewMat void   )  const
+
+ + + + + +
+   + + +

+shortcut to get the view matrix +

+ +

+Definition at line 2125 of file ps_located.cpp. +

+References NL3D::CParticleSystemProcess::getOwner(), NL3D::CParticleSystem::getViewMat(), and nlassert. +

+Referenced by NL3D::CPSRibbonLookAt::displayRibbons(), and NL3D::CPSFaceLookAtHelper::drawLookAt(). +

+

02126 {
+02127         nlassert(_Owner);
+02128         return _Owner->getOwner()->getViewMat();        
+02129 }       
+
+

+ + + + +
+ + + + + + + + + + +
virtual bool NL3D::CPSLocatedBindable::hasEmitters void   )  const [inline, virtual]
+
+ + + + + +
+   + + +

+tells wether there are alive emitters +

+ +

+Definition at line 958 of file ps_located.h. +

+

00958 { return false; }
+
+

+ + + + +
+ + + + + + + + + + +
virtual bool NL3D::CPSLocatedBindable::hasParticles void   )  const [inline, virtual]
+
+ + + + + +
+   + + +

+tells wether there are alive entities / particles +

+ +

+Reimplemented in NL3D::CPSParticle. +

+Definition at line 956 of file ps_located.h. +

+

00956 { return false; }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CPSLocatedBindable::isActive  )  const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 844 of file ps_located.h. +

+References _Active. +

+Referenced by NL3D::CParticleSystem::hasActiveEmitters(). +

+

00844 { return _Active; }                             
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::motionTypeChanged bool  parametric  )  [inline, virtual]
+
+ + + + + +
+   + + +

+called when a located has switch between incrmental / parametric motion. The default does nothing +

+ +

+Reimplemented in NL3D::CPSRibbonBase. +

+Definition at line 971 of file ps_located.h. +

+Referenced by NL3D::CPSLocated::bind(). +

+

00971 {}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::newElement CPSLocated emitterLocated,
uint32  emitterIndex
[protected, pure virtual]
+
+ + + + + +
+   + + +

+Generate a new element for this bindable. They are generated according to the propertie of the class +

+Implemented in NL3D::CPSDot, NL3D::CPSEmitter, NL3D::CPSEmitterDirectionnal, NL3D::CPSEmitterOmni, NL3D::CPSEmitterRectangle, NL3D::CPSSphericalEmitter, NL3D::CPSFace, NL3D::CPSFaceLookAt, NL3D::CPSFanLight, NL3D::CPSForce, NL3D::CPSForceIntensityHelper, NL3D::CIsotropicForceT< T >, NL3D::CPSFluidFriction, NL3D::CPSBrownianForce, NL3D::CPSTurbul, NL3D::CPSCylindricVortex, NL3D::CPSLight, NL3D::CPSMesh, NL3D::CPSConstraintMesh, NL3D::CPSParticle, NL3D::CPSQuad, NL3D::CPSRibbon, NL3D::CPSRibbonBase, NL3D::CPSRibbonLookAt, NL3D::CPSShockWave, NL3D::CPSSound, NL3D::CPSTailDot, NL3D::CPSZonePlane, NL3D::CPSZoneSphere, NL3D::CPSZoneDisc, NL3D::CPSZoneCylinder, NL3D::CPSZoneRectangle, NL3D::CIsotropicForceT< CPSTurbulForceFunc >, and NL3D::CIsotropicForceT< CPSFluidFrictionFunctor >. +

+Referenced by NL3D::CPSLocated::bind().

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::notifyTargetRemoved CPSLocated ptr  )  [virtual]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+Can be used by located bindable that have located as targets (emitter, collision zone, forces) to be notified that one of their target has been removed. To do this : The object that focus the target must call registerDTorObserver on the target, with himself as a parameter When the target is removed, this target will call this method for all registered CPSLocated The default behaviour remove this object as an observer

+

See also:
CPSLocated::registerDTorObserver()
+ +

+Reimplemented in NL3D::CPSEmitter, and NL3D::CPSTargetLocatedBindable. +

+Definition at line 1996 of file ps_located.cpp. +

+References NL3D::CPSLocated::unregisterDtorObserver(). +

+Referenced by NL3D::CPSLocated::releaseRefTo(). +

+

01997 {
+01998         ptr->unregisterDtorObserver(this);
+01999 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CPSLocatedBindable::releaseAllRef  )  [virtual]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+Release any reference this obj may have to other process of the system For example, this is used when detaching a located bindable from a system. +

+Reimplemented in NL3D::CPSEmitter, NL3D::CPSLight, NL3D::CPSTargetLocatedBindable, and NL3D::CPSMesh. +

+Definition at line 2170 of file ps_located.cpp. +

+Referenced by setOwner(). +

+

02171 {
+02172 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::releaseRefTo const CParticleSystemProcess other  )  [inline, virtual]
+
+ + + + + +
+   + + +

+Release any reference this obj may have on the given process. For example, this is used when detaching a located bindable from a system. +

+Reimplemented in NL3D::CPSEmitter, and NL3D::CPSTargetLocatedBindable. +

+Definition at line 871 of file ps_located.h. +

+

00871 {}
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::resize uint32  size  )  [protected, pure virtual]
+
+ + + + + +
+   + + +

+Resize the bindable attributes containers should not be called directly. Call CPSLocated::resize instead +

+Implemented in NL3D::CPSDot, NL3D::CPSEmitter, NL3D::CPSEmitterDirectionnal, NL3D::CPSEmitterOmni, NL3D::CPSEmitterRectangle, NL3D::CPSSphericalEmitter, NL3D::CPSFace, NL3D::CPSFaceLookAt, NL3D::CPSFanLight, NL3D::CPSForce, NL3D::CPSForceIntensityHelper, NL3D::CIsotropicForceT< T >, NL3D::CPSFluidFriction, NL3D::CPSBrownianForce, NL3D::CPSTurbul, NL3D::CPSCylindricVortex, NL3D::CPSLight, NL3D::CPSMesh, NL3D::CPSConstraintMesh, NL3D::CPSParticle, NL3D::CPSQuad, NL3D::CPSRibbon, NL3D::CPSRibbonBase, NL3D::CPSRibbonLookAt, NL3D::CPSShockWave, NL3D::CPSSound, NL3D::CPSTailDot, NL3D::CPSZonePlane, NL3D::CPSZoneSphere, NL3D::CPSZoneDisc, NL3D::CPSZoneCylinder, NL3D::CPSZoneRectangle, NL3D::CIsotropicForceT< CPSTurbulForceFunc >, and NL3D::CIsotropicForceT< CPSFluidFrictionFunctor >. +

+Referenced by NL3D::CPSLocated::bind().

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::serial NLMISC::IStream f  )  throw (NLMISC::EStream) [virtual]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+ +

+Implements NLMISC::IStreamable. +

+Reimplemented in NL3D::CPSDot, NL3D::CPSEmitter, NL3D::CPSEmitterDirectionnal, NL3D::CPSRadialEmitter, NL3D::CPSEmitterOmni, NL3D::CPSEmitterRectangle, NL3D::CPSEmitterConic, NL3D::CPSSphericalEmitter, NL3D::CPSFace, NL3D::CPSFaceLookAt, NL3D::CPSFanLight, NL3D::CPSForce, NL3D::CPSForceIntensityHelper, NL3D::CIsotropicForceT< T >, NL3D::CPSDirectionnalForce, NL3D::CPSGravity, NL3D::CPSCentralGravity, NL3D::CPSSpring, NL3D::CPSCylindricVortex, NL3D::CPSMagneticForce, NL3D::CPSLight, NL3D::CPSTargetLocatedBindable, NL3D::CPSMesh, NL3D::CPSConstraintMesh, NL3D::CPSParticle, NL3D::CPSQuad, NL3D::CPSRibbon, NL3D::CPSRibbonBase, NL3D::CPSRibbonLookAt, NL3D::CPSShockWave, NL3D::CPSSound, NL3D::CPSTailDot, NL3D::CPSZone, NL3D::CPSZonePlane, NL3D::CPSZoneSphere, NL3D::CPSZoneDisc, NL3D::CPSZoneCylinder, NL3D::CPSZoneRectangle, NL3D::CIsotropicForceT< CPSTurbulForceFunc >, and NL3D::CIsotropicForceT< CPSFluidFrictionFunctor >. +

+Definition at line 2002 of file ps_located.cpp. +

+References len, sint, sint32, and uint32. +

+

02003 {
+02004         sint ver = f.serialVersion(4);  
+02005         f.serialPtr(_Owner);    
+02006         if (ver > 1) f.serialEnum(_LOD);
+02007         if (ver > 2) 
+02008         {
+02009                 if (f.isReading() && !CParticleSystem::getSerializeIdentifierFlag())
+02010                 {
+02011                         // just skip the name
+02012                         sint32 len;
+02013                         f.serial(len);
+02014                         f.seek(len, NLMISC::IStream::current);
+02015                 }
+02016                 else
+02017                 {       
+02018                         f.serial(_Name);
+02019                 }
+02020         }
+02021         if (ver > 3) 
+02022         {
+02023                 if (f.isReading())
+02024                 {
+02025                         uint32 id;
+02026                         f.serial(id);
+02027                         setExternID(id);
+02028                 }
+02029                 else
+02030                 {
+02031                         f.serial(_ExternID);
+02032                 }
+02033         }
+02034         
+02035 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::setActive bool  active  )  [inline]
+
+ + + + + +
+   + + +

+Activate / Deactivate this object. When not active, the owning system won't try to call the 'step' method. +

+ +

+Definition at line 843 of file ps_located.h. +

+References _Active. +

+Referenced by NL3D::CParticleSystem::activateEmitters(), and NL3D::CParticleSystemInstanceUser::setActive(). +

+

00843 { _Active = active; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::setExternID uint32  id  ) 
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+set the extern ID of this located bindable. 0 means no extern access. The map of ID-locatedBindable. Is in th particle system, so this located bindable must have been attached to a particle system, otherwise an assertion is raised +

+Definition at line 2149 of file ps_located.cpp. +

+References _ExternID, NL3D::CParticleSystemProcess::getOwner(), NL3D::CParticleSystem::registerLocatedBindableExternID(), uint32, and NL3D::CParticleSystem::unregisterLocatedBindableExternID(). +

+

02150 {
+02151         if (id == _ExternID) return;
+02152         CParticleSystem *ps = NULL;
+02153         if (_Owner && _Owner->getOwner())
+02154         {
+02155                 ps = _Owner->getOwner();
+02156         }       
+02157         if (ps) 
+02158         {
+02159                 ps->unregisterLocatedBindableExternID(this);
+02160                 _ExternID = 0;          
+02161         }
+02162         if (id != 0)
+02163         {       
+02164                 if (ps) ps->registerLocatedBindableExternID(id, this);
+02165                 _ExternID = id;
+02166         }       
+02167 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::setLOD TPSLod  lod  )  [inline]
+
+ + + + + +
+   + + +

+set the LODs that apply to that object (warning : it is based on the position of the system, and don't act on a per instance basis ...) To have per instance precision, you must use an attribute maker that has LOD as its input +

+Definition at line 952 of file ps_located.h. +

+References _LOD. +

+

00952 { _LOD = lod; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::setName const std::string &  name  )  [inline]
+
+ + + + + +
+   + + +

+set the located bindable name (edition purpose) +

+ +

+Definition at line 946 of file ps_located.h. +

+

00946 { _Name = name; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::setOwner CPSLocated psl  )  [protected, virtual]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+ +

+Reimplemented in NL3D::CPSEmitter. +

+Definition at line 1948 of file ps_located.cpp. +

+References NL3D::CParticleSystem::addRefForUserSysCoordInfo(), deleteElement(), NL3D::CParticleSystemProcess::getOwner(), NL3D::CPSLocated::getSize(), getUserMatrixUsageCount(), releaseAllRef(), NL3D::CParticleSystem::releaseRefForUserSysCoordInfo(), and uint. +

+Referenced by NL3D::CPSLocated::bind(), and NL3D::CPSLocated::unbind(). +

+

01949 { 
+01950         if (psl == _Owner) return;
+01951         if (psl == NULL)
+01952         {
+01953                 releaseAllRef();
+01954                 if (_Owner)
+01955                 {
+01956                         // empty this located bindable. Need to be empty if it must be rebound to another located.
+01957                         for (uint k = 0; k < _Owner->getSize(); ++k)
+01958                         {
+01959                                 deleteElement(0);
+01960                         }
+01961                 }                               
+01962         }       
+01963         if (_Owner && _Owner->getOwner())
+01964         {
+01965                 _Owner->getOwner()->releaseRefForUserSysCoordInfo(getUserMatrixUsageCount());
+01966         }
+01967         _Owner = psl;
+01968         if (_Owner && _Owner->getOwner())
+01969         {
+01970                 _Owner->getOwner()->addRefForUserSysCoordInfo(getUserMatrixUsageCount());
+01971         } 
+01972 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::setupDriverModelMatrix void   ) 
+
+ + + + + +
+   + + +

+shortcut to setup the model matrix (system basis or world basis) +

+ +

+Definition at line 2142 of file ps_located.cpp. +

+References nlassert, and NL3D::CPSLocated::setupDriverModelMatrix(). +

+Referenced by displayIcon2d(), NL3D::CPSTailDot::displayRibbons(), NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSRibbon::displayRibbons(), NL3D::CPSDot::draw(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), NL3D::CPSZoneRectangle::show(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZoneSphere::show(), NL3D::CPSZonePlane::show(), NL3D::CPSCylindricVortex::show(), NL3D::CPSDirectionnalForce::show(), NL3D::CPSSphericalEmitter::showTool(), NL3D::CPSEmitterRectangle::showTool(), and NL3D::CPSEmitter::showTool(). +

+

02143 {
+02144         nlassert(_Owner);
+02145         _Owner->setupDriverModelMatrix();
+02146 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::setZBias float  value  )  [inline, virtual]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CPSDot, NL3D::CPSFanLight, NL3D::CPSMesh, NL3D::CPSConstraintMesh, NL3D::CPSParticle, NL3D::CPSQuad, NL3D::CPSRibbon, NL3D::CPSRibbonLookAt, NL3D::CPSShockWave, and NL3D::CPSTailDot. +

+Definition at line 980 of file ps_located.h. +

+References value. +

+

00980 {}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::step TPSProcessPass  pass,
TAnimationTime  ellapsedTime,
TAnimationTime  realEt
[pure virtual]
+
+ + + + + +
+   + + +

+process one pass for this bindable +

+ +

+Implemented in NL3D::CPSEmitter, NL3D::CPSFace, NL3D::CPSForce, NL3D::CPSLight, NL3D::CPSMesh, NL3D::CPSConstraintMesh, NL3D::CPSParticle, NL3D::CPSRibbon, NL3D::CPSRibbonLookAt, NL3D::CPSSound, NL3D::CPSTailDot, and NL3D::CPSZone.

+

+ + + + +
+ + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::systemDateChanged  )  [inline, virtual]
+
+ + + + + +
+   + + +

+PRIVATE USE : called by the system when its date has been manually changed. This his usually for object that expect time to be always increasing, so that they can reset their datas +

+Reimplemented in NL3D::CPSRibbonBase. +

+Definition at line 1038 of file ps_located.h. +

+

01038 {}
+
+


Friends And Related Function Documentation

+

+ + + + +
+ + +
friend class CPSLocated [friend] +
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CPSForce. +

+Definition at line 986 of file ps_located.h.

+


Field Documentation

+

+ + + + +
+ + +
bool NL3D::CPSLocatedBindable::_Active [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 1033 of file ps_located.h. +

+Referenced by isActive(), and setActive().

+

+ + + + +
+ + +
uint32 NL3D::CPSLocatedBindable::_ExternID [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 1027 of file ps_located.h. +

+Referenced by getExternID(), setExternID(), and ~CPSLocatedBindable().

+

+ + + + +
+ + +
TPSLod NL3D::CPSLocatedBindable::_LOD [protected] +
+
+ + + + + +
+   + + +

+tells when this object must be dealt with +

+ +

+Definition at line 1029 of file ps_located.h. +

+Referenced by getLOD(), and setLOD().

+

+ + + + +
+ + +
std::string NL3D::CPSLocatedBindable::_Name [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 1031 of file ps_located.h.

+

+ + + + +
+ + +
CPSLocated* NL3D::CPSLocatedBindable::_Owner [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 1026 of file ps_located.h. +

+Referenced by NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSConstraintMeshHelper::drawMeshs(), and NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs().

+


The documentation for this class was generated from the following files: +
Generated on Tue Mar 16 07:17:25 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1