Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Particles.h
Go to the documentation of this file.
1
/* Project nGenEx
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: nGenEx.lib
6
FILE: Particles.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Particle burst class
13
*/
14
15
#ifndef Particles_h
16
#define Particles_h
17
18
#include "
Types.h
"
19
#include "
Geometry.h
"
20
#include "
Graphic.h
"
21
#include "
Sprite.h
"
22
23
// +--------------------------------------------------------------------+
24
25
class
Particles
:
public
Graphic
26
{
27
public
:
28
Particles
(
Bitmap
* bitmap,
29
int
np,
30
const
Vec3
& base_loc,
31
const
Vec3
& vel,
32
float
base_speed
= 500.0f,
33
float
drag
= 1.0f,
34
float
scale
= 1.0f,
35
float
bloom = 0.0f,
36
float
decay
= 100.0f,
37
float
release
= 1.0f,
38
bool
cont =
false
,
39
bool
trail =
true
,
40
bool
rise =
false
,
41
int
blend
= 3,
42
int
nframes = 1);
43
44
virtual
~Particles
();
45
46
virtual
void
Render
(
Video
* video, DWORD flags);
47
virtual
void
ExecFrame
(
double
seconds);
48
virtual
void
TranslateBy
(
const
Point
& ref) {
offset
= ref;
loc
=
loc
- ref; }
49
virtual
bool
CheckVisibility
(
Projector
& projector);
50
51
virtual
bool
IsEmitting
()
const
{
return
emitting
; }
52
virtual
void
StopEmitting
() {
emitting
=
false
; }
53
54
protected
:
55
int
nparts
;
56
int
nverts
;
57
int
blend
;
58
bool
continuous
;
59
bool
trailing
;
60
bool
rising
;
61
bool
emitting
;
62
63
float
base_speed
;
64
float
max_speed
;
65
float
drag
;
66
float
release_rate
;
67
float
decay
;
68
float
min_scale
;
69
float
max_scale
;
70
float
extra
;
71
72
Point
ref_loc
;
73
Point
offset
;
74
Point
*
velocity
;
75
Point
*
part_loc
;
76
Point
*
release
;
77
float
*
timestamp
;
78
float
*
intensity
;
79
float
*
scale
;
80
float
*
angle
;
81
BYTE*
frame
;
82
83
Sprite
*
point_sprite
;
84
};
85
86
#endif Particles_h
nGenEx
Particles.h
Generated on Tue Jun 5 2012 20:46:25 for Starshatter_Open by
1.8.1