rodecomp/Source/Contents/World/WorldSpatialTree.h
ragnarok-clanker a47d20f8be Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.

Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
2026-10-25 07:42:41 +00:00

46 lines
1.4 KiB
C++

#ifndef RAGNAROK_SOURCE_CONTENTS_WORLD_WORLDSPATIALTREE_H
#define RAGNAROK_SOURCE_CONTENTS_WORLD_WORLDSPATIALTREE_H
#include <cstdint>
#include <vector>
struct ResourceByteReader;
class C3dAttr;
struct GroundSpatial;
class C3dActor;
struct WorldSpatialTree {
WorldSpatialTree();
~WorldSpatialTree();
WorldSpatialTree(const WorldSpatialTree&) = delete;
WorldSpatialTree& operator=(const WorldSpatialTree&) = delete;
void Subdivide(int depth);
void ReadBounds(ResourceByteReader& input, int depth);
void ClearChildren();
void BindTerrain(C3dAttr& resource, int depth);
void BindGround(GroundSpatial& resource, int depth);
void CopyBounds(int depth, const WorldSpatialTree& source);
void RefreshBounds(int depth);
void InsertModel(C3dActor& model, int depth);
void RemoveModel(C3dActor* model, int depth);
std::vector<C3dActor*>& ModelsAt(float x, float z, int depth);
/* 0000 */ WorldSpatialTree* parent;
/* 0004 */ WorldSpatialTree* children[4];
/* 0014 */ float minimum[3];
/* 0020 */ float maximum[3];
/* 002C */ float center[3];
/* 0038 */ float halfSize[3];
/* 0044 */ int dirty;
/* 0048 */ std::vector<C3dActor*> objects;
/* 0054 */ GroundSpatial* ground;
/* 0058 */ int groundCells[4];
/* 0068 */ C3dAttr* terrain;
/* 006C */ int terrainCells[4];
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(WorldSpatialTree) == 124);
#endif
#endif