# Ogre::Particle Class Reference

Class representing a single particle instance. More...

`#include <OgreParticle.h>`

List of all members.

## Public Member Functions

| Particle ()
void | setDimensions (Real width, Real height)
| Sets the width and height for this particle.
bool | hasOwnDimensions (void) const
| Returns true if this particle deviates from the ParticleSystem's default dimensions (i.e.
Real | getOwnWidth (void) const
| Retrieves the particle's personal width, if hasOwnDimensions is true.
Real | getOwnHeight (void) const
| Retrieves the particle's personal width, if hasOwnDimensions is true.
void | setRotation (const Radian &rad)
| Sets the current rotation.
const Radian & | getRotation (void) const
void | _notifyOwner (ParticleSystem *owner)
| Internal method for notifying the particle of it's owner.
void | _notifyVisualData (ParticleVisualData *vis)
| Internal method for notifying the particle of it's optional visual data.
ParticleVisualData * | getVisualData (void) const
| Get the optional visual data associated with the class.
void | resetDimensions (void)
| Utility method to reset this particle.

## Public Attributes

bool | mOwnDimensions
| Does this particle have it's own dimensions?
Real | mWidth
| Personal width if mOwnDimensions == true.
Real | mHeight
| Personal height if mOwnDimensions == true.
Radian | rotation
| Current rotation value.
Vector3 | position
| World position.
Vector3 | direction
| Direction (and speed).
ColourValue | colour
| Current colour.
Real | timeToLive
| Time to live, number of seconds left of particles natural life.
Real | totalTimeToLive
| Total Time to live, number of seconds of particles natural life.
Radian | rotationSpeed
| Speed of rotation in radians/sec.

## Protected Attributes

ParticleSystem * | mParentSystem
| Parent ParticleSystem.
ParticleVisualData * | mVisual
| Additional visual data you might want to associate with the Particle.

## Detailed Description

Class representing a single particle instance.

Definition at line 51 of file OgreParticle.h.

## Constructor & Destructor Documentation

Ogre::Particle::Particle | ( |  | ) |

| Definition at line 83 of file OgreParticle.h.

## Member Function Documentation

void Ogre::Particle::_notifyOwner | ( | ParticleSystem * | owner | ) |

| Internal method for notifying the particle of it's owner.

void Ogre::Particle::_notifyVisualData | ( | ParticleVisualData * | vis | ) |

| Internal method for notifying the particle of it's optional visual data. Definition at line 124 of file OgreParticle.h.

Real Ogre::Particle::getOwnHeight | ( | void |  | ) | const

| Retrieves the particle's personal width, if hasOwnDimensions is true. Definition at line 111 of file OgreParticle.h. References Ogre::Real.

Real Ogre::Particle::getOwnWidth | ( | void |  | ) | const

| Retrieves the particle's personal width, if hasOwnDimensions is true. Definition at line 108 of file OgreParticle.h. References Ogre::Real.

const Radian& Ogre::Particle::getRotation | ( | void |  | ) | const

| Definition at line 116 of file OgreParticle.h.

ParticleVisualData* Ogre::Particle::getVisualData | ( | void |  | ) | const

| Get the optional visual data associated with the class. Definition at line 127 of file OgreParticle.h.

bool Ogre::Particle::hasOwnDimensions | ( | void |  | ) | const

Returns true if this particle deviates from the ParticleSystem's default dimensions (i.e.

if the particle::setDimensions method has been called for this instance).

See also:
  particle::setDimensions

Definition at line 105 of file OgreParticle.h.

void Ogre::Particle::resetDimensions | ( | void |  | ) |

| Utility method to reset this particle. Referenced by Ogre::ParticleEmitter::_initParticle().

void Ogre::Particle::setDimensions | ( | Real | width,
|  | Real | height
| ) |

Sets the width and height for this particle.

Remarks:
  Note that it is most efficient for every particle in a ParticleSystem to have the same dimensions. If you choose to alter the dimensions of an individual particle the set will be less efficient. Do not call this method unless you really need to have different particle dimensions within the same set. Otherwise just call the ParticleSystem::setDefaultDimensions method instead.

void Ogre::Particle::setRotation | ( | const Radian & | rad | ) |

| Sets the current rotation.

## Member Data Documentation

ColourValue Ogre::Particle::colour

| Current colour. Definition at line 74 of file OgreParticle.h.

Vector3 Ogre::Particle::direction

| Direction (and speed). Definition at line 72 of file OgreParticle.h.

Real Ogre::Particle::mHeight

| Personal height if mOwnDimensions == true. Definition at line 64 of file OgreParticle.h.

bool Ogre::Particle::mOwnDimensions

| Does this particle have it's own dimensions? Definition at line 60 of file OgreParticle.h.

ParticleSystem* Ogre::Particle::mParentSystem `[protected]`

| Parent ParticleSystem. Definition at line 55 of file OgreParticle.h.

ParticleVisualData* Ogre::Particle::mVisual `[protected]`

| Additional visual data you might want to associate with the Particle. Definition at line 57 of file OgreParticle.h.

Real Ogre::Particle::mWidth

| Personal width if mOwnDimensions == true. Definition at line 62 of file OgreParticle.h.

Vector3 Ogre::Particle::position

| World position. Definition at line 70 of file OgreParticle.h.

Radian Ogre::Particle::rotation

| Current rotation value. Definition at line 66 of file OgreParticle.h.

Radian Ogre::Particle::rotationSpeed

| Speed of rotation in radians/sec. Definition at line 80 of file OgreParticle.h.

Real Ogre::Particle::timeToLive

| Time to live, number of seconds left of particles natural life. Definition at line 76 of file OgreParticle.h.

Real Ogre::Particle::totalTimeToLive

| Total Time to live, number of seconds of particles natural life. Definition at line 78 of file OgreParticle.h.

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

- OgreParticle.h

Copyright © 2000-2005 by The OGRE Team
Last modified Sun Nov 20 12:37:57 2005