Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
part_emt.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program 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** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19/***************************************************************************
20 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
21 ***************************************************************************
22 * *
23 * Project Name : G *
24 * *
25 * $Archive:: /VSS_Sync/ww3d2/part_emt.h $*
26 * *
27 * $Author:: Vss_sync $*
28 * *
29 * $Modtime:: 8/29/01 7:29p $*
30 * *
31 * $Revision:: 10 $*
32 * *
33 *-------------------------------------------------------------------------*
34 * Functions: *
35 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
36#if defined(_MSC_VER)
37#pragma once
38#endif
39
40#ifndef PART_EMT_H
41#define PART_EMT_H
42
43#include "rendobj.h"
44#include "random.h"
45#include "part_buf.h"
46#include "quat.h"
47#include "w3d_file.h"
48#include "w3derr.h"
49#include "v3_rnd.h"
50
51// Forward declarations
53class ChunkSaveClass;
55
56/*
57** Properties / Keyframes: These are for properties of the particles which
58** are a straight function of their age, such as color and size. These are
59** typically defined by a series of "keyframes", which are property / age
60** pairs. Linear interpolation is performed between the keyframes.
61*/
62template<class T> struct ParticlePropertyStruct {
65 unsigned int NumKeyFrames;
66 float * KeyTimes;
67 T * Values;
68};
69
70
71/*
72** Utility function for copying the contents of one keyframe struct into another.
73*/
74template<class T> __inline
76(
79)
80{
81 dest.Start = src.Start;
82 dest.Rand = src.Rand;
83 dest.NumKeyFrames = src.NumKeyFrames;
84 dest.KeyTimes = NULL;
85 dest.Values = NULL;
86
87 if (dest.NumKeyFrames > 0) {
88 dest.KeyTimes = W3DNEWARRAY float[dest.NumKeyFrames];
89 dest.Values = W3DNEWARRAY T[dest.NumKeyFrames];
90 ::memcpy (dest.KeyTimes, src.KeyTimes, sizeof (float) * dest.NumKeyFrames);
91 ::memcpy (dest.Values, src.Values, sizeof (T) * dest.NumKeyFrames);
92 }
93
94 return ;
95}
96
97
107{
108 public:
109
110 // Note: all time/velocity/acceleration quantities use seconds (converted to ms internally)
111 ParticleEmitterClass(float emit_rate, unsigned int burst_size, Vector3Randomizer *pos_rnd,
112 Vector3 base_vel, Vector3Randomizer *vel_rnd, float out_vel, float vel_inherit_factor,
116 ParticlePropertyStruct<float> &rotation, float orient_rnd,
119 Vector3 accel, float max_age, float future_start, TextureClass *tex,
121 int max_particles = 0, int max_buffer_size = -1, bool pingpong = false,
123 int frame_mode = W3D_EMITTER_FRAME_MODE_1x1,
124 const W3dEmitterLinePropertiesStruct * line_props = NULL);
125
128 virtual ~ParticleEmitterClass(void);
129
130 // Creation/serialization methods
131 virtual RenderObjClass * Clone(void) const;
134 WW3DErrorType Save (ChunkSaveClass &chunk_save) const;
135
136 // Identification methods
137 virtual int Class_ID (void) const { return CLASSID_PARTICLEEMITTER; }
138 virtual const char * Get_Name (void) const { return NameString; }
139 virtual void Set_Name (const char *pname);
140
141 virtual void Notify_Added(SceneClass * scene);
142 virtual void Notify_Removed(SceneClass * scene);
143
144 // Update particle state and draw the particles.
145 virtual void Render(RenderInfoClass & rinfo) { }
146 virtual void Restart(void);
147
148 // Scales the size of all particles and effects positions/velocities of
149 // particles emitted after the Scale() call (but not before)
150 virtual void Scale(float scale);
151
152 // Put particle buffer in scene if this is the first time (clunky code
153 // - hopefully can be rewritten more cleanly in future)...
154 virtual void On_Frame_Update(void);
155
156 virtual void Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const { sphere.Center.Set(0,0,0); sphere.Radius = 0; }
157 virtual void Get_Obj_Space_Bounding_Box(AABoxClass & box) const { box.Center.Set(0,0,0); box.Extent.Set(0,0,0); }
158 virtual void Set_Hidden(int onoff) { RenderObjClass::Set_Hidden (onoff); Update_On_Visibilty (); }
159 virtual void Set_Visible(int onoff) { RenderObjClass::Set_Visible (onoff); Update_On_Visibilty (); }
162
163 virtual void Set_LOD_Bias(float bias) { if (Buffer) Buffer->Set_LOD_Bias(bias); }
164
165
166 // These are not part of the renderobject interface:
167 // You can use Reset() to re-cycle a particle emitter. Make sure its transform is
168 // set up before you call Reset().
169 void Reset(void);
170 void Start(void);
171 void Stop(void);
172 bool Is_Stopped(void);
173
174 // Yet another way to make an emitter stop rendering (besides setting Hidden or Animation_Hidden).
175 // We added this because we needed a way independent from the other two. This would be appropriate
176 // to set, for example, when setting RINFO_OVERRIDE_ADDITIONAL_PASSES_ONLY on the container.
177 void Set_Invisible(bool onoff) { IsInvisible = onoff; }
178 bool Is_Invisible(void) { return IsInvisible; }
179
180 // Change starting position/velocity/acceleration parameters:
183 void Set_Base_Velocity(const Vector3& base_vel);
184 void Set_Outwards_Velocity(float out_vel);
185 void Set_Velocity_Inheritance_Factor(float inh_factor);
186 void Set_Acceleration (const Vector3 &acceleration) { if (Buffer != NULL) Buffer->Set_Acceleration (acceleration/1000000.0f); }
187
188 // Change visual properties of emitter / buffer:
189 void Reset_Colors(ParticlePropertyStruct<Vector3> &new_props) { if (Buffer) Buffer->Reset_Colors(new_props); }
190 void Reset_Opacity(ParticlePropertyStruct<float> &new_props) { if (Buffer) Buffer->Reset_Opacity(new_props); }
191 void Reset_Size(ParticlePropertyStruct<float> &new_props) { if (Buffer) Buffer->Reset_Size(new_props); }
192 void Reset_Rotations(ParticlePropertyStruct<float> &new_props, float orient_rnd) { if (Buffer) Buffer->Reset_Rotations(new_props, orient_rnd); }
193 void Reset_Frames(ParticlePropertyStruct<float> &new_props) { if (Buffer) Buffer->Reset_Frames(new_props); }
194 void Reset_Blur_Times(ParticlePropertyStruct<float> &new_props) { if (Buffer) Buffer->Reset_Blur_Times(new_props); }
195
196 // Change emission/burst rate, or tell the emitter to emit a one-time burst.
197 // NOTE: default buffer size fits the emission/burst rate that the emitter was created with.
198 // Setting the rates too high will cause particles to be prematurely killed (to make space
199 // for new ones) - setting it too low will cause wasted space in the particle buffer.
200 // These problems can be avoided by specifying the desired buffer size in the emitter CTor.
201 void Set_Emission_Rate (float rate) { EmitRate = rate > 0.0f ? (unsigned int)(1000.0f / rate) : 1000U; }
202 void Set_Burst_Size (int size) { BurstSize = size != 0 ? size : 1; }
203 void Set_One_Time_Burst(int size) { OneTimeBurstSize = size != 0 ? size : 1; OneTimeBurst = true; }
204
205 // Emit particles (put in particle buffer). This is called by the
206 // particle buffer On_Frame_Update() function to avoid order dependence.
207 virtual void Emit(void);
208
209 // Buffer control
210 ParticleBufferClass *Peek_Buffer( void ) { return Buffer; }
211 void Buffer_Scene_Not_Needed( void ) { BufferSceneNeeded = false; }
212 void Remove_Buffer_From_Scene (void) { Buffer->Remove (); FirstTime = true; BufferSceneNeeded = true; }
213
214 // from RenderObj...
215 virtual bool Is_Complete(void) { return IsComplete; }
216
217 // Auto deletion behavior controls
218 bool Is_Remove_On_Complete_Enabled(void) { return RemoveOnComplete; }
219 void Enable_Remove_On_Complete(bool onoff) { RemoveOnComplete = onoff; }
220 static bool Default_Remove_On_Complete (void) { return DefaultRemoveOnComplete; }
221 static void Set_Default_Remove_On_Complete (bool onoff) { DefaultRemoveOnComplete = onoff; }
222
223 //
224 // Virtual accessors (used for type specific information)
225 //
226 virtual int Get_User_Type (void) const { return EMITTER_TYPEID_DEFAULT; }
227 virtual const char * Get_User_String (void) const { return NULL; }
228
229 //
230 // Inline accessors.
231 // These methods are provided as a means to get the emitter's settings.
232 //
233 int Get_Render_Mode (void) const { return Buffer->Get_Render_Mode(); }
234 int Get_Frame_Mode (void) const { return Buffer->Get_Frame_Mode(); }
235 float Get_Particle_Size (void) const { return Buffer->Get_Particle_Size(); }
236 Vector3 Get_Acceleration (void) const { return Buffer->Get_Acceleration (); }
237 float Get_Lifetime (void) const { return Buffer->Get_Lifetime (); }
238 float Get_Future_Start_Time (void) const { return Buffer->Get_Future_Start_Time(); }
239 Vector3 Get_End_Color (void) const { return Buffer->Get_End_Color (); }
240 float Get_End_Opacity (void) const { return Buffer->Get_End_Opacity (); }
241 TextureClass * Get_Texture (void) const { return Buffer->Get_Texture (); }
242 void Set_Texture (TextureClass *tex) { Buffer->Set_Texture(tex); }
243 float Get_Fade_Time (void) const { return Buffer->Get_Fade_Time (); }
244 Vector3 Get_Start_Color (void) const { return Buffer->Get_Start_Color(); }
245 float Get_Start_Opacity (void) const { return Buffer->Get_Start_Opacity(); }
246 float Get_Position_Random (void) const { return PosRand ? PosRand->Get_Maximum_Extent() : 0.0f; }
247 //float Get_Velocity_Random (void) const { return VelRand ? (VelRand->Get_Maximum_Extent() * 1000.0f) : 0.0f; }
248 float Get_Emission_Rate (void) const { return 1000.0f / float(EmitRate); }
249 int Get_Burst_Size (void) const { return BurstSize; }
250 int Get_Max_Particles (void) const { return MaxParticles; }
251 Vector3 Get_Start_Velocity (void) const { return BaseVel * 1000.0F; }
254 float Get_Outwards_Vel (void) const { return OutwardVel * 1000.0F; }
255 float Get_Velocity_Inherit (void) const{ return VelInheritFactor; }
256 ShaderClass Get_Shader (void) const { return Buffer->Get_Shader (); }
257
258 // Note: Caller IS RESPONSIBLE for freeing any memory allocated by these calls
259 void Get_Color_Key_Frames (ParticlePropertyStruct<Vector3> &colors) const { Buffer->Get_Color_Key_Frames (colors); }
260 void Get_Opacity_Key_Frames (ParticlePropertyStruct<float> &opacities) const { Buffer->Get_Opacity_Key_Frames (opacities); }
261 void Get_Size_Key_Frames (ParticlePropertyStruct<float> &sizes) const { Buffer->Get_Size_Key_Frames (sizes); }
262 void Get_Rotation_Key_Frames (ParticlePropertyStruct<float> &rotations) const { Buffer->Get_Rotation_Key_Frames (rotations); }
263 void Get_Frame_Key_Frames (ParticlePropertyStruct<float> &frames) const { Buffer->Get_Frame_Key_Frames (frames); }
264 void Get_Blur_Time_Key_Frames (ParticlePropertyStruct<float> &blurtimes) const { Buffer->Get_Blur_Time_Key_Frames (blurtimes); }
265 float Get_Initial_Orientation_Random (void) const { return Buffer->Get_Initial_Orientation_Random(); }
266
267 // Line rendering accessors
268 int Get_Line_Texture_Mapping_Mode(void) const { return Buffer->Get_Line_Texture_Mapping_Mode(); }
269 int Is_Merge_Intersections(void) const { return Buffer->Is_Merge_Intersections(); }
270 int Is_Freeze_Random(void) const { return Buffer->Is_Freeze_Random(); }
271 int Is_Sorting_Disabled(void) const { return Buffer->Is_Sorting_Disabled(); }
272 int Are_End_Caps_Enabled(void) const { return Buffer->Are_End_Caps_Enabled(); }
273 int Get_Subdivision_Level(void) const { return Buffer->Get_Subdivision_Level(); }
274 float Get_Noise_Amplitude(void) const { return Buffer->Get_Noise_Amplitude(); }
275 float Get_Merge_Abort_Factor(void) const { return Buffer->Get_Merge_Abort_Factor(); }
276 float Get_Texture_Tile_Factor(void) const { return Buffer->Get_Texture_Tile_Factor(); }
277 Vector2 Get_UV_Offset_Rate(void) const { return Buffer->Get_UV_Offset_Rate(); }
278
279 // Global debugging option for disabling all particle emission
280#ifdef WWDEBUG
281 static void Disable_All_Emitters(bool onoff) { DebugDisable = onoff; }
282 static bool Are_Emitters_Disabled(void) { return DebugDisable; }
283#endif
284
285 protected:
286
287 // Used to build a list of filenames this emitter is dependent on
288 virtual void Add_Dependencies_To_List (DynamicVectorClass<StringClass> &file_list, bool textures_only = false);
289
290 // This method is called each time the visiblity state of the emitter changes.
291 virtual void Update_On_Visibilty (void);
292
293 private:
294
295 // Collision sphere is a point - emitter emits also when not visible,
296 // so this is only important to avoid affecting the collision spheres
297 // of heirarchy objects into which the emitter is inserted.
298 virtual void Update_Cached_Bounding_Volumes(void) const;
299
300 // Create new particles and pass them to the particle buffer. Receives
301 // the end-of-interval quaternion and origin and interpolates between
302 // them and PrevQ/PrevOrig to get the transform to apply to each
303 // particle's position and velocity as it is created. New particles are
304 // placed into a circular queue for processing by the particle buffer.
305 void Create_New_Particles(const Quaternion & curr_quat, const Vector3 & curr_orig);
306
307 // Initialize one new particle at the given NewParticleStruct
308 // address, with the given age and emitter transform (expressed as a
309 // quaternion and origin vector). (must check if address is NULL).
310 void Initialize_Particle(NewParticleStruct * newpart, unsigned int age,
311 const Quaternion & quat, const Vector3 & orig);
312
313 unsigned int EmitRate; // Emission rate (1/milliseconds).
314 unsigned int BurstSize; // Burst size (how many particles in each emission).
315 unsigned int OneTimeBurstSize; // Burst size for a one-time burst.
316 bool OneTimeBurst; // Do we need to do a one-time burst?
317 Vector3Randomizer * PosRand; // Position randomizer pointer (may be NULL).
318 Vector3 BaseVel; // Base initial emission velocity.
319 Vector3Randomizer * VelRand; // Velocity randomizer pointer (may be NULL).
320 float OutwardVel; // Size of outwards velocity.
321 float VelInheritFactor; // Affects emitter vel. inherited by particles.
322 unsigned int EmitRemain; // Millisecond emitter remainder.
323 Quaternion PrevQ; // Previous quaternion (for interpolation).
324 Vector3 PrevOrig; // Previous origin (for interpolation).
325 bool Active; // Is the emitter currently Active?
326 bool FirstTime; // Has it been rendered before?
327 bool BufferSceneNeeded;// Does the buffer need a scene?
328 int ParticlesLeft; // Particles left to emit
329 int MaxParticles; // Total particles to emit
330 bool IsComplete; // Completed Emissions
331 char * NameString;
332 char * UserString;
333 bool RemoveOnComplete; // Should this emitter destroy itself when it completes?
334 bool IsInScene;
335 unsigned char GroupID; // The group ID of a particle. A start causes the group ID to increment.
336
337 // This pointer is used only for sending new particles to the particle
338 // buffer and for informing the buffer when the emitter is destroyed.
339 ParticleBufferClass * Buffer;
340
341 // See comments on Set/Is_Invisible
342 bool IsInvisible;
343
344 // This is used to set the global behavior of emitters...
345 // Should they be removed from the scene when they complete their
346 // emissions, or should they stay in the scene. (For editing purposes)
347 static bool DefaultRemoveOnComplete;
348
349 // This setting is used in debug and profile builds to disable
350 // all particle emitters.
351 static bool DebugDisable;
352};
353
354#endif // PART_EMT_H
355
356
#define NULL
Definition BaseType.h:92
Color scale(const Color &a, const Color &b)
Definition GameMtl.cpp:722
#define W3D_EMITTER_FRAME_MODE_1x1
Definition w3d_file.h:1819
#define W3D_EMITTER_RENDER_MODE_TRI_PARTICLES
Definition w3d_file.h:1813
@ EMITTER_TYPEID_DEFAULT
Definition w3d_file.h:1756
#define W3DNEWARRAY
Definition always.h:110
Vector3 Center
Definition aabox.h:123
Vector3 Extent
Definition aabox.h:124
bool Is_Remove_On_Complete_Enabled(void)
Definition part_emt.h:218
virtual void Notify_Added(SceneClass *scene)
Definition part_emt.cpp:321
int Get_Render_Mode(void) const
Definition part_emt.h:233
void Set_Outwards_Velocity(float out_vel)
Definition part_emt.cpp:502
void Set_Base_Velocity(const Vector3 &base_vel)
Definition part_emt.cpp:496
void Reset_Frames(ParticlePropertyStruct< float > &new_props)
Definition part_emt.h:193
void Reset_Colors(ParticlePropertyStruct< Vector3 > &new_props)
Definition part_emt.h:189
void Enable_Remove_On_Complete(bool onoff)
Definition part_emt.h:219
void Reset_Opacity(ParticlePropertyStruct< float > &new_props)
Definition part_emt.h:190
float Get_Fade_Time(void) const
Definition part_emt.h:243
float Get_Future_Start_Time(void) const
Definition part_emt.h:238
ShaderClass Get_Shader(void) const
Definition part_emt.h:256
static void Set_Default_Remove_On_Complete(bool onoff)
Definition part_emt.h:221
void Get_Rotation_Key_Frames(ParticlePropertyStruct< float > &rotations) const
Definition part_emt.h:262
void Set_Emission_Rate(float rate)
Definition part_emt.h:201
virtual void Set_Hidden(int onoff)
Definition part_emt.h:158
int Get_Line_Texture_Mapping_Mode(void) const
Definition part_emt.h:268
Vector3 Get_End_Color(void) const
Definition part_emt.h:239
virtual void Add_Dependencies_To_List(DynamicVectorClass< StringClass > &file_list, bool textures_only=false)
Definition part_emt.cpp:881
float Get_Texture_Tile_Factor(void) const
Definition part_emt.h:276
TextureClass * Get_Texture(void) const
Definition part_emt.h:241
virtual void Get_Obj_Space_Bounding_Box(AABoxClass &box) const
Definition part_emt.h:157
Vector3 Get_Acceleration(void) const
Definition part_emt.h:236
virtual void Scale(float scale)
Definition part_emt.cpp:343
WW3DErrorType Save(ChunkSaveClass &chunk_save) const
Definition part_emt.cpp:832
void Set_One_Time_Burst(int size)
Definition part_emt.h:203
virtual int Get_User_Type(void) const
Definition part_emt.h:226
virtual void Render(RenderInfoClass &rinfo)
Definition part_emt.h:145
float Get_Velocity_Inherit(void) const
Definition part_emt.h:255
bool Is_Invisible(void)
Definition part_emt.h:178
float Get_Noise_Amplitude(void) const
Definition part_emt.h:274
int Is_Sorting_Disabled(void) const
Definition part_emt.h:271
virtual void Set_Name(const char *pname)
Definition part_emt.cpp:850
static bool Default_Remove_On_Complete(void)
Definition part_emt.h:220
static ParticleEmitterClass * Create_From_Definition(const ParticleEmitterDefClass &definition)
Definition part_emt.cpp:205
void Set_Texture(TextureClass *tex)
Definition part_emt.h:242
int Are_End_Caps_Enabled(void) const
Definition part_emt.h:272
virtual const char * Get_User_String(void) const
Definition part_emt.h:227
virtual void Emit(void)
Definition part_emt.cpp:516
virtual void Set_Animation_Hidden(int onoff)
Definition part_emt.h:160
float Get_Emission_Rate(void) const
Definition part_emt.h:248
float Get_Lifetime(void) const
Definition part_emt.h:237
float Get_End_Opacity(void) const
Definition part_emt.h:240
int Get_Max_Particles(void) const
Definition part_emt.h:250
void Get_Color_Key_Frames(ParticlePropertyStruct< Vector3 > &colors) const
Definition part_emt.h:259
int Get_Frame_Mode(void) const
Definition part_emt.h:234
float Get_Particle_Size(void) const
Definition part_emt.h:235
void Get_Frame_Key_Frames(ParticlePropertyStruct< float > &frames) const
Definition part_emt.h:263
float Get_Start_Opacity(void) const
Definition part_emt.h:245
virtual void Get_Obj_Space_Bounding_Sphere(SphereClass &sphere) const
Definition part_emt.h:156
Vector3 Get_Start_Color(void) const
Definition part_emt.h:244
ParticleBufferClass * Peek_Buffer(void)
Definition part_emt.h:210
int Get_Burst_Size(void) const
Definition part_emt.h:249
int Is_Merge_Intersections(void) const
Definition part_emt.h:269
virtual void Update_On_Visibilty(void)
Definition part_emt.cpp:865
void Reset_Blur_Times(ParticlePropertyStruct< float > &new_props)
Definition part_emt.h:194
void Remove_Buffer_From_Scene(void)
Definition part_emt.h:212
void Buffer_Scene_Not_Needed(void)
Definition part_emt.h:211
void Get_Blur_Time_Key_Frames(ParticlePropertyStruct< float > &blurtimes) const
Definition part_emt.h:264
virtual void Set_Visible(int onoff)
Definition part_emt.h:159
void Set_Invisible(bool onoff)
Definition part_emt.h:177
float Get_Outwards_Vel(void) const
Definition part_emt.h:254
virtual bool Is_Complete(void)
Definition part_emt.h:215
void Get_Opacity_Key_Frames(ParticlePropertyStruct< float > &opacities) const
Definition part_emt.h:260
void Set_Acceleration(const Vector3 &acceleration)
Definition part_emt.h:186
ParticleEmitterDefClass * Build_Definition(void) const
Definition part_emt.cpp:711
float Get_Merge_Abort_Factor(void) const
Definition part_emt.h:275
void Set_Velocity_Inheritance_Factor(float inh_factor)
Definition part_emt.cpp:508
Vector3Randomizer * Get_Velocity_Random(void) const
Definition part_emt.cpp:486
virtual const char * Get_Name(void) const
Definition part_emt.h:138
virtual RenderObjClass * Clone(void) const
Definition part_emt.cpp:310
void Set_Velocity_Randomizer(Vector3Randomizer *rand)
Definition part_emt.cpp:462
ParticleEmitterClass & operator=(const ParticleEmitterClass &)
Definition part_emt.cpp:163
void Set_Position_Randomizer(Vector3Randomizer *rand)
Definition part_emt.cpp:452
float Get_Initial_Orientation_Random(void) const
Definition part_emt.h:265
void Reset_Size(ParticlePropertyStruct< float > &new_props)
Definition part_emt.h:191
Vector3Randomizer * Get_Creation_Volume(void) const
Definition part_emt.cpp:475
void Get_Size_Key_Frames(ParticlePropertyStruct< float > &sizes) const
Definition part_emt.h:261
virtual void Set_Force_Visible(int onoff)
Definition part_emt.h:161
void Reset_Rotations(ParticlePropertyStruct< float > &new_props, float orient_rnd)
Definition part_emt.h:192
virtual void Notify_Removed(SceneClass *scene)
Definition part_emt.cpp:331
int Get_Subdivision_Level(void) const
Definition part_emt.h:273
Vector2 Get_UV_Offset_Rate(void) const
Definition part_emt.h:277
virtual void Set_LOD_Bias(float bias)
Definition part_emt.h:163
float Get_Position_Random(void) const
Definition part_emt.h:246
void Set_Burst_Size(int size)
Definition part_emt.h:202
int Is_Freeze_Random(void) const
Definition part_emt.h:270
virtual ~ParticleEmitterClass(void)
Definition part_emt.cpp:175
bool Is_Stopped(void)
Definition part_emt.cpp:446
Vector3 Get_Start_Velocity(void) const
Definition part_emt.h:251
virtual void On_Frame_Update(void)
Definition part_emt.cpp:357
ParticleEmitterClass(float emit_rate, unsigned int burst_size, Vector3Randomizer *pos_rnd, Vector3 base_vel, Vector3Randomizer *vel_rnd, float out_vel, float vel_inherit_factor, ParticlePropertyStruct< Vector3 > &color, ParticlePropertyStruct< float > &opacity, ParticlePropertyStruct< float > &size, ParticlePropertyStruct< float > &rotation, float orient_rnd, ParticlePropertyStruct< float > &frames, ParticlePropertyStruct< float > &blur_times, Vector3 accel, float max_age, float future_start, TextureClass *tex, ShaderClass shader=ShaderClass::_PresetAdditiveSpriteShader, int max_particles=0, int max_buffer_size=-1, bool pingpong=false, int render_mode=W3D_EMITTER_RENDER_MODE_TRI_PARTICLES, int frame_mode=W3D_EMITTER_FRAME_MODE_1x1, const W3dEmitterLinePropertiesStruct *line_props=NULL)
Definition part_emt.cpp:71
virtual int Class_ID(void) const
Definition part_emt.h:137
virtual void Restart(void)
Definition part_emt.cpp:315
RenderObjClass(void)
Definition rendobj.cpp:170
virtual void Set_Visible(int onoff)
Definition rendobj.h:465
virtual void Set_Hidden(int onoff)
Definition rendobj.h:472
virtual void Set_Force_Visible(int onoff)
Definition rendobj.h:476
@ CLASSID_PARTICLEEMITTER
Definition rendobj.h:214
virtual void Set_Animation_Hidden(int onoff)
Definition rendobj.h:474
static ShaderClass _PresetAdditiveSpriteShader
Definition shader.h:398
float Radius
Definition sphere.h:91
Vector3 Center
Definition sphere.h:90
WWINLINE void Set(float x, float y, float z)
Definition vector3.h:103
__inline void Copy_Emitter_Property_Struct(ParticlePropertyStruct< T > &dest, const ParticlePropertyStruct< T > &src)
Definition part_emt.h:76
else return(RetVal)
unsigned int NumKeyFrames
Definition part_emt.h:65
WW3DErrorType
Definition w3derr.h:51