Particle Universe  1.2
ParticleUniverse::MeshSurfaceEmitter Class Reference

#include <ParticleUniverseMeshSurfaceEmitter.h>

Inheritance diagram for ParticleUniverse::MeshSurfaceEmitter:

Public Member Functions

 MeshSurfaceEmitter (void)
 
virtual ~MeshSurfaceEmitter (void)
 
const StringgetMeshName (void) const
 
void setMeshName (const String &meshName, bool doBuild=true)
 
bool useNormals (void) const
 
void setUseNormals (bool useNormals)
 
const MeshInfo::MeshSurfaceDistribution getDistribution (void) const
 
void setDistribution (MeshInfo::MeshSurfaceDistribution distribution)
 
const Vector3getScale (void) const
 
void setScale (const Vector3 &scale)
 
void build (void)
 
virtual void _prepare (ParticleTechnique *particleTechnique)
 
virtual void _unprepare (ParticleTechnique *particleTechnique)
 
virtual void _initParticlePosition (Particle *particle)
 
virtual unsigned short _calculateRequestedParticles (Real timeElapsed)
 
virtual void _initParticleDirection (Particle *particle)
 
virtual void copyAttributesTo (ParticleEmitter *emitter)
 
- Public Member Functions inherited from ParticleUniverse::ParticleEmitter
 ParticleEmitter (void)
 
virtual ~ParticleEmitter (void)
 
ParticleTechniquegetParentTechnique (void) const
 
void setParentTechnique (ParticleTechnique *parentTechnique)
 
const StringgetEmitterType (void) const
 
void setEmitterType (const String &emitterType)
 
const StringgetName (void) const
 
void setName (const String &name)
 
DynamicAttributegetDynAngle (void) const
 
void setDynAngle (DynamicAttribute *dynAngle)
 
DynamicAttributegetDynEmissionRate (void) const
 
void setDynEmissionRate (DynamicAttribute *dynEmissionRate)
 
DynamicAttributegetDynTotalTimeToLive (void) const
 
void setDynTotalTimeToLive (DynamicAttribute *dynTotalTimeToLive)
 
DynamicAttributegetDynParticleMass (void) const
 
void setDynParticleMass (DynamicAttribute *dynParticleMass)
 
DynamicAttributegetDynVelocity (void) const
 
void setDynVelocity (DynamicAttribute *dynVelocity)
 
DynamicAttributegetDynDuration (void) const
 
void setDynDuration (DynamicAttribute *dynDuration)
 
void setDynDurationSet (bool durationSet)
 
DynamicAttributegetDynRepeatDelay (void) const
 
void setDynRepeatDelay (DynamicAttribute *dynRepeatDelay)
 
void setDynRepeatDelaySet (bool repeatDelaySet)
 
DynamicAttributegetDynParticleAllDimensions (void) const
 
void setDynParticleAllDimensions (DynamicAttribute *dynParticleAllDimensions)
 
void setDynParticleAllDimensionsSet (bool particleAllDimensionsSet)
 
DynamicAttributegetDynParticleWidth (void) const
 
void setDynParticleWidth (DynamicAttribute *dynParticleWidth)
 
void setDynParticleWidthSet (bool particleWidthSet)
 
DynamicAttributegetDynParticleHeight (void) const
 
void setDynParticleHeight (DynamicAttribute *dynParticleHeight)
 
void setDynParticleHeightSet (bool particleHeightSet)
 
DynamicAttributegetDynParticleDepth (void) const
 
void setDynParticleDepth (DynamicAttribute *dynParticleDepth)
 
void setDynParticleDepthSet (bool particleDepthSet)
 
ParticleType getEmitsType (void) const
 
void setEmitsType (ParticleType emitsType)
 
const StringgetEmitsName (void) const
 
void setEmitsName (const String &emitsName)
 
void setEmissionRateCameraDependency (CameraDependency *cameraDependency)
 
