Package cofh.repack.codechicken.lib.vec

Examples of cofh.repack.codechicken.lib.vec.Vector3


      rect.h = height;
    }

    IIcon tex = prepareFluidRender(stack, alpha);
    CCRenderState.startDrawing();
    renderFluidQuad(new Vector3(rect.x, rect.y + rect.h, 0), new Vector3(rect.w, 0, 0), new Vector3(0, -rect.h, 0), tex, res);
    CCRenderState.draw();
    postFluidRender();
  }
View Full Code Here


  private static void generateIcosahedron() {

    Vector3[] verts = new Vector3[12];

    verts[0] = new Vector3(-1, phi, 0);
    verts[1] = new Vector3(1, phi, 0);
    verts[2] = new Vector3(1, -phi, 0);
    verts[3] = new Vector3(-1, -phi, 0);

    verts[4] = new Vector3(0, -1, phi);
    verts[5] = new Vector3(0, 1, phi);
    verts[6] = new Vector3(0, 1, -phi);
    verts[7] = new Vector3(0, -1, -phi);

    verts[8] = new Vector3(phi, 0, -1);
    verts[9] = new Vector3(phi, 0, 1);
    verts[10] = new Vector3(-phi, 0, 1);
    verts[11] = new Vector3(-phi, 0, -1);

    Quat quat = Quat.aroundAxis(0, 0, 1, Math.atan(1 / phi));
    for (Vector3 vec : verts) {
      quat.rotate(vec);
    }
View Full Code Here

  }

  public static void addBlockHitEffects(World world, Cuboid6 bounds, int side, IIcon icon, EffectRenderer effectRenderer) {

    float border = 0.1F;
    Vector3 diff = bounds.max.copy().subtract(bounds.min).add(-2 * border);
    diff.x *= world.rand.nextDouble();
    diff.y *= world.rand.nextDouble();
    diff.z *= world.rand.nextDouble();
    Vector3 pos = diff.add(bounds.min).add(border);

    if (side == 0) {
      diff.y = bounds.min.y - border;
    }
    if (side == 1) {
View Full Code Here

    effectRenderer.addEffect(new EntityDigIconFX(world, pos.x, pos.y, pos.z, 0, 0, 0, icon).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F));
  }

  public static void addBlockDestroyEffects(World world, Cuboid6 bounds, IIcon[] icons, EffectRenderer effectRenderer) {

    Vector3 diff = bounds.max.copy().subtract(bounds.min);
    Vector3 center = bounds.min.copy().add(bounds.max).multiply(0.5);
    Vector3 density = diff.copy().multiply(4);
    density.x = Math.ceil(density.x);
    density.y = Math.ceil(density.y);
    density.z = Math.ceil(density.z);

    for (int i = 0; i < density.x; ++i) {
View Full Code Here

TOP

Related Classes of cofh.repack.codechicken.lib.vec.Vector3

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.