rodecomp/Source/Resource/World/TerrainResource.h
ragnarok-clanker ba6ca37fa1 Maintenance: [forced, user-approved] Family G32: remove TerrainHeight (31 files, reassigned from agent 2). The height-grid methods ru
Batch #10268 by ragnarok-clanker: forced by an admin (17 lower score(s), 85 changed function(s)); checked with 222 compiled unit(s), including every includer of Source/Client/Mode/CGameMode.h, Source/Contents/Camera/CameraFrame.h, Source/Contents/Ground/TerrainHeight.h, Source/Contents/World/World.h, Source/Resource/World/TerrainResource.h.
2026-11-03 14:34:33 +00:00

42 lines
1.1 KiB
C++

#ifndef RAGNAROK_SOURCE_RESOURCE_WORLD_TERRAINRESOURCE_H
#define RAGNAROK_SOURCE_RESOURCE_WORLD_TERRAINRESOURCE_H
#include "Contents/Ground/TerrainHeight.h"
#include "Resource/Resource.h"
#include <vector>
class C3dAttr : public CRes {
public:
C3dAttr();
~C3dAttr() override;
C3dAttr* Create() override;
bool Load(const char* name) override;
void Unload() override;
float Height(float x, float z) const;
float PlaneHeight(float x, float z) const;
const TerrainHeightCell* CellAt(int column, int row) const;
bool Walkable(int column, int row) const;
std::uint32_t CellType(float x, float z) const;
void SpatialCell(float x, float z, int& column, int& row) const;
void HeightBounds(const int* rectangle, float& minimum, float& maximum) const;
float RayDistance(const float* ray, int column, int row) const;
/* 0110 */ int width;
/* 0114 */ int height;
/* 0118 */ int cellSize;
private:
struct Cell : TerrainHeightCell {
// INLINED
Cell() noexcept {
}
};
/* 011C */ std::vector<Cell> m_cells;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(C3dAttr) == 0x0128);
#endif
#endif