コード例 #1
0
ファイル: EmiterPoint.java プロジェクト: elsantiF/Voxel
 /**
  * Constructor
  *
  * @param origin Origin of particles
  * @param loader Loader
  * @param x Origin X
  * @param y Origin Y
  * @param z Origin Z
  */
 public EmiterPoint(Vector3f origin, Loader loader, float x, float y, float z) {
   this.origin = origin;
   this.x = x;
   this.y = y;
   this.z = z;
   rModel = loader.getObjLoader().loadObjModel("particle", loader);
   texture = new ModelTexture(loader.loadTextureBlocks("particleTest"));
   model = new TexturedModel(rModel, texture);
   max = 40;
 }
コード例 #2
0
ファイル: BlocksResources.java プロジェクト: elsantiF/Voxel
  public static void createBlocks(Loader loader) {

    RawModel up = loader.getObjLoader().loadObjModel("FACE_UP", loader);
    RawModel down = loader.getObjLoader().loadObjModel("FACE_DOWN", loader);
    RawModel east = loader.getObjLoader().loadObjModel("FACE_EAST", loader);
    RawModel west = loader.getObjLoader().loadObjModel("FACE_WEST", loader);
    RawModel nort = loader.getObjLoader().loadObjModel("FACE_NORTH", loader);
    RawModel south = loader.getObjLoader().loadObjModel("FACE_SOUTH", loader);
    RawModel torch = loader.getObjLoader().loadObjModel("Torch", loader);
    RawModel portal = loader.getObjLoader().loadObjModel("Portal", loader);
    RawModel leaves = loader.getObjLoader().loadObjModel("Leaves", loader);

    ModelTexture texture0 = new ModelTexture(loader.loadTextureBlocks("Indes"));
    ModelTexture texture = new ModelTexture(loader.loadTextureBlocks("Grass"));
    ModelTexture texture1 = new ModelTexture(loader.loadTextureBlocks("Stone"));
    ModelTexture texture2 = new ModelTexture(loader.loadTextureBlocks("Sand"));
    ModelTexture texture3 = new ModelTexture(loader.loadTextureBlocks("Glass"));
    ModelTexture texture4 = new ModelTexture(loader.loadTextureBlocks("Dirt"));
    ModelTexture texture5 = new ModelTexture(loader.loadTextureBlocks("Diamond-Ore"));
    ModelTexture texture6 = new ModelTexture(loader.loadTextureBlocks("Gold-Ore"));
    ModelTexture texture7 = new ModelTexture(loader.loadTextureBlocks("GrassSide"));
    ModelTexture texture8 = new ModelTexture(loader.loadTextureBlocks("Torch"));
    ModelTexture texture9 = new ModelTexture(loader.loadTextureBlocks("Portal"));
    ModelTexture texture10 = new ModelTexture(loader.loadTextureBlocks("Leaves"));
    ModelTexture texture11 = new ModelTexture(loader.loadTextureBlocks("Wood"));

    cubeIndesUP = new TexturedModel(up, texture0);
    cubeGrassUP = new TexturedModel(up, texture);
    cubeStoneUP = new TexturedModel(up, texture1);
    cubeSandUP = new TexturedModel(up, texture2);
    cubeGlassUP = new TexturedModel(up, texture3);
    cubeDirtUP = new TexturedModel(up, texture4);
    cubeDiamondOreUP = new TexturedModel(up, texture5);
    cubeGoldOreUP = new TexturedModel(up, texture6);
    cubeWoodUP = new TexturedModel(up, texture11);

    cubeIndesDOWN = new TexturedModel(down, texture0);
    cubeGrassDOWN = new TexturedModel(down, texture4);
    cubeStoneDOWN = new TexturedModel(down, texture1);
    cubeSandDOWN = new TexturedModel(down, texture2);
    cubeGlassDOWN = new TexturedModel(down, texture3);
    cubeDirtDOWN = new TexturedModel(down, texture4);
    cubeDiamondOreDOWN = new TexturedModel(down, texture5);
    cubeGoldOreDOWN = new TexturedModel(down, texture6);
    cubeWoodDOWN = new TexturedModel(down, texture11);

    cubeIndesEAST = new TexturedModel(east, texture0);
    cubeGrassEAST = new TexturedModel(east, texture7);
    cubeStoneEAST = new TexturedModel(east, texture1);
    cubeSandEAST = new TexturedModel(east, texture2);
    cubeGlassEAST = new TexturedModel(east, texture3);
    cubeDirtEAST = new TexturedModel(east, texture4);
    cubeDiamondOreEAST = new TexturedModel(east, texture5);
    cubeGoldOreEAST = new TexturedModel(east, texture6);
    cubeWoodEAST = new TexturedModel(east, texture11);

    cubeIndesWEST = new TexturedModel(west, texture0);
    cubeGrassWEST = new TexturedModel(west, texture7);
    cubeStoneWEST = new TexturedModel(west, texture1);
    cubeSandWEST = new TexturedModel(west, texture2);
    cubeGlassWEST = new TexturedModel(west, texture3);
    cubeDirtWEST = new TexturedModel(west, texture4);
    cubeDiamondOreWEST = new TexturedModel(west, texture5);
    cubeGoldOreWEST = new TexturedModel(west, texture6);
    cubeWoodWEST = new TexturedModel(west, texture11);

    cubeIndesNORTH = new TexturedModel(nort, texture0);
    cubeGrassNORTH = new TexturedModel(nort, texture7);
    cubeStoneNORTH = new TexturedModel(nort, texture1);
    cubeSandNORTH = new TexturedModel(nort, texture2);
    cubeGlassNORTH = new TexturedModel(nort, texture3);
    cubeDirtNORTH = new TexturedModel(nort, texture4);
    cubeDiamondOreNORTH = new TexturedModel(nort, texture5);
    cubeGoldOreNORTH = new TexturedModel(nort, texture6);
    cubeWoodNORTH = new TexturedModel(nort, texture11);

    cubeIndesSOUTH = new TexturedModel(south, texture0);
    cubeGrassSOUTH = new TexturedModel(south, texture7);
    cubeStoneSOUTH = new TexturedModel(south, texture1);
    cubeSandSOUTH = new TexturedModel(south, texture2);
    cubeGlassSOUTH = new TexturedModel(south, texture3);
    cubeDirtSOUTH = new TexturedModel(south, texture4);
    cubeDiamondOreSOUTH = new TexturedModel(south, texture5);
    cubeGoldOreSOUTH = new TexturedModel(south, texture6);
    cubeWoodSOUTH = new TexturedModel(south, texture11);

    cubeTorch = new TexturedModel(torch, texture8);
    cubePortal = new TexturedModel(portal, texture9);
    cubeLeaves = new TexturedModel(leaves, texture10);
  }