Inheritance diagram for NL3D::CDummy2DAngle:
Public Member Functions | |
float | getAngle2D (void) const |
get the constant | |
CPSLocated * | getAngle2DOwner (void) |
deriver must return their owner there | |
const CPSAttribMaker< float > * | getAngle2DScheme (void) const |
get the angle 2D scheme (NULL if none) const version | |
CPSAttribMaker< float > * | getAngle2DScheme (void) |
get the angle 2D scheme (NULL if none) | |
void | serialAngle2DScheme (NLMISC::IStream &f) throw (NLMISC::EStream) |
=================================================================================== | |
void | setAngle2D (float angle) |
=================================================================================== | |
void | setAngle2DScheme (CPSAttribMaker< float > *scheme) |
=================================================================================== | |
Static Public Member Functions | |
const float * | getRotTable (void) |
void | initRotTable (void) |
=================================================================================== | |
Protected Member Functions | |
void | deleteAngle2DElement (uint32 index) |
void | newAngle2DElement (CPSLocated *emitterLocated, uint32 emitterIndex) |
void | resizeAngle2D (uint32 size) |
Protected Attributes | |
float | _Angle2D |
CPSAttribMaker< float > * | _Angle2DScheme |
Static Protected Attributes | |
bool | _InitializedRotTab = false |
it is true if the table has been initialized, for debug purposes | |
float | _RotTable [4 *256] |
|
Definition at line 380 of file ps_particle_basic.h. References NL3D::CPSRotated2DParticle::_Angle2DScheme, NL3D::CPSAttribMaker< float >::deleteElement(), NL3D::CPSAttribMaker< float >::hasMemory(), index, and uint32. Referenced by NL3D::CPSShockWave::deleteElement(), NL3D::CPSMesh::deleteElement(), NL3D::CPSFanLight::deleteElement(), and NL3D::CPSFaceLookAt::deleteElement().
00381 { 00382 if (_Angle2DScheme && _Angle2DScheme->hasMemory()) _Angle2DScheme->deleteElement(index); 00383 } |
|
get the constant
Definition at line 336 of file ps_particle_basic.h. References NL3D::CPSRotated2DParticle::_Angle2D.
00336 { return _Angle2D; } |
|
deriver must return their owner there
Implements NL3D::CPSRotated2DParticle. Definition at line 117 of file ps_ribbon.cpp.
00117 { return NULL; }
|
|
get the angle 2D scheme (NULL if none) const version
Definition at line 326 of file ps_particle_basic.h. References NL3D::CPSRotated2DParticle::_Angle2DScheme.
00326 { return _Angle2DScheme; } |
|
get the angle 2D scheme (NULL if none)
Definition at line 323 of file ps_particle_basic.h. References NL3D::CPSRotated2DParticle::_Angle2DScheme.
00323 { return _Angle2DScheme; } |
|
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 354 of file ps_particle_basic.h. References NL3D::CPSRotated2DParticle::_InitializedRotTab, NL3D::CPSRotated2DParticle::_RotTable, and nlassert.
|
|
===================================================================================
Definition at line 294 of file ps_particle_basic.cpp. References NL3D::CPSRotated2DParticle::_InitializedRotTab, NL3D::CPSRotated2DParticle::_RotTable, and uint32.
00295 { 00296 float *ptFloat = _RotTable; 00297 for (uint32 k = 0; k < 256; ++k) 00298 { 00299 const float ca = (float) cos(k * (1.0f / 256.0f) * 2.0f * NLMISC::Pi); 00300 const float sa = (float) sin(k * (1.0f / 256.0f) * 2.0f * NLMISC::Pi); 00301 00302 *ptFloat++ = -ca - sa; 00303 *ptFloat++ = -sa + ca; 00304 00305 *ptFloat++ = ca - sa; 00306 *ptFloat++ = sa + ca; 00307 } 00308 _InitializedRotTab = true; 00309 } |
|
Definition at line 376 of file ps_particle_basic.h. References NL3D::CPSRotated2DParticle::_Angle2DScheme, NL3D::CPSAttribMaker< float >::hasMemory(), NL3D::CPSAttribMaker< float >::newElement(), and uint32. Referenced by NL3D::CPSShockWave::newElement(), NL3D::CPSMesh::newElement(), NL3D::CPSFanLight::newElement(), and NL3D::CPSFaceLookAt::newElement().
00377 { 00378 if (_Angle2DScheme && _Angle2DScheme->hasMemory()) _Angle2DScheme->newElement(emitterLocated, emitterIndex); 00379 } |
|
Definition at line 384 of file ps_particle_basic.h. References NL3D::CPSRotated2DParticle::_Angle2DScheme, NL3D::CPSRotated2DParticle::getAngle2DOwner(), NL3D::CPSAttribMaker< float >::hasMemory(), nlassert, NL3D::CPSAttribMaker< float >::resize(), size, and uint32. Referenced by NL3D::CPSShockWave::resize(), NL3D::CPSMesh::resize(), NL3D::CPSFanLight::resize(), and NL3D::CPSFaceLookAt::resize().
00385 { 00386 nlassert(size < (1 << 16)); 00387 if (_Angle2DScheme && _Angle2DScheme->hasMemory()) _Angle2DScheme->resize(size, getAngle2DOwner()->getSize()); 00388 } |
|
===================================================================================
Definition at line 270 of file ps_particle_basic.cpp. Referenced by NL3D::CPSRibbon::serial().
00271 { 00272 f.serialVersion(1); 00273 if (f.isReading()) 00274 { 00275 if (_Angle2DScheme) 00276 { 00277 delete _Angle2DScheme; 00278 _Angle2DScheme = NULL; 00279 } 00280 } 00281 bool useAngle2DScheme = _Angle2DScheme != NULL; 00282 f.serial(useAngle2DScheme); 00283 if (useAngle2DScheme) 00284 { 00285 f.serialPolyPtr(_Angle2DScheme); 00286 } 00287 else 00288 { 00289 f.serial(_Angle2D); 00290 } 00291 } |
|
=================================================================================== Set a constant angle for the particle. Angles range from 0.0f to 256.0f (2 pi) This discrad any previous scheme
Definition at line 251 of file ps_particle_basic.cpp. References NL3D::CPSRotated2DParticle::_Angle2D, and NL3D::CPSRotated2DParticle::_Angle2DScheme.
00252 { 00253 delete _Angle2DScheme; 00254 _Angle2DScheme = NULL; 00255 _Angle2D = angle2DScheme; 00256 } |
|
=================================================================================== Set an attribute maker that produce a float It must have been allocated by new It will be deleted by this object Output angles must range from 0.0f to 256.0f Definition at line 242 of file ps_particle_basic.cpp. References NL3D::CPSRotated2DParticle::_Angle2DScheme, NL3D::CPSRotated2DParticle::getAngle2DOwner(), nlassert, and NL3D::CPSAttribMaker< T >::resize().
00243 { 00244 nlassert(angle2DScheme); 00245 delete _Angle2DScheme; 00246 _Angle2DScheme = angle2DScheme; 00247 if (getAngle2DOwner() && angle2DScheme->hasMemory()) angle2DScheme->resize(getAngle2DOwner()->getMaxSize(), getAngle2DOwner()->getSize()); 00248 } |
|
|
|
it is true if the table has been initialized, for debug purposes
Definition at line 239 of file ps_particle_basic.cpp. Referenced by NL3D::CPSRotated2DParticle::getRotTable(), and NL3D::CPSRotated2DParticle::initRotTable(). |
|
Definition at line 238 of file ps_particle_basic.cpp. Referenced by NL3D::CPSRotated2DParticle::getRotTable(), and NL3D::CPSRotated2DParticle::initRotTable(). |