|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.core.LinearAlgebra
public class LinearAlgebra
The class LinearAlgebra provides more methods to the class Point2D
Constructor Summary | |
---|---|
LinearAlgebra()
|
Method Summary | |
---|---|
static void |
assignMinus2D(java.awt.geom.Point2D P2,
java.awt.geom.Point2D P1)
public void assignMinus2D(Point2D P2, Point2D P1) assigns to P2 the value (P2 - P1). |
static java.awt.geom.Point2D |
convexCombination(double t,
java.awt.geom.Point2D P1,
java.awt.geom.Point2D P2)
public Point2D convexCombination(double t, Point2D P1, Point2D P2) returns a new object with value P1 + t*(P2-P1). |
double |
determinant(java.awt.geom.Point2D P,
java.awt.geom.Point2D Q)
public double determinant(Point2D P, Point2D Q) returns (P.x*Q.y - P.y*Q.x). |
static double |
dotProduct(java.awt.geom.Point2D P,
java.awt.geom.Point2D Q)
public double dotProduct(Point2D P, Point2D Q) returns (P.x*Q.x + P.y*Q.y). |
static java.awt.geom.Point2D |
intersectTwoLines(double P1x,
double P1y,
double P2x,
double P2y,
double Q1x,
double Q1y,
double Q2x,
double Q2y)
public Point2D intersectTwoLines(double P1x, double P1y, double P2x, double P2y, double Q1x, double Q1y, double Q2x, double Q2y) returns the intersection point of P1 + s(P2 - P1) and Q1 + t(Q2 - Q1), where these four points are given by their double coordinates. |
static java.awt.geom.Point2D |
intersectTwoLines(java.awt.geom.Point2D P1,
java.awt.geom.Point2D P2,
java.awt.geom.Point2D Q1,
java.awt.geom.Point2D Q2)
public Point2D intersectTwoLines(Point2D P1, Point2D P2, Point2D Q1, Point2D Q2) returns the intersection point of P1 + s(P2 - P1) and Q1 + t(Q2 - Q1). |
static java.awt.geom.Point2D |
linearCombination(double t1,
double t2,
java.awt.geom.Point2D P1,
java.awt.geom.Point2D P2)
public Point2D convexCombination(double t1, double t2, Point2D P1, Point2D P2) returns a new object with value (t1*P1 + t2*P2). |
static java.awt.geom.Point2D |
minus2D(java.awt.geom.Point2D P2,
java.awt.geom.Point2D P1)
public Point2D minus2D(Point2D P2, Point2D P1) returns a new object with value (P2 - P1). |
static java.awt.geom.Point2D |
normalTo(java.awt.geom.Point2D P)
public Point2D normalTo(Point2D P) returns new object N = (P.y, -P.x). |
static java.awt.geom.Point2D |
normalTo(java.awt.geom.Point2D P2,
java.awt.geom.Point2D P1)
public Point2D normalTo(Point2D P2, Point2D P1) = normalTo(minus2D(P2,P1)). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinearAlgebra()
Method Detail |
---|
public static java.awt.geom.Point2D minus2D(java.awt.geom.Point2D P2, java.awt.geom.Point2D P1)
public static void assignMinus2D(java.awt.geom.Point2D P2, java.awt.geom.Point2D P1)
public static java.awt.geom.Point2D convexCombination(double t, java.awt.geom.Point2D P1, java.awt.geom.Point2D P2)
public static java.awt.geom.Point2D linearCombination(double t1, double t2, java.awt.geom.Point2D P1, java.awt.geom.Point2D P2)
public static java.awt.geom.Point2D normalTo(java.awt.geom.Point2D P)
public static java.awt.geom.Point2D normalTo(java.awt.geom.Point2D P2, java.awt.geom.Point2D P1)
public static double dotProduct(java.awt.geom.Point2D P, java.awt.geom.Point2D Q)
public double determinant(java.awt.geom.Point2D P, java.awt.geom.Point2D Q)
public static java.awt.geom.Point2D intersectTwoLines(java.awt.geom.Point2D P1, java.awt.geom.Point2D P2, java.awt.geom.Point2D Q1, java.awt.geom.Point2D Q2)
public static java.awt.geom.Point2D intersectTwoLines(double P1x, double P1y, double P2x, double P2y, double Q1x, double Q1y, double Q2x, double Q2y)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |