# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CPSFanLight Class Reference

A fan light particle. More...

#include <ps_fan_light.h>

Inheritance diagram for NL3D::CPSFanLight:

NL3D::CPSParticle NL3D::CPSColoredParticle NL3D::CPSSizedParticle NL3D::CPSRotated2DParticle NL3D::CPSMaterial NL3D::CPSTexturedParticleNoAnim NL3D::CPSLocatedBindable NLMISC::IStreamable NLMISC::IClassable List of all members.

Public Methods

 NLMISC_DECLARE_CLASS (CPSFanLight)
virtual bool completeBBox (NLMISC::CAABBox &box) const
 ====================================================================================. More...

void setNbFans (uint32 nbFans)
 ====================================================================================. More...

void setPhaseSmoothness (uint32 smoothNess)
 Set the smoothness of phases. More...

uint32 getPhaseSmoothness (void) const
 retrieve the phase smoothness. More...

void setMoveIntensity (float intensity)
 set the intensity of fan movement. Default is 1.5. More...

float getMoveIntensity (void) const
 get the intensity of fans movement. More...

uint32 getNbFans (void) const
void setPhaseSpeed (float multiplier)
 ====================================================================================. More...

float getPhaseSpeed (void) const
 get the speed for phase. More...

virtual void updateMatAndVbForColor (void)
 ====================================================================================. More...

virtual bool hasTransparentFaces (void)
 ====================================================================================. More...

virtual bool hasOpaqueFaces (void)
 ====================================================================================. More...

virtual uint32 getMaxNumFaces (void) const
 ====================================================================================. More...

void setTexture (CSmartPtr< ITexture > tex)
 Set a texture. NULL remove it. More...

ITexturegetTexture (void)
 get the texture used. More...

const ITexturegetTexture (void) const
Object
 CPSFanLight (uint32 nbFans=7)
 ====================================================================================. More...

 ~CPSFanLight ()
 ====================================================================================. More...

void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 ====================================================================================. More...


Static Public Methods

void initFanLightPrecalc (void)
 ====================================================================================. More...


Protected Methods

void newElement (CPSLocated *emitterLocated, uint32 emitterIndex)
 ====================================================================================. More...

void deleteElement (uint32)
 ====================================================================================. More...

virtual void resize (uint32 size)
 ====================================================================================. More...

virtual CPSLocatedgetColorOwner (void)
 deriver must return their owner there. More...

virtual CPSLocatedgetSizeOwner (void)
 deriver must return their owner there. More...

virtual CPSLocatedgetAngle2DOwner (void)
 deriver must return their owner there. More...


Private Types

typedef std::hash_map< uint,
CVertexBuffer
TVBMap
typedef std::vector< uint32TIndexBuffer
typedef std::hash_map< uint,
TIndexBuffer
TIBMap

Private Methods

virtual void init (void)
 ====================================================================================. More...

virtual void draw (bool opaque)
 ====================================================================================. More...

void getVBnIB (CVertexBuffer *&vb, TIndexBuffer *&ib)
 ====================================================================================. More...

uint getNumFanlightsInVB () const
 ====================================================================================. More...

void setupMaterial ()
 ====================================================================================. More...

void touch ()

Private Attributes

uint32 _NbFans
uint32 _PhaseSmoothness
float _MoveIntensity
NLMISC::CSmartPtr< ITexture_Tex
float _PhaseSpeed
bool _Touched: 1
bool _UseGlobalColor: 1

Static Private Attributes

uint8 _RandomPhaseTab [32][128]
TVBMap _VBMap
TVBMap _TexVBMap
TVBMap _ColoredVBMap
TVBMap _ColoredTexVBMap
TIBMap _IBMap
bool _RandomPhaseTabInitialized = false

Friends

class CPSFanLightHelper

Detailed Description

A fan light particle.

Definition at line 46 of file ps_fan_light.h.


Member Typedef Documentation

typedef std::hash_map<uint, TIndexBuffer > NL3D::CPSFanLight::TIBMap [private]
 

Definition at line 143 of file ps_fan_light.h.

typedef std::vector<uint32> NL3D::CPSFanLight::TIndexBuffer [private]
 

Definition at line 142 of file ps_fan_light.h.

Referenced by getVBnIB.

