mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-05 07:16:37 +00:00
Switched out our kinda juryrigged vector types for glm::vec types since we use that as a 3d math library already but never switched out the types
This commit is contained in:
+7
-28
@@ -30,40 +30,19 @@
|
||||
class Map
|
||||
{
|
||||
public:
|
||||
#pragma pack(1)
|
||||
struct Vertex
|
||||
{
|
||||
Vertex() : x(0.0f), y(0.0f), z(0.0f) { }
|
||||
Vertex(float _x, float _y, float _z) : x(_x), y(_y), z(_z) { }
|
||||
~Vertex() { }
|
||||
bool operator==(const Vertex &v) const
|
||||
{
|
||||
return((v.x == x) && (v.y == y) && (v.z == z));
|
||||
}
|
||||
operator xyz_location() const
|
||||
{
|
||||
return xyz_location(x,y,z);
|
||||
}
|
||||
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
Map();
|
||||
~Map();
|
||||
|
||||
float FindBestZ(Vertex &start, Vertex *result) const;
|
||||
bool LineIntersectsZone(Vertex start, Vertex end, float step, Vertex *result) const;
|
||||
bool LineIntersectsZoneNoZLeaps(Vertex start, Vertex end, float step_mag, Vertex *result) const;
|
||||
bool CheckLoS(Vertex myloc, Vertex oloc) const;
|
||||
float FindBestZ(glm::vec3 &start, glm::vec3 *result) const;
|
||||
bool LineIntersectsZone(glm::vec3 start, glm::vec3 end, float step, glm::vec3 *result) const;
|
||||
bool LineIntersectsZoneNoZLeaps(glm::vec3 start, glm::vec3 end, float step_mag, glm::vec3 *result) const;
|
||||
bool CheckLoS(glm::vec3 myloc, glm::vec3 oloc) const;
|
||||
bool Load(std::string filename);
|
||||
static Map *LoadMapFile(std::string file);
|
||||
private:
|
||||
void RotateVertex(Vertex &v, float rx, float ry, float rz);
|
||||
void ScaleVertex(Vertex &v, float sx, float sy, float sz);
|
||||
void TranslateVertex(Vertex &v, float tx, float ty, float tz);
|
||||
void RotateVertex(glm::vec3 &v, float rx, float ry, float rz);
|
||||
void ScaleVertex(glm::vec3 &v, float sx, float sy, float sz);
|
||||
void TranslateVertex(glm::vec3 &v, float tx, float ty, float tz);
|
||||
bool LoadV1(FILE *f);
|
||||
bool LoadV2(FILE *f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user