changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Drawables / Particles / OSGParticles.h
blob35ce83edfdca642fd6ea291eb9e2ae72027783e7
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGPARTICLES_H_
40 #define _OSGPARTICLES_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGParticlesBase.h"
47 OSG_BEGIN_NAMESPACE
49 class DrawEnv;
50 struct ParticlesDrawer;
52 /*! \ingroup GrpDrawablesParticlesObj
53 \ingroup GrpLibOSGDrawables
54 \includebasedoc
56 class OSG_DRAWABLE_DLLMAPPING Particles : public ParticlesBase
58 private:
60 /*========================== PUBLIC =================================*/
62 public:
64 typedef ParticlesBase Inherited;
66 /*---------------------------------------------------------------------*/
67 /*! \name Modes */
68 /*! \{ */
70 enum ModeE
72 Points = 0,
73 Lines,
74 ViewDirQuads,
75 ViewerQuads,
76 Arrows,
77 ViewerArrows,
78 Rectangles,
79 ShaderQuads,
80 ShaderStrips,
81 LastMode
84 enum DrawOrderE
86 Any = 0,
87 BackToFront,
88 FrontToBack
91 /*! \} */
92 /*---------------------------------------------------------------------*/
93 /*! \name Sync */
94 /*! \{ */
96 virtual void changed(ConstFieldMaskArg whichField,
97 UInt32 origin,
98 BitVector detail);
100 /*! \} */
101 /*---------------------------------------------------------------------*/
102 /*! \name Output */
103 /*! \{ */
105 virtual void dump( UInt32 uiIndent = 0,
106 const BitVector bvFlags = 0) const;
108 /*! \} */
109 /*---------------------------------------------------------------------*/
110 /*! \name Draw */
111 /*! \{ */
113 virtual void drawPrimitives(DrawEnv *pEnv);
115 /*! \} */
116 /*---------------------------------------------------------------------*/
117 /*! \name Field Set */
118 /*! \{ */
120 virtual void fill(DrawableStatsAttachment *pStat);
122 /*! \} */
123 /*========================= PROTECTED ===============================*/
125 protected:
127 // Variables should all be in ParticlesBase.
129 /*---------------------------------------------------------------------*/
130 /*! \name Constructors */
131 /*! \{ */
133 Particles(void);
134 Particles(const Particles &source);
136 /*! \} */
137 /*---------------------------------------------------------------------*/
138 /*! \name Destructors */
139 /*! \{ */
141 virtual ~Particles(void);
143 /*! \} */
144 /*---------------------------------------------------------------------*/
145 /*! \name Init */
146 /*! \{ */
148 static void initMethod(InitPhase ePhase);
150 /*! \} */
151 /*---------------------------------------------------------------------*/
152 /*! \name NodeCore Specific */
153 /*! \{ */
155 virtual void adjustVolume(Volume & volume);
157 /*! \} */
158 /*---------------------------------------------------------------------*/
159 /*! \name Particles Specific */
160 /*! \{ */
162 Int32 *calcIndex(DrawEnv *pEnv,
163 UInt32 &len,
164 Int32 *index = NULL);
166 ParticlesDrawer *findDrawer(void);
168 /*! \} */
169 /*========================== PRIVATE ================================*/
171 private:
173 friend class FieldContainer;
174 friend class ParticlesBase;
176 // prohibit default functions (move to 'public' if you need one)
177 void operator =(const Particles &source);
180 typedef Particles *ParticlesP;
182 OSG_END_NAMESPACE
184 #include "OSGParticlesBase.inl"
185 #include "OSGParticles.inl"
187 #endif /* _OSGPARTICLES_H_ */