void setEmissionRateCameraDependency (Real squareDistance, bool inc=false)
 
CameraDependencygetEmissionRateCameraDependency (void) const
 
virtual const Vector3getParticleDirection (void)
 
const Vector3getOriginalParticleDirection (void) const
 
const QuaterniongetParticleOrientation (void) const
 
void setParticleOrientation (const Quaternion &orientation)
 
const QuaterniongetParticleOrientationRangeStart (void) const
 
void setParticleOrientationRangeStart (const Quaternion &orientationRangeStart)
 
const QuaterniongetParticleOrientationRangeEnd (void) const
 
void setParticleOrientationRangeEnd (const Quaternion &orientationRangeEnd)
 
virtual void setEnabled (bool enabled)
 
virtual void setParticleDirection (const Vector3 &direction)
 
bool isAutoDirection (void) const
 
void setAutoDirection (bool autoDirection)
 
bool isForceEmission (void) const
 
void setForceEmission (bool forceEmission)
 
virtual void _preProcessParticles (ParticleTechnique *technique, Real timeElapsed)
 
virtual void _postProcessParticles (ParticleTechnique *technique, Real timeElapsed)
 
virtual void _initForEmission (void)
 
virtual void _initForExpiration (ParticleTechnique *technique, Real timeElapsed)
 
virtual void _initParticleForEmission (Particle *particle)
 
virtual void _initParticleOrientation (Particle *particle)
 
void _generateAngle (Radian &angle)
 
virtual void _initParticleVelocity (Particle *particle)
 
virtual void _initParticleMass (Particle *particle)
 
virtual void _initParticleColour (Particle *particle)
 
virtual void _initParticleTextureCoords (Particle *particle)
 
Real _initParticleTimeToLive (void)
 
void _initParticleDimensions (Particle *particle)
 
void _initTimeBased (void)
 
const Vector3getDerivedPosition (void)
 
virtual void _notifyStart (void)
 
virtual void _notifyStop (void)
 
virtual void _notifyPause (void)
 
virtual void _notifyResume (void)
 
virtual void _notifyRescaled (const Vector3 &scale)
 
virtual void copyParentAttributesTo (ParticleEmitter *emitter)
 
const ColourValuegetParticleColour (void) const
 
void setParticleColour (const ColourValue &particleColour)
 
const ColourValuegetParticleColourRangeStart (void) const
 
void setParticleColourRangeStart (const ColourValue &particleColourRangeStart)
 
const ColourValuegetParticleColourRangeEnd (void) const
 
void setParticleColourRangeEnd (const ColourValue &particleColourRangeEnd)
 
const uint16getParticleTextureCoords (void) const
 
void setParticleTextureCoords (const uint16 &particleTextureCoords)
 
const uint16getParticleTextureCoordsRangeStart (void) const
 
void setParticleTextureCoordsRangeStart (const uint16 &particleTextureCoordsRangeStart)
 
const uint16getParticleTextureCoordsRangeEnd (void) const
 
void setParticleTextureCoordsRangeEnd (const uint16 &particleTextureCoordsRangeEnd)
 
bool isKeepLocal (void) const
 
void setKeepLocal (bool keepLocal)
 
bool makeParticleLocal (Particle *particle)
 
void pushEvent (ParticleUniverseEvent &particleUniverseEvent)
 
- Public Member Functions inherited from ParticleUniverse::Particle
 Particle (void)
 
virtual ~Particle (void)
 
bool _isMarkedForEmission (void) const
 
void _setMarkedForEmission (bool markedForEmission)
 
virtual bool isEnabled (void) const
 
void _setOriginalEnabled (bool originalEnabled)
 
bool _getOriginalEnabled (void) const
 
bool isFreezed (void) const
 
void setFreezed (bool freezed)
 
void setEventFlags (uint32 flags)
 
void addEventFlags (uint32 flags)
 
void removeEventFlags (uint32 flags)
 
uint32 getEventFlags (void) const
 
