V-Gears 0
Free Final Fantasy VII engine.
ParticleRenderer.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The V-Gears Team
3 *
4 * This file is part of V-Gears
5 *
6 * V-Gears is free software: you can redistribute it and/or modify it under
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, version 3.0 (GPLv3) of the License.
9 *
10 * V-Gears is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#pragma once
17
18#include <OgreString.h>
19#include <OgreStringInterface.h>
20#include "ParticlePool.h"
21
23class VisualParticle;
24
28class ParticleRenderer : public Ogre::StringInterface{
29
30 public:
31
36
40 virtual ~ParticleRenderer();
41
47 virtual void CopyAttributesTo(ParticleRenderer* renderer);
48
55 void SetRendererInitialised(bool renderer_initialised);
56
62 bool IsRendererInitialised() const;
63
69 void SetRendererType(Ogre::String renderer_type);
70
76 const Ogre::String& GetRendererType() const;
77
83 void SetParentTechnique(ParticleTechnique* parent_technique);
84
91
98 virtual void SetVisible(bool visible = true) = 0;
99
103 virtual void Initialize() = 0;
104
111 virtual void UpdateRenderQueue(
112 Ogre::RenderQueue* queue,
114 ) = 0;
115
116 protected:
117
122
127
132};
A particle renderer.
Definition: ParticleRenderer.h:28
ParticleRenderer()
Constructor.
Definition: ParticleRenderer.cpp:18
virtual ~ParticleRenderer()
Destructor.
Definition: ParticleRenderer.cpp:23
const Ogre::String & GetRendererType() const
Retrieves the renderer type.
Definition: ParticleRenderer.cpp:39
const ParticleTechnique * GetParentTechnique() const
Sets the renderer particle technique.
Definition: ParticleRenderer.cpp:47
ParticleTechnique * parent_technique_
The renderer particle tchnique.
Definition: ParticleRenderer.h:131
virtual void CopyAttributesTo(ParticleRenderer *renderer)
Copies the renderer attributes to other renderer.
Definition: ParticleRenderer.cpp:25
void SetRendererType(Ogre::String renderer_type)
Sets the renderer type.
Definition: ParticleRenderer.cpp:35
virtual void Initialize()=0
Initializes the renderer.
bool renderer_initialized_
Indicates if the renderer has been initialized.
Definition: ParticleRenderer.h:121
virtual void SetVisible(bool visible=true)=0
Toggles the visibility of the particle renderer.
Ogre::String renderer_type_
The type of renderer.
Definition: ParticleRenderer.h:126
void SetParentTechnique(ParticleTechnique *parent_technique)
Sets the renderer parent technique.
Definition: ParticleRenderer.cpp:43
bool IsRendererInitialised() const
Checks the renderer initialization status.
Definition: ParticleRenderer.cpp:31
virtual void UpdateRenderQueue(Ogre::RenderQueue *queue, ParticlePool< VisualParticle > &pool)=0
Adds the particle to the scene render queue.
void SetRendererInitialised(bool renderer_initialised)
Toggles renderer initialization state.
Definition: ParticleRenderer.cpp:27
A particle technique.
Definition: ParticleTechnique.h:28
A visual particle.
Definition: ParticleVisual.h:23
Ogre::String String
Definition: TypeDefine.h:37