source: OGRE/trunk/ogrenew/PlugIns/ParticleFX/include/OgreHollowEllipsoidEmitter.h @ 692

Revision 692, 4.9 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4    (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright ) 2002 Tels <http://bloodgate.com> based on BoxEmitter
8Also see acknowledgements in Readme.html
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://www.gnu.org/copyleft/lesser.txt.
23-----------------------------------------------------------------------------
24*/
25#ifndef __HollowEllipsoidEmitter_H__
26#define __HollowEllipsoidEmitter_H__
27
28#include "OgreParticleFXPrerequisites.h"
29#include "OgreEllipsoidEmitter.h"
30
31namespace Ogre {
32
33    /** Particle emitter which emits particles randomly from points inside a hollow ellipsoid.
34    @remarks
35        This particle emitter emits particles from a hollow ellipsoid area.
36        The initial direction of these particles can either be a single
37        direction (i.e. a line), a random scattering inside a cone, or a random
38        scattering in all directions, depending the 'angle' parameter, which
39        is the angle across which to scatter the particles either side of the
40        base direction of the emitter.
41    */
42    class _OgreParticleFXExport HollowEllipsoidEmitter : public EllipsoidEmitter
43    {
44    public:
45        /** Command object for inner size (see ParamCommand).*/
46        class CmdInnerX : public ParamCommand
47        {
48        public:
49            String doGet(const void* target) const;
50            void doSet(void* target, const String& val);
51        };
52        /** Command object for inner size (see ParamCommand).*/
53        class CmdInnerY : public ParamCommand
54        {
55        public:
56            String doGet(const void* target) const;
57            void doSet(void* target, const String& val);
58        };
59        /** Command object for inner size (see ParamCommand).*/
60        class CmdInnerZ : public ParamCommand
61        {
62        public:
63            String doGet(const void* target) const;
64            void doSet(void* target, const String& val);
65        };
66        // See AreaEmitter
67
68        HollowEllipsoidEmitter(ParticleSystem* psys);
69
70        /** See ParticleEmitter. */
71        void _initParticle(Particle* pParticle);
72
73        /** Sets the size of the clear space inside the area from where NO particles are emitted.
74        @param x,y,z
75            Parametric values describing the proportion of the shape which is hollow in each direction.
76            E.g. 0 is solid, 0.5 is half-hollow etc
77        */
78        void setInnerSize(Real x, Real y, Real z);
79
80        /** Sets the x component of the area inside the ellipsoid which doesn't emit particles.
81        @param x
82            Parametric value describing the proportion of the shape which is hollow in this direction.
83            E.g. 0 is solid, 0.5 is half-hollow etc
84        */
85        void setInnerSizeX(Real x);
86        /** Sets the y component of the area inside the ellipsoid which doesn't emit particles.
87        @param y
88            Parametric value describing the proportion of the shape which is hollow in this direction.
89            E.g. 0 is solid, 0.5 is half-hollow etc
90        */
91        void setInnerSizeY(Real y);
92        /** Sets the z component of the area inside the ellipsoid which doesn't emit particles.
93        @param z
94            Parametric value describing the proportion of the shape which is hollow in this direction.
95            E.g. 0 is solid, 0.5 is half-hollow etc
96        */
97        void setInnerSizeZ(Real z);
98        /** Gets the x component of the area inside the ellipsoid which doesn't emit particles. */
99        Real getInnerSizeX(void) const;
100        /** Gets the y component of the area inside the ellipsoid which doesn't emit particles. */
101        Real getInnerSizeY(void) const;
102        /** Gets the z component of the area inside the ellipsoid which doesn't emit particles. */
103        Real getInnerSizeZ(void) const;
104
105    protected:
106        // See ParticleEmitter
107
108        /// Size of 'clear' center area (> 0 and < 1.0)
109        Vector3 mInnerSize;
110
111        static CmdInnerX msCmdInnerX;
112        static CmdInnerY msCmdInnerY;
113        static CmdInnerZ msCmdInnerZ;
114
115
116
117    };
118
119}
120
121#endif
122
Note: See TracBrowser for help on using the repository browser.