morton

package
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder3D

type Encoder3D struct {
	// Bounds define the space that will be mapped to Morton codes
	Bounds geometry.AABB

	// Resolution determines the precision of the encoding (number of bits per dimension)
	Resolution uint
}

Encoder3D provides 3D Morton encoding/decoding functionality for float64 coordinates

func (*Encoder3D) Decode

func (m *Encoder3D) Decode(morton uint64) vector3.Float64

Decode converts a Morton code back to a 3D float64 point

func (*Encoder3D) DecodeArray

func (m *Encoder3D) DecodeArray(mortons []uint64) []vector3.Float64

Decode converts a Morton code back to a 3D float64 point

func (*Encoder3D) Encode

func (m *Encoder3D) Encode(point vector3.Float64) uint64

Encode converts a 3D float64 point to a Morton code

func (*Encoder3D) EncodeArray

func (m *Encoder3D) EncodeArray(points []vector3.Float64) []uint64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL