altEngine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
vector.h
Go to the documentation of this file.
1
#ifndef VECTOR_H
2
#define VECTOR_H
3
4
class
vec4
5
{
6
public
:
7
vec4
();
8
vec4
(
float
x
,
float
y
,
float
z
,
float
w
);
9
10
float
magnitude
();
11
vec4
&
normalize
();
12
13
vec4
&
operator*=
(
const
float
scalar);
14
vec4
&
operator+=
(
const
vec4
&vec);
15
vec4
&
operator+=
(
const
float
scalar);
16
17
float
x
;
18
float
y
;
19
float
z
;
20
float
w
;
21
};
22
23
class
vec3
24
{
25
public
:
26
vec3
();
27
vec3
(
float
x
,
float
y
,
float
z
);
28
vec3
(
vec4
vector
);
29
vec3
&
normalize
();
30
float
magnitude
();
31
32
vec3
&
operator=
(
const
vec3
&vector);
33
bool
operator==
(
const
vec3
&vector);
34
vec3
operator+
(
const
vec3
&vector)
const
;
35
vec3
operator-
(
const
vec3
&vector)
const
;
36
vec3
operator-
()
const
;
37
float
operator*
(
const
vec3
&vector)
const
;
38
float
operator/
(
const
vec3
&vector);
39
vec3
operator*
(
const
float
scalar)
const
;
40
vec3
operator/
(
const
float
scalar);
41
vec3
&
operator+=
(
const
vec3
&vec);
42
vec3
&
operator-=
(
const
vec3
&vec);
43
vec3
&
operator*=
(
const
float
scalar);
44
vec3
project
(
const
vec3
&a);
45
46
static
vec3
crossproduct
(
const
vec3
&VecA,
const
vec3
&VecB);
47
48
float
x
;
49
float
y
;
50
float
z
;
51
};
52
53
class
vec2
54
{
55
public
:
56
vec2
();
57
vec2
(
float
x
,
float
y
);
58
vec2
&
operator=
(
const
vec2
&
vector
);
59
vec2
operator+
(
const
vec2
&vector);
60
vec2
operator-
(
const
vec2
&vector);
61
vec2
&
operator*=
(
const
float
scalar);
62
vec2
operator*
(
const
float
scalar)
const
;
63
64
65
vec2
&
normalize
();
66
float
magnitude
();
67
68
float
x
,
y
;
69
};
70
71
#endif
72
Generated on Tue Nov 21 2017 19:18:54 for altEngine by
1.8.2