NL3D::CPSRotated3DPlaneParticle Class Reference

#include <ps_particle_basic.h>

Inheritance diagram for NL3D::CPSRotated3DPlaneParticle:

NL3D::CPSConstraintMesh NL3D::CPSFace NL3D::CPSMesh NL3D::CPSShockWave

Detailed Description

this class adds tunable 3D rotation to a PLANE particle, it can be used by public multiple inheritance It must just produce 2 vectors that give the x and y vector of the local basis.

Definition at line 655 of file ps_particle_basic.h.

Public Member Functions

 CPSRotated3DPlaneParticle ()
 ===================================================================================

CPlaneBasis getPlaneBasis (void) const
 get the constant basis

const CPSAttribMaker< CPlaneBasis > * getPlaneBasisScheme (void) const
 get the plane basis scheme, (NULL if none) const version

CPSAttribMaker< CPlaneBasis > * getPlaneBasisScheme (void)
 get the plane basis scheme, (NULL if none)

void serialPlaneBasisScheme (NLMISC::IStream &f) throw (NLMISC::EStream)
 ===================================================================================

void setPlaneBasis (const CPlaneBasis &basis)
 ===================================================================================

void setPlaneBasisScheme (CPSAttribMaker< CPlaneBasis > *basisMaker)
 ===================================================================================

virtual ~CPSRotated3DPlaneParticle ()
 ===================================================================================


Protected Member Functions

void deletePlaneBasisElement (uint32 index)
virtual CPSLocatedgetPlaneBasisOwner (void)=0
 if this is false, constant size will be used instead of a scheme deriver must return their owner there

void newPlaneBasisElement (CPSLocated *emitterLocated, uint32 emitterIndex)
void resizePlaneBasis (uint32 size)

Protected Attributes

CPlaneBasis _PlaneBasis
CPSAttribMaker< CPlaneBasis > * _PlaneBasisScheme


Constructor & Destructor Documentation

NL3D::CPSRotated3DPlaneParticle::CPSRotated3DPlaneParticle  ) 
 

===================================================================================

Definition at line 456 of file ps_particle_basic.cpp.

References _PlaneBasis, NL3D::CPlaneBasis::X, and NL3D::CPlaneBasis::Y.

00456                                                      : _PlaneBasisScheme(NULL)                                                                                                          
00457 {
00458         _PlaneBasis.X = CVector::I;
00459         _PlaneBasis.Y = CVector::J;
00460 }

NL3D::CPSRotated3DPlaneParticle::~CPSRotated3DPlaneParticle  )  [virtual]
 

===================================================================================

Definition at line 463 of file ps_particle_basic.cpp.

References _PlaneBasisScheme.

00464 {       
00465         delete _PlaneBasisScheme;       
00466 }


Member Function Documentation

void NL3D::CPSRotated3DPlaneParticle::deletePlaneBasisElement uint32  index  )  [inline, protected]
 

Definition at line 703 of file ps_particle_basic.h.

References _PlaneBasisScheme, NL3D::CPSAttribMaker< CPlaneBasis >::deleteElement(), NL3D::CPSAttribMaker< CPlaneBasis >::hasMemory(), index, and uint32.

Referenced by NL3D::CPSConstraintMesh::deleteElement(), NL3D::CPSMesh::deleteElement(), and NL3D::CPSFace::deleteElement().

00704                 {
00705                         if (_PlaneBasisScheme && _PlaneBasisScheme->hasMemory()) _PlaneBasisScheme->deleteElement(index);
00706                 }

CPlaneBasis NL3D::CPSRotated3DPlaneParticle::getPlaneBasis void   )  const [inline]
 

get the constant basis

Definition at line 678 of file ps_particle_basic.h.

References _PlaneBasis.

00678 { return _PlaneBasis; }

virtual CPSLocated* NL3D::CPSRotated3DPlaneParticle::getPlaneBasisOwner void   )  [protected, pure virtual]
 

if this is false, constant size will be used instead of a scheme deriver must return their owner there

Implemented in NL3D::CPSFace, NL3D::CPSMesh, NL3D::CPSConstraintMesh, and NL3D::CPSShockWave.

Referenced by resizePlaneBasis(), and setPlaneBasisScheme().

const CPSAttribMaker<CPlaneBasis>* NL3D::CPSRotated3DPlaneParticle::getPlaneBasisScheme void   )  const [inline]
 

get the plane basis scheme, (NULL if none) const version

Definition at line 673 of file ps_particle_basic.h.

References _PlaneBasisScheme.

00673 { return _PlaneBasisScheme; }

