00001 /* 00002 ----------------------------------------------------------------------------- 00003 This source file is part of OpenSpace3D 00004 For the latest info, see http://www.openspace3d.com 00005 00006 Copyright (c) 2010 I-maginer 00007 00008 This program is free software; you can redistribute it and/or modify it under 00009 the terms of the GNU Lesser General Public License as published by the Free Software 00010 Foundation; either version 2 of the License, or (at your option) any later 00011 version. 00012 00013 This program is distributed in the hope that it will be useful, but WITHOUT 00014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00015 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public License along with 00018 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00019 Place - Suite 330, Boston, MA 02111-1307, USA, or go to 00020 http://www.gnu.org/copyleft/lesser.txt 00021 00022 You may alternatively use this source under the terms of a specific version of 00023 the OpenSpace3D Unrestricted License provided you have obtained such a license from 00024 I-maginer. 00025 ----------------------------------------------------------------------------- 00026 */ 00027 00036 #pragma once 00037 #ifndef __SO3PARTICLESYSTEM_H__ 00038 #define __SO3PARTICLESYSTEM_H__ 00039 00040 #include "../SCOLBasic/SO3Std.h" 00041 #include "../SO3SceneGraph/SO3NodeScol.h" 00042 00043 namespace SO3 00044 { 00045 00046 class SParticleSystem : public SNode 00047 { 00048 public: 00049 protected: 00050 Ogre::ParticleSystem* O3ParticleSystem; 00051 string templateName; 00052 float speedFactor; 00053 bool isEnable; 00054 bool isPaused; 00055 private: 00056 00057 public: 00060 SParticleSystem(SScene* parent, std::string particleSystemName, std::string particleTemplateName); 00061 00064 ~SParticleSystem(); 00065 00068 Ogre::ParticleSystem* GetOgreParticleSystem(); 00069 00073 virtual void SetRenderingDistance(float distance); 00074 00078 virtual float GetRenderingDistance(); 00079 00083 virtual void SetScale(Ogre::Vector3 scale); 00084 00087 std::string GetParticleTemplateName(); 00088 00091 void SetSpeed(float speed); 00092 00095 float GetSpeed(); 00096 00099 void SetEnable(bool enable); 00100 00103 bool GetEnable(); 00104 00107 void SetPaused(bool pause); 00108 00111 bool GetPaused(); 00112 00115 void ClearParticles(); 00116 protected: 00117 private: 00121 SParticleSystem(); 00122 }; 00123 00124 } 00125 00126 #endif
1.6.3