OgreParticleAffector.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __ParticleAffector_H__
#define __ParticleAffector_H__
#include "OgrePrerequisites.h"
#include "OgreString.h"
#include "OgreStringInterface.h"
#include "OgreHeaderPrefix.h"
namespace Ogre {
class _OgreExport ParticleAffector : public StringInterface, public FXAlloc
{
protected:
String mType;
void addBaseParameters(void) { /* actually do nothing - for future possible use */ }
ParticleSystem* mParent;
public:
ParticleAffector(ParticleSystem* parent): mParent(parent) {}
virtual ~ParticleAffector();
virtual void _initParticle(Particle* pParticle)
{
/* by default do nothing */
(void)pParticle;
}
virtual void _affectParticles(ParticleSystem* pSystem, Real timeElapsed) = 0;
const String &getType(void) const { return mType; }
};
}
#include "OgreHeaderSuffix.h"
#endif
Ogre::ParticleAffector::mType
String mType
Name of the type of affector, MUST be initialised by subclasses.
Definition: OgreParticleAffector.h:68
Ogre::ParticleAffector::_initParticle
virtual void _initParticle(Particle *pParticle)
Method called to allow the affector to initialize all newly created particles in the system...
Definition: OgreParticleAffector.h:95
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
OgreString.h
Ogre::ParticleAffector
Abstract class defining the interface to be implemented by particle affectors.
Definition: OgreParticleAffector.h:64
Ogre::ParticleAffector::addBaseParameters
void addBaseParameters(void)
Internal method for setting up the basic parameter definitions for a subclass.
Definition: OgreParticleAffector.h:78
OgrePrerequisites.h
Ogre::StringInterface
Class defining the common interface which classes can use to present a reflection-style, self-defining parameter set to callers.
Definition: OgreStringInterface.h:163
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
OgreHeaderSuffix.h
Ogre::Particle
Class representing a single particle instance.
Definition: OgreParticle.h:61
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::ParticleAffector::getType
const String & getType(void) const
Returns the name of the type of affector.
Definition: OgreParticleAffector.h:118
OgreHeaderPrefix.h
Ogre::ParticleAffector::mParent
ParticleSystem * mParent
Definition: OgreParticleAffector.h:80
Ogre::ParticleSystem
Class defining particle system based special effects.
Definition: OgreParticleSystem.h:67
Ogre::ParticleAffector::ParticleAffector
ParticleAffector(ParticleSystem *parent)
Definition: OgreParticleAffector.h:82
OgreStringInterface.h
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:58

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.