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

This commit is contained in:
ariel-
2016-08-28 02:31:52 -03:00
committed by Aokromes
parent fa87649f13
commit f6aa0e1796
2 changed files with 13 additions and 0 deletions

View File

@@ -20,6 +20,12 @@
#include "GridDefines.h"
#include <G3D/g3dmath.h>
#include <G3D/Vector3.h>
Position::Position(G3D::Vector3 const& vect)
{
Relocate(vect.x, vect.y, vect.z, 0.f);
}
bool Position::operator==(Position const &a)
{

View File

@@ -20,6 +20,11 @@
#include "Common.h"
namespace G3D
{
class Vector3;
}
class ByteBuffer;
struct TC_GAME_API Position
@@ -29,6 +34,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) { }