typedef std::hash_map<uint, CVertexBuffer> NL3D::CPSFanLight::TVBMap [private]
 

Definition at line 141 of file ps_fan_light.h.

Referenced by getVBnIB.


Constructor & Destructor Documentation

NL3D::CPSFanLight::CPSFanLight uint32    nbFans = 7
 

====================================================================================.

Definition at line 408 of file ps_fan_light.cpp.

References NL3D::CPSLocatedBindable::_Name, init, and nlassert.

NL3D::CPSFanLight::~CPSFanLight  
 

====================================================================================.

Definition at line 426 of file ps_fan_light.cpp.


Member Function Documentation

bool NL3D::CPSFanLight::completeBBox NLMISC::CAABBox   box const [virtual]
 

====================================================================================.

Reimplemented from NL3D::CPSLocatedBindable.

Definition at line 400 of file ps_fan_light.cpp.

void NL3D::CPSFanLight::deleteElement uint32    [protected, virtual]
 

====================================================================================.

Implements NL3D::CPSParticle.

Definition at line 272 of file ps_fan_light.cpp.

References NL3D::CPSRotated2DParticle::deleteAngle2DElement, NL3D::CPSColoredParticle::deleteColorElement, NL3D::CPSSizedParticle::deleteSizeElement, and index.

void NL3D::CPSFanLight::draw bool    opaque [private, virtual]
 

====================================================================================.

Reimplemented from NL3D::CPSParticle.

Definition at line 342 of file ps_fan_light.cpp.

References NL3D::CPSLocatedBindable::_Owner, NL3D::CPSParticle::computeSrcStep, setupMaterial, NL3D::CPSParticle::step, NL3D::TIteratorTimeStep1616, and NL3D::TIteratorVectStep1616.

virtual CPSLocated* NL3D::CPSFanLight::getAngle2DOwner void    [inline, protected, virtual]
 

deriver must return their owner there.

Implements NL3D::CPSRotated2DParticle.

Definition at line 138 of file ps_fan_light.h.

References NL3D::CPSLocatedBindable::_Owner, and NL3D::CPSLocatedBindable::CPSLocated.

virtual CPSLocated* NL3D::CPSFanLight::getColorOwner void    [inline, protected, virtual]
 

deriver must return their owner there.

Implements NL3D::CPSColoredParticle.

Definition at line 136 of file ps_fan_light.h.

References NL3D::CPSLocatedBindable::_Owner, and NL3D::CPSLocatedBindable::CPSLocated.

uint32 NL3D::CPSFanLight::getMaxNumFaces void    const [virtual]
 

====================================================================================.

Implements NL3D::CPSParticle.

Definition at line 245 of file ps_fan_light.cpp.

References _NbFans, NL3D::CPSLocatedBindable::_Owner, and nlassert.

float NL3D::CPSFanLight::getMoveIntensity void    const [inline]
 

get the intensity of fans movement.

Definition at line 82 of file ps_fan_light.h.

References _MoveIntensity.

uint32 NL3D::CPSFanLight::getNbFans void    const [inline]
 

Definition at line 85 of file ps_fan_light.h.

References _NbFans.

uint NL3D::CPSFanLight::getNumFanlightsInVB   const [private]
 

====================================================================================.

Definition at line 546 of file ps_fan_light.cpp.

References _NbFans.

Referenced by getVBnIB.

uint32 NL3D::CPSFanLight::getPhaseSmoothness void    const [inline]
 

retrieve the phase smoothness.

Definition at line 76 of file ps_fan_light.h.

References _PhaseSmoothness.

float NL3D::CPSFanLight::getPhaseSpeed void    const [inline]
 

get the speed for phase.

Definition at line 97 of file ps_fan_light.h.

References _PhaseSpeed.

virtual CPSLocated* NL3D::CPSFanLight::getSizeOwner void    [inline, protected, virtual]
 

deriver must return their owner there.

Implements NL3D::CPSSizedParticle.

Definition at line 137 of file ps_fan_light.h.

References NL3D::CPSLocatedBindable::_Owner, and NL3D::CPSLocatedBindable::CPSLocated.

const ITexture* NL3D::CPSFanLight::getTexture void    const [inline, virtual]
 

Implements NL3D::CPSTexturedParticleNoAnim.

