Last active
December 26, 2016 01:56
-
-
Save cpgillem/a03c73fe078447bb35033d71df56b97a to your computer and use it in GitHub Desktop.
Illustration of how I would conceptualize an array-backed octree data structure, complete with ASCII art.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 0 = 000: x-, y-, z- | |
| 1 = 001: x-, y-, z+ | |
| 2 = 010: x-, y+, z- | |
| 3 = 011: x-, y+, z+ | |
| 4 = 100: x+, y-, z- | |
| 5 = 101: x+, y-, z+ | |
| 6 = 110: x+, y+, z- | |
| 7 = 111: x+, y+, z+ | |
| ASCII ART ~~~~~~~~~~~~~ | |
| FRONT | |
| +---+---+ Y | |
| / 3 / 7 /| | | |
| /---/---/ | +--X | |
| +---+---+| | | |
| | 2 | 6 ||.+ | |
| +---+---+'5| | |
| | 0 | 4 ||.+ <--Positive Z | |
| +---+---+' <--Negative Z | |
| ^--Behind: 1 | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment