Ejemplo n.º 1
0
 public ChunkMeshBatch(
     World world, int baseX, int baseY, int baseZ, BlockFace face, RenderMaterial material) {
   super(new Point(world, baseX, baseY, baseZ), SIZE);
   this.face = face;
   this.material = material;
   modelMat =
       MathHelper.translate(
           new Vector3(
               baseX * Chunk.BLOCKS.SIZE, baseY * Chunk.BLOCKS.SIZE, baseZ * Chunk.BLOCKS.SIZE));
 }
Ejemplo n.º 2
0
 @Override
 public void updateView() {
   Transform transform =
       ((PredictableTransformComponent) getOwner().getTransform()).getRenderTransform();
   if (transform != null) {
     Matrix pos = MathHelper.translate(transform.getPosition().multiply(-1));
     Matrix rot = MathHelper.rotate(transform.getRotation());
     view = pos.multiply(rot);
     frustum.update(projection, view, transform.getPosition());
   }
 }