當前位置: 首頁>>代碼示例>>Java>>正文


Java VertexTransform類代碼示例

本文整理匯總了Java中com.enderio.core.api.client.render.VertexTransform的典型用法代碼示例。如果您正苦於以下問題:Java VertexTransform類的具體用法?Java VertexTransform怎麽用?Java VertexTransform使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


VertexTransform類屬於com.enderio.core.api.client.render包,在下文中一共展示了VertexTransform類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setupVertices

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
public static void setupVertices(BoundingBox bound, VertexTransform xForm) {
  verts[0].set(bound.minX, bound.minY, bound.minZ);
  verts[1].set(bound.maxX, bound.minY, bound.minZ);
  verts[2].set(bound.maxX, bound.maxY, bound.minZ);
  verts[3].set(bound.minX, bound.maxY, bound.minZ);
  verts[4].set(bound.minX, bound.minY, bound.maxZ);
  verts[5].set(bound.maxX, bound.minY, bound.maxZ);
  verts[6].set(bound.maxX, bound.maxY, bound.maxZ);
  verts[7].set(bound.minX, bound.maxY, bound.maxZ);

  if (xForm != null) {
    for (Vector3d vec : verts) {
      xForm.apply(vec);
    }
  }
}
 
開發者ID:SleepyTrousers,項目名稱:EnderCore,代碼行數:17,代碼來源:CubeRenderer.java

