~ubuntu-branches/debian/sid/astromenace/sid

« back to all changes in this revision

Viewing changes to AstroMenaceSource/Object3D/Explosion/Explosion.h

  • Committer: Package Import Robot
  • Author(s): Boris Pek
  • Date: 2013-04-09 02:04:25 UTC
  • Revision ID: package-import@ubuntu.com-20130409020425-a7fl9xk4diamw6di
Tags: upstream-1.3.1+repack
Import upstream version 1.3.1+repack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/************************************************************************************
 
2
 
 
3
        AstroMenace (Hardcore 3D space shooter with spaceship upgrade possibilities)
 
4
        Copyright © 2006-2012 Michael Kurinnoy, Viewizard
 
5
 
 
6
 
 
7
        AstroMenace is free software: you can redistribute it and/or modify
 
8
        it under the terms of the GNU General Public License as published by
 
9
        the Free Software Foundation, either version 3 of the License, or
 
10
        (at your option) any later version.
 
11
 
 
12
        AstroMenace is distributed in the hope that it will be useful,
 
13
        but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
15
        GNU General Public License for more details.
 
16
 
 
17
        You should have received a copy of the GNU General Public License
 
18
        along with AstroMenace. If not, see <http://www.gnu.org/licenses/>.
 
19
 
 
20
 
 
21
        Web Site: http://www.viewizard.com/
 
22
        Project: http://sourceforge.net/projects/openastromenace/
 
23
        E-mail: viewizard@viewizard.com
 
24
 
 
25
*************************************************************************************/
 
26
 
 
27
 
 
28
#ifndef EXPLOSION_H
 
29
#define EXPLOSION_H
 
30
 
 
31
 
 
32
#include "../Object3D.h"
 
33
#include "../Projectile/Projectile.h"
 
34
 
 
35
 
 
36
 
 
37
 
 
38
 
 
39
//-----------------------------------------------------------------------------
 
40
// Структура CExplosionPiece
 
41
//-----------------------------------------------------------------------------
 
42
struct CExplosionPiece
 
43
{
 
44
        // вектор направления движения частицы (скорости включены)
 
45
        VECTOR3D        Velocity;
 
46
        // оставшееся время жизни частицы
 
47
        float           Life;
 
48
};
 
49
 
 
50
 
 
51
 
 
52
 
 
53
 
 
54
 
 
55
 
 
56
 
 
57
//-----------------------------------------------------------------------------
 
58
// Класс CExplosion
 
59
//-----------------------------------------------------------------------------
 
60
class CExplosion : public CObject3D
 
61
{
 
62
public:
 
63
 
 
64
        // базовые конструктор и деструктор объекта
 
65
        CExplosion();
 
66
        virtual ~CExplosion();
 
67
 
 
68
        // Обновление данных объектa
 
69
        virtual bool    Update(float Time);
 
70
 
 
71
        int             ExplosionType;
 
72
        int             ExplosionTypeByClass;
 
73
 
 
74
 
 
75
        // набор управления частицами
 
76
        CExplosionPiece *ExplosionPieceData;
 
77
 
 
78
 
 
79
        float   ExplosionGeometryMoveLastTime;// последнее время изменения геометрии, нет смысла постоянно менять геометрию, делаем это 30 раз в секунду только
 
80
 
 
81
 
 
82
 
 
83
        VECTOR3D        VelocityOrientation;
 
84
        float           OldSpeed;
 
85
        bool            NeedStop;
 
86
 
 
87
        // скорость изменения AABB
 
88
        float AABBSpeed;
 
89
 
 
90
 
 
91
        // для прорисовки графических эффектов
 
92
        int                                     GraphicFXQuantity;
 
93
        eParticleSystem         **GraphicFX;
 
94
 
 
95
 
 
96
        // для собственного списка
 
97
        CExplosion* Next;
 
98
        CExplosion* Prev;
 
99
};
 
100
 
 
101
 
 
102
 
 
103
 
 
104
 
 
105
 
 
106
 
 
107
 
 
108
 
 
109
//-----------------------------------------------------------------------------
 
110
// Менеджер Explosion, дополнительный
 
111
//-----------------------------------------------------------------------------
 
112
 
 
113
// Включаем в список
 
114
void    AttachExplosion(CExplosion* Explosion);
 
115
// Исключаем из списка
 
116
void    DetachExplosion(CExplosion* Explosion);
 
117
// Проверяем все объекты, обновляем данные
 
118
void    UpdateAllExplosion(float Time);
 
119
// Прорисовываем все объекты
 
120
void    DrawAllExplosion(bool VertexOnlyPass);
 
121
// Удаляем все объекты в списке
 
122
void    ReleaseAllExplosion();
 
123
 
 
124
 
 
125
 
 
126
 
 
127
//-----------------------------------------------------------------------------
 
128
// Дополнительные функции
 
129
//-----------------------------------------------------------------------------
 
130
void SetExplosionGFX(eParticleSystem *ParticleSystem, int GFXNum);
 
131
 
 
132
 
 
133
 
 
134
 
 
135
 
 
136
 
 
137
#endif // EXPLOSION_H