This commit is contained in:
aozhiwei 2022-12-28 15:49:48 +08:00
parent 5f12ad5761
commit c30245c14d
2 changed files with 8 additions and 0 deletions

View File

@ -607,3 +607,10 @@ void MapInstance::UnScale(glm::vec3& v)
v /= GetMapMeta()->scale();
v.y = old_y;
}
glm::vec3 MapInstance::UnScaleEx(const glm::vec3& v)
{
glm::vec3 result = v;
UnScale(result);
return result;
}

View File

@ -39,6 +39,7 @@ class MapInstance : public std::enable_shared_from_this<MapInstance>
bool GetPosHeight(const Position& pos, float& out_height);
void Scale(glm::vec3& v);
void UnScale(glm::vec3& v);
glm::vec3 UnScaleEx(const glm::vec3& v);
private:
void CreateThings();