Definition at line 128 of file ps_fan_light.h.

References _Tex.

ITexture* NL3D::CPSFanLight::getTexture void    [inline, virtual]
 

get the texture used.

Implements NL3D::CPSTexturedParticleNoAnim.

Definition at line 124 of file ps_fan_light.h.

References _Tex.

void NL3D::CPSFanLight::getVBnIB CVertexBuffer *&    vb,
TIndexBuffer *&    ib
[private]
 

====================================================================================.

Definition at line 469 of file ps_fan_light.cpp.

References _ColoredTexVBMap, _ColoredVBMap, NL3D::CPSColoredParticle::_ColorScheme, _IBMap, _NbFans, _Tex, _TexVBMap, _VBMap, getNumFanlightsInVB, NLAISCRIPT::l, nlassert, TIndexBuffer, and TVBMap.

bool NL3D::CPSFanLight::hasOpaqueFaces void    [virtual]
 

====================================================================================.

Implements NL3D::CPSParticle.

Definition at line 258 of file ps_fan_light.cpp.

References hasTransparentFaces.

bool NL3D::CPSFanLight::hasTransparentFaces void    [virtual]
 

====================================================================================.

Implements NL3D::CPSParticle.

Definition at line 252 of file ps_fan_light.cpp.

References NL3D::CPSMaterial::getBlendingMode.

Referenced by hasOpaqueFaces.

void NL3D::CPSFanLight::init void    [private, virtual]
 

====================================================================================.

Definition at line 452 of file ps_fan_light.cpp.

References NL3D::CPSMaterial::_Mat, updateMatAndVbForColor, and NLMISC::CRGBA::White.

Referenced by CPSFanLight.

void NL3D::CPSFanLight::initFanLightPrecalc void    [static]
 

====================================================================================.

Definition at line 214 of file ps_fan_light.cpp.

References _RandomPhaseTab, _RandomPhaseTabInitialized, NL3D::BlurBytesTab, and NLAISCRIPT::l.

void NL3D::CPSFanLight::newElement CPSLocated   emitterLocated,
uint32    emitterIndex
[protected, virtual]
 

====================================================================================.

Implements NL3D::CPSParticle.

Definition at line 264 of file ps_fan_light.cpp.

References NL3D::CPSRotated2DParticle::newAngle2DElement, NL3D::CPSColoredParticle::newColorElement, and NL3D::CPSSizedParticle::newSizeElement.

NL3D::CPSFanLight::NLMISC_DECLARE_CLASS CPSFanLight   
 

void NL3D::CPSFanLight::resize uint32    size [protected, virtual]
 

====================================================================================.

Implements NL3D::CPSParticle.

Definition at line 442 of file ps_fan_light.cpp.

References nlassert, NL3D::CPSRotated2DParticle::resizeAngle2D, NL3D::CPSColoredParticle::resizeColor, and NL3D::CPSSizedParticle::resizeSize.

Referenced by setNbFans.

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

====================================================================================.

Reimplemented from NL3D::CPSParticle.

Definition at line 377 of file ps_fan_light.cpp.

void NL3D::CPSFanLight::setMoveIntensity float    intensity [inline]
 

set the intensity of fan movement. Default is 1.5.

Definition at line 79 of file ps_fan_light.h.

References _MoveIntensity.

void NL3D::CPSFanLight::setNbFans uint32    nbFans
 

====================================================================================.

Definition at line 432 of file ps_fan_light.cpp.

References _NbFans, NL3D::CPSLocatedBindable::_Owner, NL3D::CPSParticle::notifyOwnerMaxNumFacesChanged, and resize.

void NL3D::CPSFanLight::setPhaseSmoothness uint32    smoothNess [inline]
 

Set the smoothness of phases.

The default is 0 which means no smoothness. n mean that the phase will be linearly interpolated between each n + 1 fans It ranges from 0 to 31

Definition at line 69 of file ps_fan_light.h.

References _PhaseSmoothness, and nlassert.

void NL3D::CPSFanLight::setPhaseSpeed float    multiplier
 

====================================================================================.

Definition at line 280 of file ps_fan_light.cpp.

References _PhaseSpeed.

void NL3D::CPSFanLight::setTexture CSmartPtr< ITexture   tex [inline, virtual]
 

