2#ifndef __OGRE_SHADER_PARTICLE_RENDERER_H__
3#define __OGRE_SHADER_PARTICLE_RENDERER_H__
6#include <OgreParticleSystemRenderer.h>
7#include <OgreVector2.h>
73 String doGet(
const void* target)
const;
74 void doSet(
void* target,
const String& val);
81 String doGet(
const void* target)
const;
82 void doSet(
void* target,
const String& val);
89 String doGet(
const void* target)
const;
90 void doSet(
void* target,
const String& val);
97 String doGet(
const void* target)
const;
98 void doSet(
void* target,
const String& val);
105 String doGet(
const void* target)
const;
106 void doSet(
void* target,
const String& val);
113 String doGet(
const void* target)
const;
114 void doSet(
void* target,
const String& val);
121 String doGet(
const void* target)
const;
122 void doSet(
void* target,
const String& val);
129 String doGet(
const void* target)
const;
130 void doSet(
void* target,
const String& val);
137 String doGet(
const void* target)
const;
138 void doSet(
void* target,
const String& val);
145 String doGet(
const void* target)
const;
146 void doSet(
void* target,
const String& val);
184 virtual const String&
getType(
void)
const override;
185 virtual void _updateRenderQueue(RenderQueue* queue, Ogre::list<Particle*>::type& currentParticles,
bool cullIndividually)
override;
186 virtual void visitRenderables(Renderable::Visitor* visitor,
bool debugRenderables =
false)
override;
192 virtual void _notifyAttached(Node* parent,
bool isTagPoint =
false)
override;
204 virtual const MaterialPtr&
getMaterial(
void)
const override;
208 virtual const LightList&
getLights(
void)
const override;
218 void addParticle(uint8* pDataVB,
const Particle& particle)
const;
237 const String&
getType()
const override;
238 ParticleSystemRenderer*
createInstance(
const String& name )
override;
Command objects for defining vertex format (see ParamCommand).
Factory class for ShaderParticleRenderer.
ParticleSystemRenderer * createInstance(const String &name) override
const String & getType() const override
const String rendererTypeName
void destroyInstance(ParticleSystemRenderer *inst) override
Specialisation of ParticleSystemRenderer to render particles using a custom shaders.
bool mVertexFormatColour
vertex format for particles
virtual void _destroyVisualData(ParticleVisualData *vis) override
bool getVertexFormatRotationSpeed() const
virtual void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false) override
static CmdVertexFormatTimeFrag msVertexFmtTimeFrag
bool mVertexFormatTTL
particle ttl (float1)
static CmdVertexFormatRotation msVertexFmtRotation
bool mVertexFormatSize
particle size (width and height - float2)
void setVertexFormatTotalTTL(bool bUse)
virtual void setKeepParticlesInLocalSpace(bool keepLocal) override
Real mRadius
maximum distance between particles and parent node
static CmdVertexFormatTexture msVertexFmtTexture
void setVertexFormatTimeFragmentInv(bool bUse)
static CmdVertexFormatSize msVertexFmtSize
static CmdVertexFormatTotalTTL msVertexFmtTotalTTL
bool mParentIsTagPoint
true if parent node is tag point
bool mVertexFormatRotationSpeed
particle rotation speed (radians/s - float1)
virtual const LightList & getLights(void) const override
bool mKeepInLocalSpace
control transformation matrix for particles
virtual const String & getType(void) const override
bool mVertexFormatDirection
particle direction (float3)
virtual void _notifyParticleRotated(void) override
void setVertexFormatTexture(bool bUse)
bool mVertexFormatTotalTTL
particle total ttl (float1)
void setVertexFormatRotation(bool bUse)
virtual void _notifyCurrentCamera(Camera *cam) override
virtual void getWorldTransforms(Matrix4 *xform) const override
bool getVertexFormatTTL() const
static CmdVertexFormatRotationSpeed msVertexFmtRotationSpeed
bool mVertexFormatRotation
particle rotation (radians - float1)
void setVertexFormatTTL(bool bUse)
bool mVertexFormatTimeFragmentInv
particle inverse time fragment (1.0f - ttl / total ttl) (float1) (value 0.0f - 1.0f)
bool getVertexFormatRotation() const
bool getVertexFormatDirection() const
bool getVertexFormatTimeFragment() const
bool getVertexFormatColour() const
void setVertexFormatSize(bool bUse)
bool getVertexFormatSize() const
virtual void _notifyAttached(Node *parent, bool isTagPoint=false) override
void setVertexFormatDirection(bool bUse)
const String rendererTypeName
static CmdVertexFormatTimeFragInv msVertexFmtTimeFragInv
static CmdVertexFormatDirection msVertexFmtDirection
SortMode mSortMode
particle sorting
void addParticle(uint8 *pDataVB, const Particle &particle) const
add particle to vertex buffer
virtual void _notifyDefaultDimensions(Real width, Real height) override
virtual void _notifyParticleQuota(size_t quota) override
static CmdVertexFormatTTL msVertexFmtTTL
Vector2 mTexCoordTable[4]
default texture coordinates
virtual ParticleVisualData * _createVisualData(void) override
virtual Real getSquaredViewDepth(const Camera *cam) const override
virtual void _notifyParticleResized(void) override
virtual void _updateRenderQueue(RenderQueue *queue, Ogre::list< Particle * >::type ¤tParticles, bool cullIndividually) override
void setVertexFormatRotationSpeed(bool bUse)
static CmdVertexFormatColour msVertexFmtColour
virtual void setRenderQueueGroup(uint8 queueID) override
bool getVertexFormatTimeFragmentInv() const
Node * mParentNode
parent node for particle system - used for world transformation
virtual const MaterialPtr & getMaterial(void) const override
bool mVertexFormatTimeFragment
particle time fragment (ttl / total ttl) (float1) (value 0.0f - 1.0f)
bool mVertexFormatTexture
true if particles use texture (float2)
bool getVertexFormatTotalTTL() const
virtual void getRenderOperation(RenderOperation &op) override
MaterialPtr mMaterial
rendering data
bool allocateBuffers(size_t iNumParticles)
allocate hardware buffers and prepare them for filling particles
virtual void _setMaterial(MaterialPtr &mat) override
LightList mLightList
light list for renderable
void setVertexFormatTimeFragment(bool bUse)
virtual ~ShaderParticleRenderer()
bool getVertexFormatTexture() const
ulong mLightListUpdated
indicator if we need update light list
virtual SortMode _getSortMode(void) const override
void setRenderQueueGroupAndPriority(Ogre::uint8, Ogre::ushort)
void setVertexFormatColour(bool bUse)
Vector2 mDefaultParticleSize
other informations