TerrainRenderer::PointF TerrainRenderer::GetBAround(const MapPoint pt, const unsigned char triangle, const unsigned char dir) { PointI ptNb = GetPointAround(PointI(pt), dir); Point<int> offset; MapPoint t = ConvertCoords(ptNb, &offset); return GetB(t, triangle) + PointF(offset); }
TerrainRenderer::PointF TerrainRenderer::GetTerrainAround(MapPoint pt, const unsigned dir) { PointI ptNb = GetPointAround(PointI(pt), dir); PointI offset; MapPoint t = ConvertCoords(ptNb, &offset); return GetTerrain(t) + PointF(offset); }
float TerrainRenderer::GetTerrainYAround(int x, int y, const unsigned dir) { GetPointAround(x, y, dir); int yo; MapPoint t = ConvertCoords(x, y, NULL, &yo); return GetTerrainY(t) + yo; }
float TerrainRenderer::GetTerrainXAround(int x, int y, const unsigned dir) { GetPointAround(x, y, dir); int xo; MapPoint t = ConvertCoords(x, y, &xo); return GetTerrainX(t) + xo; }
float TerrainRenderer::GetBYAround(int x, int y, const unsigned char triangle, const unsigned char dir) { GetPointAround(x, y, dir); int yo; MapPoint t = ConvertCoords(x, y, NULL, &yo); return GetBY(t, triangle) + yo; }
float TerrainRenderer::GetBXAround(int x, int y, const unsigned char triangle, const unsigned char dir) { GetPointAround(x, y, dir); int xo; MapPoint t = ConvertCoords(x, y, &xo, NULL); return GetBX(t, triangle) + xo; }
float TerrainRenderer::GetTerrainYAround(int x, int y, const unsigned dir) { unsigned short tx,ty; GetPointAround(x,y,dir); int xo,yo; ConvertCoords(x,y,tx,ty,&xo,&yo); return GetTerrainY(tx,ty)+yo; }
float TerrainRenderer::GetBXAround(int x, int y, const unsigned char triangle, const unsigned char dir) { unsigned short tx,ty; GetPointAround(x,y,dir); int xo,yo; ConvertCoords(x,y,tx,ty,&xo,&yo); return GetBX(tx,ty,triangle)+xo; }