nngn
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
v
w
z
Typedefs
a
d
f
h
i
m
s
t
u
v
w
z
Enumerations
Enumerator
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
k
m
o
p
q
r
s
t
u
v
Enumerations
a
b
c
d
e
f
l
m
o
p
r
s
t
Enumerator
a
b
c
d
e
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Typedefs
Enumerations
Macros
c
d
e
f
g
l
n
p
s
t
x
▼
nngn
Documentation
►
Building
►
Namespaces
►
Concepts
►
Classes
▼
Files
▼
File List
►
demos
►
maps
▼
src
►
audio
►
collision
►
compute
►
font
►
glsl
►
graphics
►
input
►
lson
►
lua
▼
math
►
camera.cpp
►
camera.h
►
hash.h
►
lua_camera.cpp
►
lua_math.cpp
►
lua_vector.cpp
►
lua_vector.h
mat.cpp
►
mat.h
mat3.cpp
►
mat3.h
mat4.cpp
►
mat4.h
math.cpp
►
math.h
vec.cpp
►
vec.h
►
vec2.h
►
vec3.h
►
vec4.h
►
os
►
render
►
timing
►
utils
►
const.h
►
debug.h
►
entity.cpp
►
entity.h
lua_entity.cpp
►
main.cpp
►
tests
►
tools
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Concepts
Loading...
Searching...
No Matches
mat3.h
Go to the documentation of this file.
1
#ifndef NNGN_MATH_MAT3_H
2
#define NNGN_MATH_MAT3_H
3
4
#include <type_traits>
5
6
#include "
mat.h
"
7
#include "
vec3.h
"
8
9
namespace
nngn
{
10
11
template
<
typename
T>
12
struct
mat3_base
:
mat
<mat3_base, T, 3> {
13
constexpr
mat3_base
(
void
) =
default
;
14
explicit
constexpr
mat3_base
(
T
diag);
15
constexpr
mat3_base
(
vec3
col0,
vec3
col1,
vec3
col2);
16
constexpr
mat3_base
(
17
T
v0,
T
v1,
T
v2,
18
T
v3,
T
v4,
T
v5,
19
T
v6,
T
v7,
T
v8);
20
};
12
struct
mat3_base
:
mat
<mat3_base, T, 3> {
…
};
21
22
template
<
typename
T>
23
inline
constexpr
mat3_base<T>::mat3_base
(
T
diag) {
24
this->
m
= {
25
diag, 0, 0,
26
0, diag, 0,
27
0, 0, diag,
28
};
29
}
23
inline
constexpr
mat3_base<T>::mat3_base
(
T
diag) {
…
}
30
31
template
<
typename
T>
32
inline
constexpr
mat3_base<T>::mat3_base
(
vec3
col0,
vec3
col1,
vec3
col2) {
33
this->
m
= {
34
col0[0], col0[1], col0[2],
35
col1[0], col1[1], col1[2],
36
col2[0], col2[1], col2[2],
37
};
38
}
32
inline
constexpr
mat3_base<T>::mat3_base
(
vec3
col0,
vec3
col1,
vec3
col2) {
…
}
39
40
template
<
typename
T>
41
inline
constexpr
mat3_base<T>::mat3_base
(
42
T
v0,
T
v1,
T
v2,
43
T
v3,
T
v4,
T
v5,
44
T
v6,
T
v7,
T
v8)
45
{
46
this->
m
= {v0, v1, v2, v3, v4, v5, v6, v7, v8};
47
}
41
inline
constexpr
mat3_base<T>::mat3_base
( {
…
}
48
49
using
imat3
=
mat3_base<int32_t>
;
50
using
umat3
=
mat3_base<uint32_t>
;
51
using
mat3
=
mat3_base<float>
;
52
using
dmat3
=
mat3_base<double>
;
53
54
}
55
56
#endif
T
#define T(f0, f1, f2)
mat.h
nngn
Definition
audio.cpp:7
m
local m
Definition
input.lua:28
nngn::mat3_base
Definition
mat3.h:12
nngn::mat3_base::mat3_base
constexpr mat3_base(void)=default
nngn::mat
Definition
mat.h:11
nngn::vec3_base< float >
vec3.h
src
math
mat3.h
Generated by
1.11.0