bool hasEventFlags (uint32 flags) const
 
void copyBehaviours (ParticleBehaviourList &behaviours)
 
virtual void _process (ParticleTechnique *technique, Real timeElapsed)
 
ParticleBehaviourgetBehaviour (const String &behaviourType)
 
Real calculateVelocity (void) const
 
virtual void copyAttributesTo (Particle *particle)
 
- Public Member Functions inherited from ParticleUniverse::IAlias
 IAlias (void)
 
virtual ~IAlias (void)
 
const StringgetAliasName (void) const
 
void setAliasName (String aliasName)
 
const AliasType getAliasType (void) const
 
void setAliasType (AliasType aliasType)
 
- Public Member Functions inherited from ParticleUniverse::IElement
 IElement (void)
 
virtual ~IElement (void)
 

Static Public Attributes

static const Vector3 DEFAULT_SCALE
 
static const MeshInfo::MeshSurfaceDistribution DEFAULT_DISTRIBUTION
 
- Static Public Attributes inherited from ParticleUniverse::ParticleEmitter
static const bool DEFAULT_ENABLED
 
static const Vector3 DEFAULT_POSITION
 
static const bool DEFAULT_KEEP_LOCAL
 
static const Vector3 DEFAULT_DIRECTION
 
static const Quaternion DEFAULT_ORIENTATION
 
static const Quaternion DEFAULT_ORIENTATION_RANGE_START
 
static const Quaternion DEFAULT_ORIENTATION_RANGE_END
 
static const Particle::ParticleType DEFAULT_EMITS
 
static const uint16 DEFAULT_START_TEXTURE_COORDS
 
static const uint16 DEFAULT_END_TEXTURE_COORDS
 
static const uint16 DEFAULT_TEXTURE_COORDS
 
static const ColourValue DEFAULT_START_COLOUR_RANGE
 
static const ColourValue DEFAULT_END_COLOUR_RANGE
 
static const ColourValue DEFAULT_COLOUR
 
static const bool DEFAULT_AUTO_DIRECTION
 
static const bool DEFAULT_FORCE_EMISSION
 
static const Real DEFAULT_EMISSION_RATE
 
static const Real DEFAULT_TIME_TO_LIVE
 
static const Real DEFAULT_MASS
 
static const Real DEFAULT_VELOCITY
 
static const Real DEFAULT_DURATION
 
static const Real DEFAULT_REPEAT_DELAY
 
static const Real DEFAULT_ANGLE
 
static const Real DEFAULT_DIMENSIONS
 
static const Real DEFAULT_WIDTH
 
static const Real DEFAULT_HEIGHT
 
static const Real DEFAULT_DEPTH
 
- Static Public Attributes inherited from ParticleUniverse::Particle
static Real DEFAULT_TTL
 
static Real DEFAULT_MASS
 

Protected Attributes

String mMeshName
 
Quaternion mOrientation
 
Vector3 mScale
 
MeshInfo::MeshSurfaceDistribution mDistribution
 
MeshInfomMeshInfo
 
size_t mTriangleIndex
 
bool mDirectionSet
 
- Protected Attributes inherited from ParticleUniverse::ParticleEmitter
ParticleTechniquemParentTechnique
 
Vector3 _mEmitterScale
 
String mEmitterType
 
String mName
 
Vector3 mParticleDirection
 
Vector3 mOriginalParticleDirection
 
Quaternion mParticleOrientation
 
Quaternion mParticleOrientationRangeStart
 
Quaternion mParticleOrientationRangeEnd
 
bool mParticleOrientationRangeSet
 
DynamicAttributemDynAngle
 
DynamicAttributemDynEmissionRate
 
ParticleType mEmitsType
 
String mEmitsName
 
DynamicAttributemDynTotalTimeToLive
 
DynamicAttributemDynParticleMass
 
DynamicAttributemDynVelocity
 
DynamicAttributemDynDuration
 
