Documentation ¶
Index ¶
Constants ¶
View Source
const BlockSize = 16
View Source
const BlockVolume = BlockSize * BlockSize * BlockSize
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockPosition ¶
type BlockPosition struct {
X, Y, Z int
}
BlockPosition is a block position in world space
func (BlockPosition) Add ¶
func (lhs BlockPosition) Add(rhs BlockPosition) BlockPosition
func (BlockPosition) AddNode ¶
func (lhs BlockPosition) AddNode(pos NodePosition) NodePosition
type Bounds ¶
Bounds defines the extent of a region on a single axis. It is assumed that Max is always greater or equal to Min.
type NodePosition ¶
type NodePosition struct {
X, Y, Z int
}
NodePosition is a node position in world space
func (NodePosition) Add ¶
func (lhs NodePosition) Add(rhs NodePosition) NodePosition
func (NodePosition) Region ¶
func (lhs NodePosition) Region() Region
type Region ¶
type Region struct { XBounds Bounds `toml:"x_bounds"` YBounds Bounds `toml:"y_bounds"` ZBounds Bounds `toml:"z_bounds"` }
Region defines an axis-aligned cuboid region in world space (units are nodes).
func (Region) Intersects ¶
func (Region) IsAtEdge ¶ added in v0.0.2
func (lhs Region) IsAtEdge(pos NodePosition) bool
type TileRegion ¶
TileRegion defines an axis-aligned rectangle region in tile space (units are tiles at zoom level 0). It's used to represent a projection of a Region onto the screen.
Click to show internal directories.
Click to hide internal directories.