Package nexus.model.structs

Examples of nexus.model.structs.Block


    assertEquals(true, new Vector3(0f, 0f, 0f).equals(block.a));
  }
 
  @Test
  public void getBlockNegative() {
    Block block = world.chunks.getBlock(new Vector3(-0.5f, 0.5f, -0.5f));
   
    assertEquals(true, new Vector3(-1f, 0f, -1f).equals(block.a));
  }
View Full Code Here


    assertEquals(true, new Vector3(-1f, 0f, -1f).equals(block.a));
  }
 
  @Test
  public void getBlockOrigin() {
    Block block = world.chunks.getBlock(new Vector3(0f, 0f, 0f));
   
    assertEquals(true, new Vector3(0f, 0f, 0f).equals(block.a));
  }
View Full Code Here

    world.chunks.getBlock(new Vector3(0f, -1000000f, 0f));
  }
 
  @Test(expected=IllegalArgumentException.class)
  public void setBlockHigh() {
    world.chunks.setBlock(new Block(new Vector3(0f, 100000f, 0f), 1f, null));
  }
View Full Code Here

    world.chunks.setBlock(new Block(new Vector3(0f, 100000f, 0f), 1f, null));
  }
 
  @Test(expected=IllegalArgumentException.class)
  public void setBlockLow() {
    world.chunks.setBlock(new Block(new Vector3(0f, -1000000f, 0f), 1f, null));
 
View Full Code Here

    world.chunks.setBlock(new Block(new Vector3(0f, -1000000f, 0f), 1f, null));
 
 
  @Test(expected=IllegalArgumentException.class)
  public void setBlockFloat() {
    world.chunks.setBlock(new Block(new Vector3(0f, 0.1f, 0f), 1f, null));
  }
View Full Code Here

        if (Mouse.isButtonDown(0)) {
          model.chunks.setBlock(new Air(model.chunks.selected, 1.0f));
        }
       
        if (Mouse.isButtonDown(1)) {
          Block newBlock = new Solid(model.chunks.getBlock(model.chunks.selected).a.add(new Vector3(0f, 1f, 0f)), 1.0f, new Greyscale(16.0f, 0.0f));
          model.chunks.setBlock(newBlock);
        }
       
        break;
      }
View Full Code Here

    world = new Model(new Camera(new Vector3(0f, 0f, 0f), 0f, 0f, 0f, false));
  }

  @Test
  public void getBlock() {
    Block block = world.chunks.getBlock(new Vector3(0.5f, 0.5f, 0.5f));
   
    assertEquals(true, new Vector3(0f, 0f, 0f).equals(block.a));
  }
View Full Code Here

TOP

Related Classes of nexus.model.structs.Block

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.