Set a texture. NULL remove it.

Implements NL3D::CPSTexturedParticleNoAnim.

Definition at line 117 of file ps_fan_light.h.

References _Tex, and touch.

void NL3D::CPSFanLight::setupMaterial   [inline, private]
 

====================================================================================.

Definition at line 286 of file ps_fan_light.cpp.

References NL3D::CPSColoredParticle::_Color, NL3D::CPSColoredParticle::_ColorScheme, NL3D::CPSMaterial::_Mat, NL3D::CPSLocatedBindable::_Owner, _Tex, _Touched, _UseGlobalColor, NL3D::CPSMaterial::forceTexturedMaterialStages, NLMISC::CRGBA::modulateFromColor, NL3D::SetupModulatedStage, touch, and NLMISC::CRGBA::White.

Referenced by draw.

void NL3D::CPSFanLight::touch   [inline, private]
 

Definition at line 170 of file ps_fan_light.h.

References _Touched.

Referenced by setTexture, setupMaterial, and updateMatAndVbForColor.

void NL3D::CPSFanLight::updateMatAndVbForColor void    [virtual]
 

====================================================================================.

Implements NL3D::CPSColoredParticle.

Definition at line 463 of file ps_fan_light.cpp.

References touch.

Referenced by init.


Friends And Related Function Documentation

friend class CPSFanLightHelper [friend]
 

Definition at line 140 of file ps_fan_light.h.


Member Data Documentation

CPSFanLight::TVBMap NL3D::CPSFanLight::_ColoredTexVBMap [static, private]
 

Definition at line 53 of file ps_fan_light.cpp.

Referenced by getVBnIB.

CPSFanLight::TVBMap NL3D::CPSFanLight::_ColoredVBMap [static, private]
 

Definition at line 52 of file ps_fan_light.cpp.

Referenced by getVBnIB.

CPSFanLight::TIBMap NL3D::CPSFanLight::_IBMap [static, private]
 

Definition at line 54 of file ps_fan_light.cpp.

Referenced by getVBnIB.

float NL3D::CPSFanLight::_MoveIntensity [private]
 

Definition at line 147 of file ps_fan_light.h.

Referenced by getMoveIntensity, and setMoveIntensity.

uint32 NL3D::CPSFanLight::_NbFans [private]
 

Definition at line 145 of file ps_fan_light.h.

Referenced by getMaxNumFaces, getNbFans, getNumFanlightsInVB, getVBnIB, and setNbFans.

uint32 NL3D::CPSFanLight::_PhaseSmoothness [private]
 

Definition at line 146 of file ps_fan_light.h.

Referenced by getPhaseSmoothness, and setPhaseSmoothness.

float NL3D::CPSFanLight::_PhaseSpeed [private]
 

Definition at line 149 of file ps_fan_light.h.

Referenced by getPhaseSpeed, and setPhaseSpeed.

uint8 NL3D::CPSFanLight::_RandomPhaseTab [static, private]
 

Definition at line 47 of file ps_fan_light.cpp.

Referenced by initFanLightPrecalc.

bool NL3D::CPSFanLight::_RandomPhaseTabInitialized = false [static, private]
 

Definition at line 48 of file ps_fan_light.cpp.

Referenced by initFanLightPrecalc.

NLMISC::CSmartPtr<ITexture> NL3D::CPSFanLight::_Tex [private]
 

Definition at line 148 of file ps_fan_light.h.

Referenced by getTexture, getVBnIB, setTexture, and setupMaterial.

CPSFanLight::TVBMap NL3D::CPSFanLight::_TexVBMap [static, private]
 

Definition at line 51 of file ps_fan_light.cpp.

Referenced by getVBnIB.

bool NL3D::CPSFanLight::_Touched [private]
 

Definition at line 150 of file ps_fan_light.h.

Referenced by setupMaterial, and touch.

bool NL3D::CPSFanLight::_UseGlobalColor [private]
 

Definition at line 151 of file ps_fan_light.h.

Referenced by setupMaterial.

CPSFanLight::TVBMap NL3D::CPSFanLight::_VBMap [static, private]
 

Definition at line 50 of file ps_fan_light.cpp.

Referenced by getVBnIB.


The documentation for this class was generated from the following files: