KiCad PCB EDA Suite
Loading...
Searching...
No Matches
mortoncodes.h File Reference

Implements Morton Codes https://fgiesen.wordpress.com/2009/12/13/decoding-morton-codes/ http://www.forceflow.be/2013/10/07/morton-encodingdecoding-through-bit-interleaving-implementations/. More...

#include <cstdint>

Go to the source code of this file.

Functions

uint32_t EncodeMorton2 (uint32_t x, uint32_t y)
 
uint32_t EncodeMorton3 (uint32_t x, uint32_t y, uint32_t z)
 
uint32_t DecodeMorton2X (uint32_t code)
 
uint32_t DecodeMorton2Y (uint32_t code)
 
uint32_t DecodeMorton3X (uint32_t code)
 
uint32_t DecodeMorton3Y (uint32_t code)
 
uint32_t DecodeMorton3Z (uint32_t code)
 

Detailed Description

Function Documentation

◆ DecodeMorton2X()

uint32_t DecodeMorton2X ( uint32_t  code)

Definition at line 98 of file mortoncodes.cpp.

References Compact1By1().

Referenced by RENDER_3D_RAYTRACE_BASE::initializeBlockPositions().

◆ DecodeMorton2Y()

uint32_t DecodeMorton2Y ( uint32_t  code)

Definition at line 104 of file mortoncodes.cpp.

References Compact1By1().

Referenced by RENDER_3D_RAYTRACE_BASE::initializeBlockPositions().

◆ DecodeMorton3X()

uint32_t DecodeMorton3X ( uint32_t  code)

Definition at line 110 of file mortoncodes.cpp.

References Compact1By2().

◆ DecodeMorton3Y()

uint32_t DecodeMorton3Y ( uint32_t  code)

Definition at line 116 of file mortoncodes.cpp.

References Compact1By2().

◆ DecodeMorton3Z()

uint32_t DecodeMorton3Z ( uint32_t  code)

Definition at line 122 of file mortoncodes.cpp.

References Compact1By2().

◆ EncodeMorton2()

uint32_t EncodeMorton2 ( uint32_t  x,
uint32_t  y 
)

Definition at line 86 of file mortoncodes.cpp.

References Part1By1().

◆ EncodeMorton3()

uint32_t EncodeMorton3 ( uint32_t  x,
uint32_t  y,
uint32_t  z 
)

Definition at line 92 of file mortoncodes.cpp.

References Part1By2().