mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-05 13:17:49 +00:00
fahhh
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include "Util/G3DCore.h"
|
||||
#include "Voxel/Util.h"
|
||||
|
||||
namespace RBX { namespace Voxel {
|
||||
|
||||
namespace Water {
|
||||
// Generate relative cell coords relevant to the water on wedge state of a
|
||||
// cell. Some locations will be initialized to the center location if they
|
||||
// are irelevant to the water on wedge state.
|
||||
struct RelevantNeighbors {
|
||||
const Vector3int16 aboveNeighbor;
|
||||
const Vector3int16 primaryNeighbor;
|
||||
const Vector3int16 secondaryNeighbor;
|
||||
const Vector3int16 diagonalNeighbor;
|
||||
const Vector3int16 diagonalUpNeighbor;
|
||||
|
||||
RelevantNeighbors(CellOrientation orientation);
|
||||
};
|
||||
|
||||
struct LocalAreaInfo {
|
||||
Cell aboveNeighbor;
|
||||
Cell primaryNeighbor;
|
||||
Cell secondaryNeighbor;
|
||||
Cell diagonalNeighbor;
|
||||
Cell diagonalUpNeighbor;
|
||||
};
|
||||
|
||||
template<class BoxType>
|
||||
inline bool cellHasWater(const BoxType* reader, const Cell& cell,
|
||||
const Vector3int16& globalCoord);
|
||||
template<class BoxType>
|
||||
Cell interpretAsWaterCell(const BoxType* reader, const Cell& cell,
|
||||
const Vector3int16& globalCoord);
|
||||
}
|
||||
|
||||
} }
|
||||
|
||||
#include "Voxel/Water.inl"
|
||||
Reference in New Issue
Block a user