Package se.llbit.math

Examples of se.llbit.math.Octree


  /**
   * Create an empty scene with default canvas width and height.
   */
  public Scene() {
    octree = new Octree(1);// empty octree

    width = PersistentSettings.get3DCanvasWidth();
    height = PersistentSettings.get3DCanvasHeight();

    sppTarget = PersistentSettings.getSppTargetDefault();
View Full Code Here


    Set<ChunkPosition> loadedChunks = new HashSet<ChunkPosition>();

    int requiredDepth = calculateOctreeOrigin(chunksToLoad);

    // create new octree to fit all chunks
    octree = new Octree(requiredDepth);

    if (waterHeight > 0) {
      for (int x = 0; x < (1<<octree.depth); ++x) {
        for (int z = 0; z < (1<<octree.depth); ++z) {
          for (int y = -origin.y; y < (-origin.y)+waterHeight-1; ++y) {
View Full Code Here

TOP

Related Classes of se.llbit.math.Octree

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.