1
This commit is contained in:
parent
a56ec3d945
commit
2f92392b50
@ -5,11 +5,6 @@
|
||||
#include "human.h"
|
||||
#include "glmhelper.h"
|
||||
|
||||
float Position::Distance2D(a8::Vec2 pos) const
|
||||
{
|
||||
return pos.Distance(ToVec2());
|
||||
}
|
||||
|
||||
float Position::Distance2D2(const Position& pos) const
|
||||
{
|
||||
return pos.ToVec2().Distance(ToVec2());
|
||||
@ -25,12 +20,6 @@ a8::Vec2 Position::CalcDir2D(const Position& target_pos) const
|
||||
return a8::Vec2(target_pos.x, target_pos.z) - a8::Vec2(x, z);
|
||||
}
|
||||
|
||||
void Position::FromVec2(const a8::Vec2 v)
|
||||
{
|
||||
x = v.x;
|
||||
y = v.y;
|
||||
}
|
||||
|
||||
void Position::FromVec3(const a8::Vec3 v)
|
||||
{
|
||||
x = v.x;
|
||||
|
@ -67,14 +67,12 @@ struct Position
|
||||
float GetZ() const { return z; };
|
||||
int GetLayer() const { return layer; };
|
||||
|
||||
float Distance2D(a8::Vec2 pos) const;
|
||||
float Distance2D2(const Position& pos) const;
|
||||
float DistanceGlmVec3(const glm::vec3& v) const;
|
||||
float ManhattanDistance2D(const Position& target_pos) const;
|
||||
a8::Vec2 CalcDir2D(const Position& target_pos) const;
|
||||
glm::vec3 CalcDir(const Position& target_pos) const;
|
||||
|
||||
void FromVec2(const a8::Vec2 v);
|
||||
void FromVec3(const a8::Vec3 v);
|
||||
|
||||
void FromGlmVec3(const glm::vec3 v);
|
||||
|
Loading…
x
Reference in New Issue
Block a user