Add support for Large Worlds in more engine systems
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "Quaternion.h"
|
||||
#include "Matrix.h"
|
||||
#include "Matrix3x3.h"
|
||||
#include "Transform.h"
|
||||
#include "../Types/String.h"
|
||||
|
||||
// Float
|
||||
@@ -214,6 +215,14 @@ Float3 Float3::Transform(const Float3& vector, const Matrix& transform)
|
||||
vector.X * transform.M13 + vector.Y * transform.M23 + vector.Z * transform.M33 + transform.M43);
|
||||
}
|
||||
|
||||
template<>
|
||||
Float3 Float3::Transform(const Float3& vector, const ::Transform& transform)
|
||||
{
|
||||
Vector3 result;
|
||||
transform.LocalToWorld(vector, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
template<>
|
||||
void Float3::TransformCoordinate(const Float3& coordinate, const Matrix& transform, Float3& result)
|
||||
{
|
||||
@@ -508,6 +517,14 @@ Double3 Double3::Transform(const Double3& vector, const Matrix& transform)
|
||||
vector.X * transform.M13 + vector.Y * transform.M23 + vector.Z * transform.M33 + transform.M43);
|
||||
}
|
||||
|
||||
template<>
|
||||
Double3 Double3::Transform(const Double3& vector, const ::Transform& transform)
|
||||
{
|
||||
Vector3 result;
|
||||
transform.LocalToWorld(vector, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
template<>
|
||||
void Double3::TransformCoordinate(const Double3& coordinate, const Matrix& transform, Double3& result)
|
||||
{
|
||||
@@ -748,6 +765,12 @@ Int3 Int3::Transform(const Int3& vector, const Matrix& transform)
|
||||
return vector;
|
||||
}
|
||||
|
||||
template<>
|
||||
Int3 Int3::Transform(const Int3& vector, const ::Transform& transform)
|
||||
{
|
||||
return vector;
|
||||
}
|
||||
|
||||
template<>
|
||||
void Int3::TransformCoordinate(const Int3& coordinate, const Matrix& transform, Int3& result)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user