Class OctreeGeneratorMag

All Implemented Interfaces:

public class OctreeGeneratorMag extends Object implements IOctreeGenerator
Implements a f: mag -> level bijective map, where octree nodes 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 an artifact-free octree. The technique is called MS-LOD.
  • Constructor Details

  • Method Details

    • generateOctree

      public OctreeNode generateOctree(List<IParticleRecord> catalog)
      Specified by:
      generateOctree in interface IOctreeGenerator
    • getDiscarded

      public int getDiscarded()
      Specified by:
      getDiscarded in interface IOctreeGenerator
    • getPositionOctantId

      public Long getPositionOctantId(double x, double y, double z, int level)
      Gets the id of the node which corresponds to the given xyz position
      x - Position in x
      y - Position in y
      z - Position in z
      level - Level
      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.