Examples of subSelf()


Examples of gml4u.model.GmlPoint.subSelf()

      //if (point.z != point.z) point.z = 0;
      //}

      for(int i=0; i<points.size(); i++) {
        GmlPoint p = points.get(i);
        p.subSelf(originShift);
        p.scaleSelf(scaling);

        // Fix NaN
        if (p.x != p.x || p.y != p.y || p.z != p.z) {
          points.remove(i);
View Full Code Here

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

  public void updateNormal() {
    Vector4 vv0 = Vector4.createPoint3D(v0.x(), v0.y(), v0.z());
    Vector4 vv1 = Vector4.createPoint3D(v1.x(), v1.y(), v1.z());
    Vector4 vv2 = Vector4.createPoint3D(v2.x(), v2.y(), v2.z());
    vv1.subSelf(vv0);
    vv2.subSelf(vv0);
    vv1.crossSelf(vv2);
    normal = vv1;
    normal.normalize();
  }
View Full Code Here

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

      return 0;
  }

  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 {
View Full Code Here

Examples of toxi.geom.Vec2D.subSelf()

  }

  public static Vec2D rotate(Vec2D curVec, Vec2D center, float r) {
    Vec2D returnVec = curVec.copy();
    returnVec.subSelf(center);
    returnVec.rotate(r);
    returnVec.addSelf(center);
    return returnVec;
   
   
View Full Code Here

Examples of toxi.geom.Vec2D.subSelf()

  }

  public static Vec2D rotate(Vec2D curVec, Vec2D center, float r) {
    Vec2D returnVec = curVec.copy();
    returnVec.subSelf(center);
    returnVec.rotate(r);
    returnVec.addSelf(center);
    return returnVec;
   
   
View Full Code Here

Examples of toxi.geom.Vec2D.subSelf()

      Vec2D dirEnd = endLeft.copy().sub(endRight).rotate((float) (Math.PI / 2));
      dirEnd.normalize();

      Vec2D bezierLeftEnd = this.outineLeft.get(
          this.outineLeft.size() - 1).copy();
      bezierLeftEnd.subSelf(dirEnd.scale(endLen * 1.5f));

      Vec2D bezierRightEnd = this.outineRight.get(
          this.outineRight.size() - 1).copy();
      bezierRightEnd.subSelf(dirEnd.scale(endLen * 1.5f));

 
View Full Code Here

Examples of toxi.geom.Vec2D.subSelf()

          this.outineLeft.size() - 1).copy();
      bezierLeftEnd.subSelf(dirEnd.scale(endLen * 1.5f));

      Vec2D bezierRightEnd = this.outineRight.get(
          this.outineRight.size() - 1).copy();
      bezierRightEnd.subSelf(dirEnd.scale(endLen * 1.5f));

 
      // bezierLeftEnd.addSelf(new Vec2D(100,100));

     
View Full Code Here

Examples of toxi.geom.Vec3D.subSelf()

                Vec2D intexsecX = new Vec2D(intersect.x,
                    intersect.y);

                if (intersect != null) {

                  intersect.subSelf(slicePlane.getPlane());

                  intersect
                      .rotateY((float) (functions.angleOf(new Vec2D(
                          slicePlane.getPlane().normal.x,
                          slicePlane.getPlane().normal.z)) - (Math.PI / 2)));
View Full Code Here

Examples of toxi.geom.Vec3D.subSelf()

            if (intersect != null) {
              Vec2D intexsecX = new Vec2D(intersect.x,
                  intersect.y);

              intersect.subSelf(slicePlane.getPlane());

              intersect
                  .rotateY((float) (functions.angleOf(new Vec2D(
                      slicePlane.getPlane().normal.x,
                      slicePlane.getPlane().normal.z)) - (Math.PI / 2)));
View Full Code Here

Examples of toxi.geom.Vec4D.subSelf()

        // k=1 => 1st derivative, k=2 => 2nd derivative, etc...
        for (int k = 1; k <= d; k++) {
            int tmp = degree - k + 1;
            for (int i = 0; i <= (r - k); i++) {
                Vec4D cw = new Vec4D(result[k - 1][i + 1]);
                cw.subSelf(result[k - 1][i]);
                cw.scaleSelf(tmp);
                cw.scaleSelf(1 / (uKnots.get(r1 + i + degree + 1) - uKnots
                        .get(r1 + i + k)));
                result[k][i] = cw;
            }
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.