Class OctreeGeneratorMag

  • All Implemented Interfaces:
    IOctreeGenerator

    public class OctreeGeneratorMag
    extends java.lang.Object
    implements IOctreeGenerator
    Implements the magnitude to level map, where octants in a level are filled with magnitude-sorted stars until one of them is saturated before proceeding to lower levels. This uses more memory than the outdated OctreeGeneratorPart but it generally produces artifact-free octrees and properly implements the bijective mapping f: mag -> level.
    • Method Detail

      • getPositionOctantId

        public java.lang.Long getPositionOctantId​(double x,
                                                  double y,
                                                  double z,
                                                  int level)
        Gets the id of the node which corresponds to the given xyz position
        Parameters:
        x - Position in x
        y - Position in y
        z - Position in z
        level - Level
        Returns:
        Id of node which contains the position. The id is a long where the two least significant digits indicate the level and the rest of digit positions indicate the index in the level of the position.