minor matrix function
This commit is contained in:
parent
efad72f2ac
commit
925225df0e
@ -57,6 +57,7 @@
|
||||
<ClInclude Include="..\include\Utils\Network\SignalSender.h" />
|
||||
<ClInclude Include="..\include\Utils\PngHelper.h" />
|
||||
<ClInclude Include="..\include\Utils\SerializeInterface\SerializeInterface.h" />
|
||||
<ClInclude Include="..\include\Utils\SimpleTimer.h" />
|
||||
<ClInclude Include="..\include\Utils\TgaLoader.h" />
|
||||
<ClInclude Include="..\include\Utils\ThreadUtils.h" />
|
||||
<ClInclude Include="..\include\Utils\ThreadUtilsImpl.h" />
|
||||
|
@ -168,6 +168,8 @@ typedef tmat3<float> mat3;
|
||||
mat3 TransposeMatrix(const mat3& m);
|
||||
mat3 InverseMatrix(const mat3& m);
|
||||
|
||||
mat3 CreateZRotationMatrix(float angle);
|
||||
|
||||
//Outside:
|
||||
inline vec2 operator*(const vec2& a, float c)
|
||||
{
|
||||
|
@ -53,5 +53,17 @@ mat3 InverseMatrix(const mat3& m)
|
||||
return r;
|
||||
}
|
||||
|
||||
mat3 CreateZRotationMatrix(float angle)
|
||||
{
|
||||
mat3 result = IdentityMatrix;
|
||||
|
||||
result.m[0] = cosf(angle);
|
||||
result.m[1] = -sinf(angle);
|
||||
result.m[3] = sinf(angle);
|
||||
result.m[4] = cosf(angle);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
} //namespace SE
|
Loading…
Reference in New Issue
Block a user