NL3D::CPSFaceLookAt::CSecondSize Struct Reference

#include <ps_face_look_at.h>

Inheritance diagram for NL3D::CPSFaceLookAt::CSecondSize:

NL3D::CPSSizedParticle

Public Member Functions

float getSize (void) const
 get the constant size

virtual CPSLocatedgetSizeOwner (void)
 deriver must return their owner there

const CPSAttribMaker< float > * getSizeScheme (void) const
 get the size scheme (NULL if none) const version

CPSAttribMaker< float > * getSizeScheme (void)
 get the size scheme (NULL if none)

void serialSizeScheme (NLMISC::IStream &f) throw (NLMISC::EStream)
 serialization. We choose a different name because of multiple-inheritance

void setSize (float size)
 Set a constant size for the particles.

void setSizeScheme (CPSAttribMaker< float > *size)

Data Fields

CPSFaceLookAtOwner

Protected Member Functions

void deleteSizeElement (uint32 index)
void newSizeElement (CPSLocated *emitterLocated, uint32 emitterIndex)
void resizeSize (uint32 size)

Protected Attributes

float _ParticleSize
CPSAttribMaker< float > * _SizeScheme

Member Function Documentation

void NL3D::CPSSizedParticle::deleteSizeElement uint32  index  )  [inline, protected, inherited]
 

Definition at line 295 of file ps_particle_basic.h.

References NL3D::CPSSizedParticle::_SizeScheme, NL3D::CPSAttribMaker< float >::deleteElement(), NL3D::CPSAttribMaker< float >::hasMemory(), index, and uint32.

Referenced by NL3D::CPSShockWave::deleteElement(), NL3D::CPSRibbonLookAt::deleteElement(), NL3D::CPSRibbon::deleteElement(), NL3D::CPSQuad::deleteElement(), NL3D::CPSConstraintMesh::deleteElement(), NL3D::CPSMesh::deleteElement(), and NL3D::CPSFanLight::deleteElement().

00296                 {
00297                         if (_SizeScheme && _SizeScheme->hasMemory()) _SizeScheme->deleteElement(index);
00298                 }

float NL3D::CPSSizedParticle::getSize void   )  const [inline, inherited]
 

get the constant size

Definition at line 274 of file ps_particle_basic.h.

References NL3D::CPSSizedParticle::_ParticleSize.

Referenced by NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSSizedParticle::resizeSize(), and NL3D::CPSSizedParticle::setSizeScheme().

00274 { return _ParticleSize; }

virtual CPSLocated* NL3D::CPSFaceLookAt::CSecondSize::getSizeOwner void   )  [inline, virtual]
 

deriver must return their owner there

Implements NL3D::CPSSizedParticle.

Definition at line 122 of file ps_face_look_at.h.

References NL3D::CPSLocatedBindable::getOwner(), and Owner.

00122 { return Owner->getOwner(); }

const CPSAttribMaker<float>* NL3D::CPSSizedParticle::getSizeScheme void   )  const [inline, inherited]
 

get the size scheme (NULL if none) const version

Definition at line 268 of file ps_particle_basic.h.

References NL3D::CPSSizedParticle::_SizeScheme.

00268 { return _SizeScheme; }

CPSAttribMaker<float>* NL3D::CPSSizedParticle::getSizeScheme void   )  [inline, inherited]
 

get the size scheme (NULL if none)

Definition at line 265 of file ps_particle_basic.h.

References NL3D::CPSSizedParticle::_SizeScheme.

Referenced by NL3D::CPSFaceLookAtHelper::drawLookAt(), and NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion().

00265 { return _SizeScheme; }

void NL3D::CPSSizedParticle::newSizeElement CPSLocated emitterLocated,
uint32  emitterIndex
[inline, protected, inherited]
 

Definition at line 291 of file ps_particle_basic.h.

References NL3D::CPSSizedParticle::_SizeScheme, NL3D::CPSAttribMaker< float >::hasMemory(), NL3D::CPSAttribMaker< float >::newElement(), and uint32.

Referenced by NL3D::CPSShockWave::newElement(), NL3D::CPSRibbonLookAt::newElement(), NL3D::CPSRibbon::newElement(), NL3D::CPSQuad::newElement(), NL3D::CPSConstraintMesh::newElement(), NL3D::CPSMesh::newElement(), and NL3D::CPSFanLight::newElement().