DynamicAttributemDynRepeatDelay
 
DynamicAttributemDynParticleAllDimensions
 
bool mDynParticleAllDimensionsSet
 
DynamicAttributemDynParticleWidth
 
bool mDynParticleWidthSet
 
DynamicAttributemDynParticleHeight
 
bool mDynParticleHeightSet
 
DynamicAttributemDynParticleDepth
 
bool mDynParticleDepthSet
 
Vector3 mUpVector
 
Real mRemainder
 
DynamicAttributeFactory mDynamicAttributeFactory
 
DynamicAttributeHelper mDynamicAttributeHelper
 
Real mDurationRemain
 
bool mDynDurationSet
 
Real mRepeatDelayRemain
 
bool mDynRepeatDelaySet
 
CameraDependencymEmissionRateCameraDependency
 
CameraDependencyFactory mCameraDependencyFactory
 
bool mAutoDirection
 
bool mForceEmission
 
bool mOriginalForceEmission
 
bool mForceEmissionExecuted
 
bool mOriginalForceEmissionExecuted
 
ColourValue mParticleColour
 
ColourValue mParticleColourRangeStart
 
ColourValue mParticleColourRangeEnd
 
bool mParticleColourRangeSet
 
bool mKeepLocal
 
uint16 mParticleTextureCoords
 
uint16 mParticleTextureCoordsRangeStart
 
uint16 mParticleTextureCoordsRangeEnd
 
bool mParticleTextureCoordsRangeSet
 
- Protected Attributes inherited from ParticleUniverse::Particle
uint32 mEventFlags
 
bool mMarkedForEmission
 
bool mEnabled
 
bool mFreezed
 
bool mOriginalEnabled
 
bool mOriginalEnabledSet
 
Vector3 mDerivedPosition
 
ParticleBehaviourList mBehaviours
 
- Protected Attributes inherited from ParticleUniverse::IAlias
String mAliasName
 
AliasType mAliasType
 

Additional Inherited Members

- Public Types inherited from ParticleUniverse::Particle
enum  ParticleType {
  PT_VISUAL, PT_TECHNIQUE, PT_EMITTER, PT_AFFECTOR,
  PT_SYSTEM
}
 
enum  ReservedParticleEventFlags { PEF_EXPIRED = 1<<0, PEF_EMITTED = 1<<1, PEF_COLLIDED = 1<<2 }
 
typedef vector< ParticleBehaviour * > ParticleBehaviourList
 
typedef ParticleBehaviourList::const_iterator ParticleBehaviourIterator
 
- Public Types inherited from ParticleUniverse::IAlias
enum  AliasType {
  AT_UNDEFINED, AT_TECHNIQUE, AT_RENDERER, AT_EMITTER,
  AT_AFFECTOR, AT_OBSERVER, AT_EXTERN, AT_HANDLER,
  AT_BEHAVIOUR
}
 
- Public Attributes inherited from ParticleUniverse::Particle
ParticleEmitterparentEmitter
 
Vector3 position
 
Vector3 direction
 
Real mass
 
Real timeToLive
 
Real totalTimeToLive
 
Real timeFraction
 
ParticleType particleType
 
Any mUserDefinedObject
 
PhysicsActorphysicsActor
 
IVisualDatavisualData
 
Vector3 originalPosition
 
Vector3 originalDirection
 
Real originalVelocity
 
Real originalDirectionLength
 
Real originalScaledDirectionLength
 
Vector3 latestPosition
 
- Protected Member Functions inherited from ParticleUniverse::ParticleEmitter
void _pushEmitterEvent (EventType eventType)
 

Detailed Description

The MeshSurfaceEmitter is a ParticleEmitter that emits particles on the surface of a mesh.

Remarks
There are several ways of emitting it on the surface, from the vertices, edges and faces of a mesh. It is also possible to define whether more particles emit on larger faces.

Constructor & Destructor Documentation