CPSAttribMaker<CPlaneBasis>* NL3D::CPSRotated3DPlaneParticle::getPlaneBasisScheme void   )  [inline]
 

get the plane basis scheme, (NULL if none)

Set a constant basis for all particles

See also:
setPlaneBasisSchemeScheme()

Definition at line 670 of file ps_particle_basic.h.

References _PlaneBasisScheme.

00670 { return _PlaneBasisScheme; }

void NL3D::CPSRotated3DPlaneParticle::newPlaneBasisElement CPSLocated emitterLocated,
uint32  emitterIndex
[inline, protected]
 

Definition at line 699 of file ps_particle_basic.h.

References _PlaneBasisScheme, NL3D::CPSAttribMaker< CPlaneBasis >::hasMemory(), NL3D::CPSAttribMaker< CPlaneBasis >::newElement(), and uint32.

Referenced by NL3D::CPSConstraintMesh::newElement(), NL3D::CPSMesh::newElement(), and NL3D::CPSFace::newElement().

00700                 {
00701                         if (_PlaneBasisScheme && _PlaneBasisScheme->hasMemory()) _PlaneBasisScheme->newElement(emitterLocated, emitterIndex);
00702                 }       

void NL3D::CPSRotated3DPlaneParticle::resizePlaneBasis uint32  size  )  [inline, protected]
 

Definition at line 707 of file ps_particle_basic.h.

References _PlaneBasisScheme, getPlaneBasisOwner(), NL3D::CPSAttribMaker< CPlaneBasis >::hasMemory(), nlassert, NL3D::CPSAttribMaker< CPlaneBasis >::resize(), size, and uint32.

Referenced by NL3D::CPSConstraintMesh::resize(), NL3D::CPSMesh::resize(), and NL3D::CPSFace::resize().

00708                 {
00709                         nlassert(size < (1 << 16));
00710                         if (_PlaneBasisScheme && _PlaneBasisScheme->hasMemory()) _PlaneBasisScheme->resize(size, getPlaneBasisOwner()->getSize());
00711                 }

void NL3D::CPSRotated3DPlaneParticle::serialPlaneBasisScheme NLMISC::IStream f  )  throw (NLMISC::EStream)
 

===================================================================================

Definition at line 469 of file ps_particle_basic.cpp.

00470 {
00471         f.serialVersion(1);     
00472         f.serialPolyPtr(_PlaneBasisScheme);     
00473         bool usePlaneBasisScheme = _PlaneBasisScheme != NULL;   
00474         if (!usePlaneBasisScheme)
00475         {
00476                 f.serial(_PlaneBasis);
00477         }
00478 }

void NL3D::CPSRotated3DPlaneParticle::setPlaneBasis const CPlaneBasis basis  ) 
 

===================================================================================

Definition at line 448 of file ps_particle_basic.cpp.

References _PlaneBasis, and _PlaneBasisScheme.

00449 {       
00450         delete _PlaneBasisScheme;               
00451         _PlaneBasisScheme = NULL;       
00452         _PlaneBasis = basis;
00453 }

void NL3D::CPSRotated3DPlaneParticle::setPlaneBasisScheme CPSAttribMaker< CPlaneBasis > *  basisMaker  ) 
 

===================================================================================

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

Definition at line 439 of file ps_particle_basic.cpp.

References _PlaneBasisScheme, getPlaneBasisOwner(), nlassert, and NL3D::CPSAttribMaker< T >::resize().

00440 {
00441         nlassert(basisMaker);
00442         delete _PlaneBasisScheme;       
00443         _PlaneBasisScheme = basisMaker;
00444         if (getPlaneBasisOwner() && basisMaker->hasMemory()) basisMaker->resize(getPlaneBasisOwner()->getMaxSize(), getPlaneBasisOwner()->getSize());
00445 }


Field Documentation

CPlaneBasis NL3D::CPSRotated3DPlaneParticle::_PlaneBasis [protected]
 

Definition at line 697 of file ps_particle_basic.h.

Referenced by CPSRotated3DPlaneParticle(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSConstraintMeshHelper::drawMeshs(), getPlaneBasis(), and setPlaneBasis().

CPSAttribMaker<CPlaneBasis>* NL3D::CPSRotated3DPlaneParticle::_PlaneBasisScheme [protected]
 

Definition at line 695 of file ps_particle_basic.h.

Referenced by deletePlaneBasisElement(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSConstraintMeshHelper::drawMeshs(), getPlaneBasisScheme(), newPlaneBasisElement(), resizePlaneBasis(), setPlaneBasis(), setPlaneBasisScheme(), and ~CPSRotated3DPlaneParticle().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 07:24:19 2004 for NeL by doxygen 1.3.6