示例2: setupVertices

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
void setupVertices(BoundingBox bound, VertexTransform xForm) {
  verts[0].set(bound.minX, bound.minY, bound.minZ);
  verts[1].set(bound.maxX, bound.minY, bound.minZ);
  verts[2].set(bound.maxX, bound.maxY, bound.minZ);
  verts[3].set(bound.minX, bound.maxY, bound.minZ);
  verts[4].set(bound.minX, bound.minY, bound.maxZ);
  verts[5].set(bound.maxX, bound.minY, bound.maxZ);
  verts[6].set(bound.maxX, bound.maxY, bound.maxZ);
  verts[7].set(bound.minX, bound.maxY, bound.maxZ);

  if (xForm != null) {
    for (Vector3d vec : verts) {
      if (vec != null) {
        xForm.apply(vec);
      }
    }
  }
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:19,代碼來源:TESRPowerMonitor.java

示例3: setupVertices

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
protected void setupVertices(BoundingBox bound, VertexTransform xForm) {
  verts[0].set(bound.minX, bound.minY, bound.minZ);
  verts[1].set(bound.maxX, bound.minY, bound.minZ);
  verts[2].set(bound.maxX, bound.maxY, bound.minZ);
  verts[3].set(bound.minX, bound.maxY, bound.minZ);
  verts[4].set(bound.minX, bound.minY, bound.maxZ);
  verts[5].set(bound.maxX, bound.minY, bound.maxZ);
  verts[6].set(bound.maxX, bound.maxY, bound.maxZ);
  verts[7].set(bound.minX, bound.maxY, bound.maxZ);

  if (xForm != null) {
    for (Vector3d vec : verts) {
      xForm.apply(vec);
    }
  }
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:17,代碼來源:DefaultConduitRenderer.java

示例4: render

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
public static void render(Block block, int meta, VertexTransform xForm) {
  IIcon[] icons = new IIcon[6];
  for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
    icons[dir.ordinal()] = block.getIcon(dir.ordinal(), meta);
  }
  render(BoundingBox.UNIT_CUBE.translate(0, -0.1f, 0), icons, xForm, true);
}
 
開發者ID:SleepyTrousers,項目名稱:EnderCore,代碼行數:8,代碼來源:CubeRenderer.java

示例5: VertexTransformComposite

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
VertexTransformComposite(Collection<VertexTransform> xformsIn) {
  xforms = new VertexTransform[xformsIn.size()];
  int i = 0;
  for (VertexTransform xform : xformsIn) {
    xforms[i] = xform;
    i++;
  }
}
 
開發者ID:SleepyTrousers,項目名稱:EnderCore,代碼行數:9,代碼來源:VertexTransformComposite.java

示例6: transform

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
public BoundingBox transform(VertexTransform iTransformation) {
  Vector3d min = new Vector3d(minX, minY, minZ);
  Vector3d max = new Vector3d(maxX, maxY, maxZ);

  iTransformation.apply(min);
  iTransformation.apply(max);

  return new BoundingBox(Math.min(min.x, max.x), Math.min(min.y, max.y), Math.min(min.z, max.z), Math.max(min.x, max.x), Math.max(min.y, max.y), Math.max(
      min.z, max.z));

}
 
開發者ID:SleepyTrousers,項目名稱:EnderCore,代碼行數:12,代碼來源:BoundingBox.java

示例7: renderCube

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
public static void renderCube(BoundingBox bb, IIcon[] icons, VertexTransform xForm, float[] brightnessPerSide, boolean inside) {
  setupVertices(bb, xForm);
  for (ForgeDirection face : ForgeDirection.VALID_DIRECTIONS) {
    IIcon tex = icons[face.ordinal()];
    if (tex != null) {
      float minU = tex.getMinU();
      float maxU = tex.getMaxU();
      float minV = tex.getMinV();
      float maxV = tex.getMaxV();

      renderSingleFace(face, minU, maxU, minV, maxV, xForm, brightnessPerSide, inside);
    }
  }
}
 
開發者ID:HenryLoenwind,項目名稱:EnderIOAddons,代碼行數:15,代碼來源:FaceRenderer.java

示例8: renderSkirt

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
public static void renderSkirt(BoundingBox bb, IIcon[] icons, double texMinU, double texMaxU, double texMinV, double texMaxV, VertexTransform xForm,
    float[] brightnessPerSide, boolean inside) {
  for (ForgeDirection face : AROUND) {
    IIcon tex = icons[face.ordinal()];
    if (tex != null) {
      renderSingleFace(bb, face, tex, texMinU, texMaxU, texMinV, texMaxV, xForm, brightnessPerSide, inside);
    }
  }
}
 
開發者ID:HenryLoenwind,項目名稱:EnderIOAddons,代碼行數:10,代碼來源:FaceRenderer.java

示例9: renderSingleFace

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
public static void renderSingleFace(BoundingBox bb, ForgeDirection face, IIcon[] icons, VertexTransform xForm, float[] brightnessPerSide, boolean inside) {
  setupVertices(bb, xForm);
  IIcon tex = icons[face.ordinal()];
  if (tex != null) {
    float minU = tex.getMinU();
    float maxU = tex.getMaxU();
    float minV = tex.getMinV();
    float maxV = tex.getMaxV();

    renderSingleFace(face, minU, maxU, minV, maxV, xForm, brightnessPerSide, inside);
  }
}
 
開發者ID:HenryLoenwind,項目名稱:EnderIOAddons,代碼行數:13,代碼來源:FaceRenderer.java

示例10: rotate

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
public static ForgeDirection rotate(VertexTransform xForm, ForgeDirection dir) {
  if (xForm instanceof VertexRotationFacing) {
    double angle = ((VertexRotationFacing) xForm).getAngle();
    if (angle < ROTATION_AMOUNT * 0.5 || angle >= ROTATION_AMOUNT * 3.5) {
      return dir;
    } else if (angle >= ROTATION_AMOUNT * 0.5 && angle < ROTATION_AMOUNT * 1.5) {
      return dir.getRotation(ForgeDirection.DOWN);
    } else if (angle >= ROTATION_AMOUNT * 1.5 && angle < ROTATION_AMOUNT * 2.5) {
      return dir.getOpposite();
    } else if (angle >= ROTATION_AMOUNT * 2.5 && angle < ROTATION_AMOUNT * 3.5) {
      return dir.getRotation(ForgeDirection.UP);
    }
  }
  return dir;
}
 
開發者ID:HenryLoenwind,項目名稱:EnderIOAddons,代碼行數:16,代碼來源:FaceRenderer.java

示例11: setXform

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
public CacheRenderer setXform(VertexTransform xForm) {
  calculateVerts();
  this.xForm = xForm;
  for (Vector3d vec : verts) {
    xForm.apply(vec);
  }
  return this;
}
 
開發者ID:HenryLoenwind,項目名稱:EnderIOAddons,代碼行數:9,代碼來源:CacheRenderer.java

示例12: rotate

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
EnumFacing rotate(VertexTransform xForm, EnumFacing dir) {
  if (xForm instanceof VertexRotationFacing) {
    double angle = ((VertexRotationFacing) xForm).getAngle();
    if (angle < ROTATION_AMOUNT * 0.5 || angle >= ROTATION_AMOUNT * 3.5) {
      return dir;
    } else if (angle >= ROTATION_AMOUNT * 0.5 && angle < ROTATION_AMOUNT * 1.5) {
      return dir.rotateY();
    } else if (angle >= ROTATION_AMOUNT * 1.5 && angle < ROTATION_AMOUNT * 2.5) {
      return dir.getOpposite();
    } else if (angle >= ROTATION_AMOUNT * 2.5 && angle < ROTATION_AMOUNT * 3.5) {
      return dir.rotateYCCW();
    }
  }
  return dir;
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:16,代碼來源:TESRPowerMonitor.java

示例13: createVerticesForDir

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
private static List<Vertex> createVerticesForDir(BoundingBox refBB, VertexTransform xform) {
  List<Vertex> result = new ArrayList<Vertex>(24);
  for (EnumFacing face : EnumFacing.VALUES) {
    result.addAll(refBB.getCornersWithUvForFace(face));
  }
  for (Vertex v : result) {
    xform.apply(v.xyz);
    xform.applyToNormal(v.normal);

  }
  return result;
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:13,代碼來源:ConnectionModeGeometry.java

示例14: transform

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
public void transform(final VertexTransform... xforms) {
  corners.apply(new Callback<Vertex>() {
    @Override
    public void apply(@Nonnull Vertex vertex) {
      for (VertexTransform xform : xforms) {
        xform.apply(vertex);
      }
    }
  });
  recomputeNormals();
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:12,代碼來源:HalfBakedQuad.java

示例15: apply

import com.enderio.core.api.client.render.VertexTransform; //導入依賴的package包/類
@Override
public void apply(Vertex vertex) {
  for (VertexTransform xform : xforms) {
    xform.apply(vertex);
  }
}
 
開發者ID:SleepyTrousers,項目名稱:EnderCore,代碼行數:7,代碼來源:VertexTransformComposite.java


注:本文中的com.enderio.core.api.client.render.VertexTransform類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。