Package crazypants.render

Examples of crazypants.render.VertexRotation


      if(te instanceof TileEndermanSkull) {
        yaw = ((TileEndermanSkull)te).yaw;
      }
    }
   
    VertexRotation rot = new VertexRotation(Math.toRadians(yaw), new Vector3d(0,1,0), new Vector3d(0.5,0,0.5));
   
    float size = 0.25f;
    float height = 0.5f;
    BoundingBox bb = new BoundingBox(size, 0, size, 1 - size, height, 1 - size);
    CubeRenderer.render(bb, icons, rot, true);
View Full Code Here


            float xOffset = 0.52f * (1 - dir.offsetX) (dir.offsetX * (-0.1F + rand.nextFloat() * 0.2F));
            float yOffset = -0.1F + rand.nextFloat() * 0.2F;
            float zOffset = 0.52f * (1 - dir.offsetZ) (dir.offsetZ * (-0.1F + rand.nextFloat() * 0.2F));

            if(rand.nextFloat() > 0.5) {
              VertexRotation vr = new VertexRotation(Math.PI/4, new Vector3d(0,1,0), new Vector3d(0.5,0.25,0.5));
              Vector3d vec = new Vector3d(xOffset, yOffset, zOffset);
              vr.apply(vec);
              xOffset = (float)vec.x;
              yOffset = (float)vec.y;
              zOffset = (float)vec.z;

            }
View Full Code Here

   
    IIcon baseIcon = EnderIO.blockWirelessCharger.getIcon(0, 0);
   
    tes.addTranslation(x, y, z);
   
    VertexTransform rot = new VertexRotation(Math.toRadians(45), new Vector3d(0,1,0), new Vector3d(0.5,0.5,0.5));
    VertexTransform trans = new VertexTranslation(0, -0.5 + 0.025, 0);
   
    VertexTransformComposite xform = new VertexTransformComposite(rot, trans);   
    CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(0.7, 0.05, 0.7), baseIcon, xform, true);
   
    trans = new VertexTranslation(0, 0.5 - 0.025, 0);
    xform = new VertexTransformComposite(rot, trans);
    CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(0.7, 0.05, 0.7), baseIcon, xform, true);
   
    CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(0.2, 0.91, 0.2), EnderIO.blockWirelessCharger.getCenterOn(), true);
   
    trans = new VertexTranslation(0, 0, 0.5 - 0.01);
    xform = new VertexTransformComposite(trans);
    CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(0.25, 0.25, 0.01), baseIcon, xform, true);
    CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(0.01, 1, 0.01), baseIcon, xform, true);
   
    rot = new VertexRotation(Math.toRadians(90), new Vector3d(0,1,0), new Vector3d(0.5,0.5,0.5));
    xform = new VertexTransformComposite(trans, rot);
    CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(0.25, 0.25, 0.01), baseIcon, xform, true);
    CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(0.01, 1, 0.01), baseIcon, xform, true);
   
    rot = new VertexRotation(Math.toRadians(180), new Vector3d(0,1,0), new Vector3d(0.5,0.5,0.5));
    xform = new VertexTransformComposite(trans, rot);
    CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(0.25, 0.25, 0.01), baseIcon, xform, true);
    CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(0.01, 1, 0.01), baseIcon, xform, true);
   
    rot = new VertexRotation(Math.toRadians(270), new Vector3d(0,1,0), new Vector3d(0.5,0.5,0.5));
    xform = new VertexTransformComposite(trans, rot);
    CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(0.25, 0.25, 0.01), baseIcon, xform, true);
    CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(0.01, 1, 0.01), baseIcon, xform, true);
   
   
View Full Code Here

    Vector3d axis = new Vector3d(0, 1, 0);
    Vector3d p = new Vector3d(0.5, 0.5, 0.5);
    xForms = new VertexTransform[4];
    double angle = Math.toRadians(45);
    for (int i = 0; i < xForms.length; i++) {
      xForms[i] = new VertexRotation(angle, axis, p);
      angle += Math.toRadians(90);
    }

    aabb = new BoundingBox[xForms.length];
    for (int i = 0; i < xForms.length; i++) {
View Full Code Here

TOP

Related Classes of crazypants.render.VertexRotation

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.