00292                 {
00293                         if (_SizeScheme && _SizeScheme->hasMemory()) _SizeScheme->newElement(emitterLocated, emitterIndex);
00294                 }       

void NL3D::CPSSizedParticle::resizeSize uint32  size  )  [inline, protected, inherited]
 

Definition at line 299 of file ps_particle_basic.h.

References NL3D::CPSSizedParticle::_SizeScheme, NL3D::CPSSizedParticle::getSize(), NL3D::CPSSizedParticle::getSizeOwner(), NL3D::CPSAttribMaker< float >::hasMemory(), nlassert, NL3D::CPSAttribMaker< float >::resize(), size, and uint32.

Referenced by NL3D::CPSShockWave::resize(), NL3D::CPSRibbonLookAt::resize(), NL3D::CPSRibbon::resize(), NL3D::CPSQuad::resize(), NL3D::CPSConstraintMesh::resize(), NL3D::CPSMesh::resize(), and NL3D::CPSFanLight::resize().

00300                 {
00301                         nlassert(size < (1 << 16));
00302                         if (_SizeScheme && _SizeScheme->hasMemory()) _SizeScheme->resize(size, getSizeOwner()->getSize());
00303                 }

void NL3D::CPSSizedParticle::serialSizeScheme NLMISC::IStream f  )  throw (NLMISC::EStream) [inherited]
 

serialization. We choose a different name because of multiple-inheritance

Definition at line 211 of file ps_particle_basic.cpp.

00212 {
00213         f.serialVersion(1);     
00214         if (f.isReading())
00215         {
00216                 if (_SizeScheme)
00217                 {
00218                         delete _SizeScheme;
00219                         _SizeScheme = NULL;
00220                 }
00221         }
00222         bool useSizeScheme = _SizeScheme != NULL;
00223         f.serial(useSizeScheme);
00224         if (useSizeScheme)
00225         {               
00226                 f.serialPolyPtr(_SizeScheme);
00227         }
00228         else
00229         {
00230                 f.serial(_ParticleSize);
00231         }       
00232 };

void NL3D::CPSSizedParticle::setSize float  size  )  [inherited]
 

Set a constant size for the particles.

Definition at line 192 of file ps_particle_basic.cpp.

References NL3D::CPSSizedParticle::_ParticleSize, NL3D::CPSSizedParticle::_SizeScheme, and size.

00193 {       
00194         delete _SizeScheme;
00195         _SizeScheme = NULL;     
00196         _ParticleSize = size;
00197 }

void NL3D::CPSSizedParticle::setSizeScheme CPSAttribMaker< float > *  size  )  [inherited]
 

Set an attribute maker that produce a size It must have been allocated by new It will be deleted by this object

Definition at line 183 of file ps_particle_basic.cpp.

References NL3D::CPSSizedParticle::_SizeScheme, NL3D::CPSSizedParticle::getSize(), NL3D::CPSSizedParticle::getSizeOwner(), nlassert, and size.

00184 {       
00185         nlassert(size != NULL);
00186         delete _SizeScheme;     
00187         _SizeScheme = size;
00188         if (getSizeOwner() && size->hasMemory()) size->resize(getSizeOwner()->getMaxSize(), getSizeOwner()->getSize());
00189 }


Field Documentation

float NL3D::CPSSizedParticle::_ParticleSize [protected, inherited]
 

Definition at line 289 of file ps_particle_basic.h.

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

CPSAttribMaker<float>* NL3D::CPSSizedParticle::_SizeScheme [protected, inherited]
 

Definition at line 290 of file ps_particle_basic.h.

Referenced by NL3D::CPSSizedParticle::deleteSizeElement(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), NL3D::CPSSizedParticle::getSizeScheme(), NL3D::CPSSizedParticle::newSizeElement(), NL3D::CPSSizedParticle::resizeSize(), NL3D::CPSSizedParticle::setSize(), NL3D::CPSSizedParticle::setSizeScheme(), and NL3D::CPSSizedParticle::~CPSSizedParticle().

CPSFaceLookAt* NL3D::CPSFaceLookAt::CSecondSize::Owner
 

Definition at line 121 of file ps_face_look_at.h.

Referenced by NL3D::CPSFaceLookAt::CPSFaceLookAt(), and getSizeOwner().


The documentation for this struct was generated from the following file:
Generated on Tue Mar 16 07:12:21 2004 for NeL by doxygen 1.3.6