|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.chart3D.engine.vecmath.GeomMath
public final class GeomMath extends java.lang.Object
A class to contain general or more specific mathematics functions.
| Modifier and Type | Field and Description |
|---|---|
static double |
epsilon
Small value |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
aboutEqual(double a,
double b)
Determines whether two specified values are about to be equal under some tolerance. |
static int |
clampByte(int val)
Clamp integer to byte values |
static boolean |
doLinesIntersect2D(Vector3d a1,
Vector3d a2,
Vector3d b1,
Vector3d b2)
Determines whether projected into view port plane line segments do intersects or not. |
static boolean |
inRangeIncluded(double r1,
double r2,
double value)
Determines whether the specified value is in range. |
static double |
lineEquation2D(Vector3d lp1,
Vector3d lp2,
Vector3d P)
Calculates a distance from a point to the given line. |
static boolean |
linesAreParallel2D(Vector3d a_lp1,
Vector3d a_lp2,
Vector3d b_lp1,
Vector3d b_lp2)
Determines whether two projected into view port plane lines are parallel or not. |
static double |
planeEquation(Vector3d RP,
Vector3d N,
Vector3d P)
Retrieves the distance from the plane of the given point. |
static boolean |
pointInTriangle2D(Vector3d tp1,
Vector3d tp2,
Vector3d tp3,
Vector3d P)
Determines whether the specified point is on the projected into view port plane triangle area. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static double epsilon
| Method Detail |
|---|
public static double planeEquation(Vector3d RP,
Vector3d N,
Vector3d P)
RP - a reference point of a planeN - a normal of a planeP - a point which distance will be calculated
public static boolean pointInTriangle2D(Vector3d tp1,
Vector3d tp2,
Vector3d tp3,
Vector3d P)
tp1 - the first triangle vertex positiontp2 - the second triangle vertex positiontp3 - the third triangle vertex positionP - the point to be checked position
public static boolean doLinesIntersect2D(Vector3d a1,
Vector3d a2,
Vector3d b1,
Vector3d b2)
a1 - the first line segment start positiona2 - the first line segment end positionb1 - the second line start positionb2 - the second line end position
public static boolean linesAreParallel2D(Vector3d a_lp1,
Vector3d a_lp2,
Vector3d b_lp1,
Vector3d b_lp2)
a_lp1 - the first line start positiona_lp2 - the first line end positionb_lp1 - the second line start positionb_lp2 - the second line end position
public static double lineEquation2D(Vector3d lp1,
Vector3d lp2,
Vector3d P)
lp1 - the first line end point positionlp2 - the second line end point positionP - the point to be checked
public static boolean inRangeIncluded(double r1,
double r2,
double value)
r1 - the range starting positionr2 - the range ending positionvalue - the value to check
public static boolean aboutEqual(double a,
double b)
a - the first valueb - the second valuepublic static int clampByte(int val)
val - value to clamp.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||