Package jmt.engine.graphic

Examples of jmt.engine.graphic.Vector4.y()


  public boolean isCoplanar(HullFace face) {
    Vector4 diff = this.normal.clone();
    diff.subSelf(face.normal);
    if (Math.abs(diff.x()) > COPLANAR_EPSILON
        || Math.abs(diff.y()) > COPLANAR_EPSILON
        || Math.abs(diff.z()) > COPLANAR_EPSILON) {
      return false;
    } else {
      return true;
    }
View Full Code Here


        p.set(0.0f, limit, offset, 1.0f);
        Vector4 e2 = prj.project(p);
        g.drawLine((int) s1.x(), (int) s1.y(), (int) e1.x(),
            (int) e1.y());
        g.drawLine((int) s2.x(), (int) s2.y(), (int) e2.x(),
            (int) e2.y());
        offset += delta;
      }
    }
    if (yEnable) {
      final Color lineColor = new Color(0.75f, 1.0f, 0.75f);
View Full Code Here

        p.set(limit, 0.0f, offset, 1.0f);
        Vector4 e2 = prj.project(p);
        g.drawLine((int) s1.x(), (int) s1.y(), (int) e1.x(),
            (int) e1.y());
        g.drawLine((int) s2.x(), (int) s2.y(), (int) e2.x(),
            (int) e2.y());
        offset += delta;
      }
    }
    if (zEnable) {
      final Color lineColor = new Color(0.75f, 0.75f, 1.0f);
View Full Code Here

        p.set(limit, offset, 0.0f, 1.0f);
        Vector4 e2 = prj.project(p);
        g.drawLine((int) s1.x(), (int) s1.y(), (int) e1.x(),
            (int) e1.y());
        g.drawLine((int) s2.x(), (int) s2.y(), (int) e2.x(),
            (int) e2.y());
        offset += delta;
      }
    }
  }
View Full Code Here

    if (enableDebugInfo) {
      // Draw normals
      Vector4 wc = new Vector4();
      wc.x(p1.worldPos.x() + p2.worldPos.x() + p3.worldPos.x());
      wc.y(p1.worldPos.y() + p2.worldPos.y() + p3.worldPos.y());
      wc.z(p1.worldPos.z() + p2.worldPos.z() + p3.worldPos.z());
      wc.w(1.0f);
      wc.multSelf(1.0f / 3.0f);
      Vector4 pc = prj.project(wc);
      Vector4 pn = prj.project(wc.add(face.getNormal()));
View Full Code Here

      wc.w(1.0f);
      wc.multSelf(1.0f / 3.0f);
      Vector4 pc = prj.project(wc);
      Vector4 pn = prj.project(wc.add(face.getNormal()));
      g.setColor(Color.BLUE);
      g.drawLine((int) pc.x(), (int) pc.y(), (int) pn.x(), (int) pn.y());
    }
  }

  protected void drawEdge(Graphics2D g, PointData p1, PointData p2,
      HullEdge edge, boolean visible) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.