# 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::CPSRotated2DParticle Class Reference

this class adds tunable 2D rotation to a particle, it can be used by public multiple inheritance. More...

#include <ps_particle_basic.h>

Inheritance diagram for NL3D::CPSRotated2DParticle:

NL3D::CDummy2DAngle NL3D::CPSFaceLookAt NL3D::CPSFanLight NL3D::CPSMesh NL3D::CPSShockWave List of all members.

Public Methods

void setAngle2DScheme (CPSAttribMaker< float > *scheme)
 ===================================================================================. More...

CPSAttribMaker< float > * getAngle2DScheme (void)
 get the angle 2D scheme (NULL if none). More...

const CPSAttribMaker< float > * getAngle2DScheme (void) const
 get the angle 2D scheme (NULL if none) const version. More...

void setAngle2D (float angle)
 ===================================================================================. More...

float getAngle2D (void) const
 get the constant. More...

 CPSRotated2DParticle ()
 ===================================================================================. More...

virtual ~CPSRotated2DParticle ()
 ===================================================================================. More...

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


Static Public Methods

const float * getRotTable (void)
 this return a float table used to speed up rotations of face look at and the like for each angle, there are 4 float : 2 couple of float : a1, b1, a2, b2 a1 * I + b1 * K = up left corner, a2 * I + b2 * K = up right corner, This table must have been initialized with initRotTable. More...

void initRotTable (void)
 ===================================================================================. More...


Protected Methods

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

void newAngle2DElement (CPSLocated *emitterLocated, uint32 emitterIndex)
void deleteAngle2DElement (uint32 index)
void resizeAngle2D (uint32 size)

Protected Attributes

float _Angle2D
CPSAttribMaker< float > * _Angle2DScheme

Static Protected Attributes

float _RotTable [4 *256]
bool _InitializedRotTab = false
 it is true if the table has been initialized, for debug purposes. More...


Detailed Description

this class adds tunable 2D rotation to a particle, it can be used by public multiple inheritance.

Definition at line 288 of file ps_particle_basic.h.


Constructor & Destructor Documentation

NL3D::CPSRotated2DParticle::CPSRotated2DParticle  
 

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

Definition at line 258 of file ps_particle_basic.cpp.

NL3D::CPSRotated2DParticle::~CPSRotated2DParticle   [virtual]
 

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

Definition at line 263 of file ps_particle_basic.cpp.

References _Angle2DScheme.


Member Function Documentation

void NL3D::CPSRotated2DParticle::deleteAngle2DElement uint32    index [inline, protected]
 

Definition at line 357 of file ps_particle_basic.h.

References _Angle2DScheme, and index.

Referenced by NL3D::CPSShockWave::deleteElement, NL3D::CPSMesh::deleteElement, NL3D::CPSFanLight::deleteElement, and NL3D::CPSFaceLookAt::deleteElement.

float NL3D::CPSRotated2DParticle::getAngle2D void    const [inline]
 

get the constant.

Definition at line 313 of file ps_particle_basic.h.

References _Angle2D.

virtual CPSLocated* NL3D::CPSRotated2DParticle::getAngle2DOwner void    [protected, pure virtual]
 

deriver must return their owner there.

Implemented in NL3D::CPSFaceLookAt.

Referenced by resizeAngle2D, and setAngle2DScheme.

const CPSAttribMaker<float>* NL3D::CPSRotated2DParticle::getAngle2DScheme void    const [inline]
 

get the angle 2D scheme (NULL if none) const version.

Definition at line 303 of file ps_particle_basic.h.

References _Angle2DScheme.

CPSAttribMaker<float>* NL3D::CPSRotated2DParticle::getAngle2DScheme void    [inline]
 

get the angle 2D scheme (NULL if none).

Definition at line 300 of file ps_particle_basic.h.

References _Angle2DScheme.

const float* NL3D::CPSRotated2DParticle::getRotTable void    [inline, static]
 

this return a float table used to speed up rotations of face look at and the like for each angle, there are 4 float : 2 couple of float : a1, b1, a2, b2 a1 * I + b1 * K = up left corner, a2 * I + b2 * K = up right corner, This table must have been initialized with initRotTable.

Definition at line 331 of file ps_particle_basic.h.

References _InitializedRotTab, _RotTable, and nlassert.

void NL3D::CPSRotated2DParticle::initRotTable void    [static]
 

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

Definition at line 293 of file ps_particle_basic.cpp.

References _InitializedRotTab, and _RotTable.

void NL3D::CPSRotated2DParticle::newAngle2DElement CPSLocated   emitterLocated,
uint32    emitterIndex
[inline, protected]
 

Definition at line 353 of file ps_particle_basic.h.

References _Angle2DScheme.

Referenced by NL3D::CPSShockWave::newElement, NL3D::CPSMesh::newElement, NL3D::CPSFanLight::newElement, and NL3D::CPSFaceLookAt::newElement.

void NL3D::CPSRotated2DParticle::resizeAngle2D uint32    size [inline, protected]
 

Definition at line 361 of file ps_particle_basic.h.

References _Angle2DScheme, getAngle2DOwner, and nlassert.

Referenced by NL3D::CPSShockWave::resize, NL3D::CPSMesh::resize, NL3D::CPSFanLight::resize, and NL3D::CPSFaceLookAt::resize.

void NL3D::CPSRotated2DParticle::serialAngle2DScheme NLMISC::IStream   f throw (NLMISC::EStream)
 

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

Definition at line 269 of file ps_particle_basic.cpp.

void NL3D::CPSRotated2DParticle::setAngle2D float    angle
 

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

Angles range from 0.0f to 256.0f (2 pi) This discrad any previous scheme

See also:
setAngle2DScheme()

Definition at line 250 of file ps_particle_basic.cpp.

References _Angle2D, and _Angle2DScheme.

void NL3D::CPSRotated2DParticle::setAngle2DScheme CPSAttribMaker< float > *    scheme
 

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

Definition at line 241 of file ps_particle_basic.cpp.

References _Angle2DScheme, getAngle2DOwner, and nlassert.


Member Data Documentation

float NL3D::CPSRotated2DParticle::_Angle2D [protected]
 

Definition at line 344 of file ps_particle_basic.h.

Referenced by getAngle2D, setAngle2D, and NL3D::CPSMesh::updatePos.

CPSAttribMaker<float>* NL3D::CPSRotated2DParticle::_Angle2DScheme [protected]
 

Definition at line 345 of file ps_particle_basic.h.

Referenced by deleteAngle2DElement, getAngle2DScheme, newAngle2DElement, resizeAngle2D, setAngle2D, setAngle2DScheme, NL3D::CPSMesh::updatePos, and ~CPSRotated2DParticle.

bool NL3D::CPSRotated2DParticle::_InitializedRotTab = false [static, protected]
 

it is true if the table has been initialized, for debug purposes.

Definition at line 238 of file ps_particle_basic.cpp.

Referenced by getRotTable, and initRotTable.

float NL3D::CPSRotated2DParticle::_RotTable [static, protected]
 

Definition at line 237 of file ps_particle_basic.cpp.

Referenced by getRotTable, and initRotTable.


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