PeriDyno
1.0.0
Loading...
Searching...
No Matches
D:
Peridyno
peridyno
src
Core
Matrix
Transform3x3.inl
Go to the documentation of this file.
1
#include <cmath>
2
#include <limits>
3
4
#include "
Vector.h
"
5
6
namespace
dyno
7
{
8
template
<
typename
T>
9
DYN_FUNC
Transform<T, 3>::Transform
()
10
{
11
mTranslation
=
Vector<T, 3>
(0);
12
mScale
=
Vector<T, 3>
(1);
13
mRotation
=
SquareMatrix<T, 3>::identityMatrix
();
14
}
15
16
template
<
typename
T>
17
DYN_FUNC
Transform<T, 3>::Transform
(
const
Vector<T, 3>
& t,
const
SquareMatrix<T, 3>
&
M
,
const
Vector<T, 3>
& s)
18
{
19
mTranslation
= t;
20
mScale
= s;
21
mRotation
=
M
;
22
}
23
24
template
<
typename
T>
25
DYN_FUNC
Transform<T, 3>::Transform
(
const
Transform<T, 3>
& t)
26
{
27
mRotation
= t.mRotation;
28
mTranslation
= t.mTranslation;
29
mScale
= t.mScale;
30
}
31
32
template
<
typename
T>
33
DYN_FUNC
Transform<T, 3>::~Transform
()
34
{
35
36
}
37
38
template
<
typename
T>
39
DYN_FUNC
const
Vector<T, 3>
Transform<T, 3>::operator*
(
const
Vector<T, 3>
&vec)
const
40
{
41
Vector<T, 3>
scaled =
Vector<T, 3>
(vec.x*
mScale
.x, vec.y*
mScale
.y, vec.z*
mScale
.z);
42
return
mRotation
* scaled +
mTranslation
;
43
}
44
}
Vector.h
dyno::SquareMatrix
Definition
SquareMatrix.h:8
dyno::Transform< T, 3 >::mRotation
SquareMatrix< T, 3 > mRotation
Definition
Transform3x3.h:40
dyno::Transform< T, 3 >::Transform
DYN_FUNC Transform()
Definition
Transform3x3.inl:9
dyno::Transform< T, 3 >::mTranslation
Vector< T, 3 > mTranslation
Definition
Transform3x3.h:38
dyno::Transform< T, 3 >::mScale
Vector< T, 3 > mScale
Definition
Transform3x3.h:39
dyno::Transform::Transform
Transform()
Definition
SquareMatrix.h:20
dyno::Transform::~Transform
~Transform()
Definition
SquareMatrix.h:21
dyno::Vector
Definition
VectorBase.h:24
dyno
This is an implementation of AdditiveCCD based on peridyno.
Definition
Array.h:25
M
#define M(X, Y)
Definition
vgMath.h:291
Generated by
1.13.2