mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-29 07:23:52 +00:00
added automatic conversion of Map::Vertex into xyz_location
This commit is contained in:
parent
4094d43c49
commit
5b783e84e9
11
zone/map.h
11
zone/map.h
@ -22,6 +22,7 @@
|
||||
#ifndef ZONE_MAP_H
|
||||
#define ZONE_MAP_H
|
||||
|
||||
#include "position.h"
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
@ -36,10 +37,14 @@ public:
|
||||
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
|
||||
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;
|
||||
@ -49,7 +54,7 @@ public:
|
||||
|
||||
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;
|
||||
@ -62,7 +67,7 @@ private:
|
||||
void TranslateVertex(Vertex &v, float tx, float ty, float tz);
|
||||
bool LoadV1(FILE *f);
|
||||
bool LoadV2(FILE *f);
|
||||
|
||||
|
||||
struct impl;
|
||||
impl *imp;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user