当前位置: 首页>>代码示例>>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;未经允许,请勿转载。