Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
animation.h
Go to the documentation of this file.
1
/*
2
* Vega Strike
3
* Copyright (C) 2001-2002 Daniel Horn
4
*
5
* http://vegastrike.sourceforge.net/
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
11
*
12
* This program 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 this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
*/
21
22
#ifndef ANIMATION_H
23
24
#define ANIMATION_H
25
26
#include "
lin_time.h
"
27
28
#include "
vec.h
"
29
30
#include <stack>
31
32
#include "
quaternion.h
"
33
34
#include "
ani_texture.h
"
35
36
namespace
VSFileSystem
37
{
38
class
VSFile;
39
};
40
41
class
Animation
:
public
AnimatedTexture
42
{
43
GFXColor
mycolor;
44
45
Matrix
local_transformation;
46
47
float
height;
//half the height so you can do fancy vector translatons to campspace
48
49
float
width;
50
51
unsigned
char
options;
52
53
void
InitAnimation();
54
55
public
:
Animation
();
56
57
Animation
(
VSFileSystem::VSFile
*
f
,
bool
Rep = 0,
float
priority = .1,
enum
FILTER
ismipmapped =
MIPMAP
,
bool
camorient =
58
false
,
bool
appear_near_by_radius =
false
,
const
GFXColor
&col =
GFXColor
( 1, 1, 1,
59
1 ) );
60
Animation
(
const
char
*,
bool
Rep = 0,
float
priority = .1,
enum
FILTER
ismipmapped =
MIPMAP
,
bool
camorient =
false
,
61
bool
appear_near_by_radius =
false
,
const
GFXColor
&col =
GFXColor
( 1, 1, 1,
62
1 ) );
63
64
~Animation
();
65
66
void
Draw
();
67
void
SetFaceCam
(
bool
face );
68
void
SetInterpolate
(
bool
interp );
69
bool
CalculateOrientation
(
Matrix
&result );
70
71
void
DrawNow
(
const
Matrix
&final_orientation );
72
73
void
DrawNoTransform
(
bool
cross =
true
,
bool
blendoption =
false
);
74
75
void
DrawAsVSSprite
(
class
VSSprite
*spr );
76
77
static
void
ProcessDrawQueue
( std::vector< Animation* >&,
float
);
78
79
static
void
ProcessDrawQueue
();
80
81
static
bool
NeedsProcessDrawQueue
();
82
83
static
void
ProcessFarDrawQueue
(
float
);
84
85
static
bool
NeedsProcessFarDrawQueue
();
86
87
void
SetDimensions
(
float
wid,
float
hei );
88
89
void
GetDimensions
(
float
&wid,
float
&hei );
90
91
QVector
Position
();
92
93
void
SetPosition
(
const
QVector
& );
94
95
void
SetOrientation
(
const
Vector
&p,
const
Vector
&
q
,
const
Vector
&r );
96
};
97
98
#endif
99
src
gfx
animation.h
Generated on Fri May 29 2015 23:07:21 for Vegastrike 0.5.1 rc1 by
1.8.4