Class SVTQuadtreeNode<T>

java.lang.Object
gaiasky.util.svt.SVTQuadtreeNode<T>
All Implemented Interfaces:
Comparable<SVTQuadtreeNode>

public class SVTQuadtreeNode<T> extends Object implements Comparable<SVTQuadtreeNode>
  • Field Details

    • tree

      public final SVTQuadtree<T> tree
      The tree this node belongs to.
    • parent

      public final SVTQuadtreeNode<T> parent
      The parent of this tile, if it is not at the root level.
    • level

      public final int level
    • col

      public final int col
    • row

      public final int row
    • object

      public final T object
    • state

      public int state
    • accessed

      public long accessed
  • Constructor Details

  • Method Details

    • getUV

      public double[] getUV()
      Get the UV coordinates in [0,1] of the top-left position of this tile. The UV coordinates start at the bottom-left.
      Returns:
      The UV coordinates of this tile.
    • mipLevel

      public int mipLevel()
      Computes the OpenGL mip level for this tile.
      Returns:
      The OpenGL mip level for this tile.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringShort

      public String toStringShort()
    • compareTo

      public int compareTo(SVTQuadtreeNode o)
      Specified by:
      compareTo in interface Comparable<T>
    • getKey

      public long getKey()
      Gets a unique 64-bit integer key for this tile, including the level, the column and the row.
      Returns:
      The unique key.