Core/Entities: Added possibility to construct a Position using a G3D::Vector3

(cherry picked from commit 17917171f3)
This commit is contained in:
ariel-
2016-08-28 02:31:52 -03:00
committed by joschiwald
parent b3f993894a
commit 54b038fe2f
2 changed files with 7 additions and 0 deletions

View File

@@ -21,6 +21,11 @@
#include <G3D/g3dmath.h>
Position::Position(G3D::Vector3 const& vect)
{
Relocate(vect.x, vect.y, vect.z, 0.f);
}
bool Position::operator==(Position const &a)
{
return (G3D::fuzzyEq(a.m_positionX, m_positionX) &&

View File

@@ -31,6 +31,8 @@ struct TC_GAME_API Position
Position(Position const& loc) { Relocate(loc); }
Position(G3D::Vector3 const& vect);
struct PositionXYStreamer
{
explicit PositionXYStreamer(Position& pos) : Pos(&pos) { }