ParticleUniverse::MeshSurfaceEmitter::MeshSurfaceEmitter ( void  )
virtual ParticleUniverse::MeshSurfaceEmitter::~MeshSurfaceEmitter ( void  )
virtual

Member Function Documentation

virtual unsigned short ParticleUniverse::MeshSurfaceEmitter::_calculateRequestedParticles ( Real  timeElapsed)
virtual
virtual void ParticleUniverse::MeshSurfaceEmitter::_initParticleDirection ( Particle particle)
virtual

Determine the particle direction.

Reimplemented from ParticleUniverse::ParticleEmitter.

virtual void ParticleUniverse::MeshSurfaceEmitter::_initParticlePosition ( Particle particle)
virtual

Determine a particle position on the mesh surface.

Reimplemented from ParticleUniverse::ParticleEmitter.

virtual void ParticleUniverse::MeshSurfaceEmitter::_prepare ( ParticleTechnique particleTechnique)
virtual

Build the data if the mesh name has been set.

Reimplemented from ParticleUniverse::ParticleEmitter.

virtual void ParticleUniverse::MeshSurfaceEmitter::_unprepare ( ParticleTechnique particleTechnique)
virtual

Reverse it.

Reimplemented from ParticleUniverse::ParticleEmitter.

void ParticleUniverse::MeshSurfaceEmitter::build ( void  )

Build all the data needed to generate the particles.

virtual void ParticleUniverse::MeshSurfaceEmitter::copyAttributesTo ( ParticleEmitter emitter)
virtual

Copy attributes to another emitter.

Reimplemented from ParticleUniverse::ParticleEmitter.

const MeshInfo::MeshSurfaceDistribution ParticleUniverse::MeshSurfaceEmitter::getDistribution ( void  ) const

Returns the type op distribution.

Remarks
There are several ways to emit particles on the surface of a mesh. This attribute indicates the type of distrubution on the surface.
const String& ParticleUniverse::MeshSurfaceEmitter::getMeshName ( void  ) const

Returns the mesh name.

const Vector3& ParticleUniverse::MeshSurfaceEmitter::getScale ( void  ) const

Returns the scale of the mesh.

void ParticleUniverse::MeshSurfaceEmitter::setDistribution ( MeshInfo::MeshSurfaceDistribution  distribution)

Set the type of particle distribution on the surface of a mesh.

void ParticleUniverse::MeshSurfaceEmitter::setMeshName ( const String meshName,
bool  doBuild = true 
)

Sets the mesh name.

void ParticleUniverse::MeshSurfaceEmitter::setScale ( const Vector3 scale)

Set the scale of the mesh.

Remarks
This options makes it possible to scale the mesh independently from the particle system scale as a whole.
void ParticleUniverse::MeshSurfaceEmitter::setUseNormals ( bool  useNormals)

Set indication whether normals are used for the particle direction.

bool ParticleUniverse::MeshSurfaceEmitter::useNormals ( void  ) const

Returns true if normals are used for the particle direction.

Member Data Documentation

const MeshInfo::MeshSurfaceDistribution ParticleUniverse::MeshSurfaceEmitter::DEFAULT_DISTRIBUTION
static
const Vector3 ParticleUniverse::MeshSurfaceEmitter::DEFAULT_SCALE
static
bool ParticleUniverse::MeshSurfaceEmitter::mDirectionSet
protected
MeshInfo::MeshSurfaceDistribution ParticleUniverse::MeshSurfaceEmitter::mDistribution
protected
MeshInfo* ParticleUniverse::MeshSurfaceEmitter::mMeshInfo
protected
String ParticleUniverse::MeshSurfaceEmitter::mMeshName
protected
Quaternion ParticleUniverse::MeshSurfaceEmitter::mOrientation
protected
Vector3 ParticleUniverse::MeshSurfaceEmitter::mScale
protected
size_t ParticleUniverse::MeshSurfaceEmitter::mTriangleIndex
protected

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