Make default-initialized math::trs the identity
This commit is contained in:
parent
a7cbe69712
commit
c3c8446431
1 changed files with 4 additions and 4 deletions
|
|
@ -16,13 +16,13 @@ namespace psemek::math
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct trs<T, 3>
|
struct trs<T, 3>
|
||||||
{
|
{
|
||||||
vector<T, 3> translation;
|
vector<T, 3> translation = {T{0}, T{0}, T{0}};
|
||||||
quaternion<T> rotation;
|
quaternion<T> rotation = quaternion<T>::identity();
|
||||||
vector<T, 3> scale;
|
vector<T, 3> scale = {T{1}, T{1}, T{1}};
|
||||||
|
|
||||||
static trs<T, 3> identity()
|
static trs<T, 3> identity()
|
||||||
{
|
{
|
||||||
return {vector<T, 3>::zero(), quaternion<T>::identity(), vector{T{1}, T{1}, T{1}}};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
static trs<T, 3> from(matrix<T, 3, 4> const & m)
|
static trs<T, 3> from(matrix<T, 3, 4> const & m)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue