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
vec.h
Go to the documentation of this file.
1
#ifndef _3DMANIP_H_
2
#define _3DMANIP_H_
3
#include "config.h"
//for Solaris
4
#include "
macosx_math.h
"
5
#include <math.h>
6
7
#ifdef SOLARIS
8
extern
float
__sqrtf(
float
);
9
extern
float
__cosf(
float
);
10
extern
float
__sinf(
float
);
11
extern
float
__tanf(
float
);
12
#define sqrtf __sqrtf
13
#define cosf __cosf
14
#define sinf __sinf
15
#define tanf __tanf
16
#endif
17
18
#include "
endianness.h
"
19
20
#define QFLOAT float
21
#define NetSwap VSSwapHostFloatToLittle
22
#define XSQRT sqrtf
23
#define XVector Vector
24
#define YVector QVector
25
#include "
xvector.h
"
26
#undef NetSwap
27
#undef QFLOAT
28
#undef XVector
29
#undef YVector
30
#undef XSQRT
31
32
#define QFLOAT double
33
#define NetSwap VSSwapHostDoubleToLittle
34
#define XSQRT sqrt
35
#define XVector QVector
36
#define YVector Vector
37
#include "
xvector.h
"
38
#undef XSQRT
39
#undef NetSwap
40
#undef QFLOAT
41
#undef XVector
42
#undef YVector
43
44
inline
Vector
QVector::operator=(
const
Vector
&
a
)
45
{
46
i
= a.i;
47
j
= a.j;
48
k
= a.k;
49
return
a
;
50
}
51
52
inline
QVector::QVector
(
const
Vector
&
a
)
53
{
54
i
= a.i;
55
j
= a.j;
56
k
= a.k;
57
}
58
59
inline
QVector
Vector::operator=(
const
QVector
&
a
)
60
{
61
i
= a.i;
62
j
= a.j;
63
k
= a.k;
64
return
a
;
65
}
66
67
inline
Vector::Vector
(
const
QVector
&
a
)
68
{
69
i
= a.i;
70
j
= a.j;
71
k
= a.k;
72
}
73
74
inline
QVector
Vector::Cast()
const
75
{
76
return
QVector
( i, j, k );
77
}
78
79
inline
Vector
QVector::Cast()
const
80
{
81
return
Vector
( i, j, k );
82
}
83
84
#endif
85
src
gfx
vec.h
Generated on Fri May 29 2015 23:07:29 for Vegastrike 0.5.1 rc1 by
1.8.4