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>
|
||||
struct trs<T, 3>
|
||||
{
|
||||
vector<T, 3> translation;
|
||||
quaternion<T> rotation;
|
||||
vector<T, 3> scale;
|
||||
vector<T, 3> translation = {T{0}, T{0}, T{0}};
|
||||
quaternion<T> rotation = quaternion<T>::identity();
|
||||
vector<T, 3> scale = {T{1}, T{1}, T{1}};
|
||||
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue