Package toxi.geom

Examples of toxi.geom.Vec2D


public class BezierControlNode implements Serializable {
  public Vec2D c1 = new Vec2D(0, 0);
  public Vec2D c2 = new Vec2D(0, 0);

  public BezierControlNode(Vec2D c1In, Vec2D c2In) {
    this.c1 = new Vec2D(c1In.x, c1In.y);
    this.c2 = new Vec2D(c2In.x, c2In.y);

  }
View Full Code Here


  }

  @Override
  public BezierControlNode clone() {
    return new BezierControlNode(new Vec2D(this.c1.x, this.c1.y),
        new Vec2D(this.c2.x, this.c2.y));

  }
View Full Code Here

    clone.linkedObject = this.linkedObject;
    return clone;
  }

  public void rotate(float r) {
    Vec2D centre = this.outlines.getCentre();
    this.outlines.rotate(r,centre);
    this.collisionOutlines.rotate(r,centre);


  }
View Full Code Here

  public Vec2D controlPoint1 = null;
  public Vec2D controlPoint2 = null;

  public spPoint(float x, float y) {
    super(x, y);
    this.controlPoint1 = new Vec2D(x, y);
    this.controlPoint2 = new Vec2D(x, y);
  }
View Full Code Here

  public spPoint(Vec2D vec) {
    this.x = vec.x;
    this.y = vec.y;

    this.controlPoint1 = new Vec2D(vec.x, vec.y);
    this.controlPoint2 = new Vec2D(vec.x, vec.y);
  }
View Full Code Here

  @Override
  protected spPoint clone() {
    spPoint returnPoint = new spPoint(this.x, this.y);

    if (this.controlPoint1 != null)
      returnPoint.controlPoint1 = new Vec2D(this.controlPoint1.x,
          this.controlPoint1.y);

    if (this.controlPoint2 != null)
      returnPoint.controlPoint2 = new Vec2D(this.controlPoint2.x,
          this.controlPoint2.y);
    return returnPoint;

  }
View Full Code Here

      return false;
  }

  public Vec2D getControlPoint1() {
    if (controlPoint1 == null)
      return new Vec2D(this.x, this.y);
    else
      return controlPoint1;
  }
View Full Code Here

      return controlPoint1;
  }

  public Vec2D getControlPoint2() {
    if (controlPoint2 == null)
      return new Vec2D(this.x, this.y);
    else
      return controlPoint2;
  }
View Full Code Here

      mousePos.x = newX + ((chairCentreOfMass.x) / GLOBAL.jBullet.scale);
      mousePos.y = newY + ((chairCentreOfMass.y) / GLOBAL.jBullet.scale);
      //mousePos.z = centreMouseDeltaZ + chairCentreOfMass.Z;
    }

    Vec2D intersect2D = null;
    if (mousePos != null) {
      intersect2D = new Vec2D(mousePos.x, mousePos.y);
      //intersect2D = new Vec2D(mousePoint.x, mousePoint.y);

    } else {
      intersect2D = new Vec2D(mousePoint.x, mousePoint.y);
    }
    if (intersect2D == null)
      intersect2D = new Vec2D(mousePoint.x, mousePoint.y);

    return intersect2D;

  }
View Full Code Here

      mousePos.x = newX + ((chairCentreOfMass.x) / GLOBAL.jBullet.scale);
      mousePos.y = newY + ((chairCentreOfMass.y) / GLOBAL.jBullet.scale);
      //mousePos.z = centreMouseDeltaZ + chairCentreOfMass.Z;
    }

    Vec2D intersect2D = null;
    if (mousePos != null) {
      intersect2D = new Vec2D(mousePos.x, mousePos.y);
      //intersect2D = new Vec2D(mousePoint.x, mousePoint.y);

    } else {
      intersect2D = new Vec2D(mousePoint.x, mousePoint.y);
    }
    if (intersect2D == null)
      intersect2D = new Vec2D(mousePoint.x, mousePoint.y);

    return intersect2D;

  }
View Full Code Here

TOP

Related Classes of toxi.geom.Vec2D

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.