|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmathematik.Util
public class Util
a loose collection of linear algebra methods that are not connected to a specific class.
| Field Summary | |
|---|---|
static Vector3f |
AXIS_X
|
static Vector3f |
AXIS_Y
|
static Vector3f |
AXIS_Z
|
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | |
|---|---|
static Vector2f |
add(Vector2f theVectorA,
Vector2f theVectorB)
add two vectors and return the result in a new instance. |
static Vector2i |
add(Vector2i theVectorA,
Vector2i theVectorB)
add two vectors and return the result in a new instance. |
static Vector3f |
add(Vector3f theVectorA,
Vector3f theVectorB)
add two vectors and return the result in a new instance. |
static Vector3i |
add(Vector3i theVectorA,
Vector3i theVectorB)
add two vectors and return the result in a new instance. |
static Vector4f |
add(Vector4f theVectorA,
Vector4f theVectorB)
add two vectors and return the result in a new instance. |
static float |
areaTriangle(Vector3f v0,
Vector3f v1,
Vector3f v2)
|
static float |
bilinearInterp(float x,
float y,
float q00,
float q10,
float q01,
float q11)
|
static void |
calculateNormal(Vector3f theVectorAB,
Vector3f theVectorBC,
Vector3f theResultNormal)
|
static void |
calculateNormal(Vector3f pointA,
Vector3f pointB,
Vector3f pointC,
Vector3f theResultNormal)
calculate a normal from a set of three vectors. |
static float |
clamp(float theValue,
float theMin,
float theMax)
|
static boolean |
contains(float theTestValue,
float theContainerValue,
float theRange)
|
static boolean |
contains(java.lang.String theString,
java.lang.CharSequence theContainedString)
|
static boolean |
contains(Vector3f thePosition,
WorldAxisAlignedBoundingBox theWorldAlignedBox)
|
static Vector3f |
createNormal(Vector3f theVectorAB,
Vector3f theVectorBC)
|
static Vector3f |
createNormal(Vector3f pointA,
Vector3f pointB,
Vector3f pointC)
|
static void |
createNormals(float[] theVertices,
float[] theNormals)
|
static Vector3f |
cross(Vector3f theVectorA,
Vector3f theVectorB)
return the cross between two vectors in a new vector. |
static float |
distance(Vector3f theVectorA,
Vector3f theVectorB)
return the distance between to points defined by two vectors. |
static float |
distancePointLine(Vector3f thePoint,
Vector3f theLineStart,
Vector3f theLineEnd)
|
static float |
distancePointLineSegment(Vector3f thePoint,
Vector3f theLineStart,
Vector3f theLineEnd)
DistancePointLine Unit Test Copyright (c) 2002, All rights reserved Damian Coventry Tuesday, 16 July 2002 Implementation of theory by Paul Bourke |
static float |
distancePointLineU(Vector3f thePoint,
Vector3f theLineStart,
Vector3f theLineEnd)
|
static TransformMatrix4f |
getRotationTransform(int theTransformMode,
TransformMatrix4f theTransform,
Vector3f theRotation,
Vector3f theScale)
|
static TransformMatrix4f |
getTranslateRotationTransform(int theTransformMode,
TransformMatrix4f theTransform,
Vector3f theRotation,
Vector3f theScale)
|
static boolean |
insidePolygon(Vector2f thePoint,
Vector2f[] thePolygon)
|
static boolean |
isPointInTriangle(Vector3f v0,
Vector3f v1,
Vector3f v2,
Vector3f thePoint)
|
float |
length(Vector3f theVector3f)
|
static float |
map(float theValue,
float theInStart,
float theInEnd,
float theOutStart,
float theOutEnd)
|
static float |
normalize(float theValue,
float theStart,
float theEnd)
|
static Vector3f |
normalized(Vector3f theVector)
return a normalized vector in a new vector. |
static Vector2f |
parseVector2f(java.lang.String theString)
|
static Vector3f |
parseVector3f(java.lang.String theString)
|
static void |
pointAlong(TransformMatrix4f theResult,
Vector3f theForwardVector,
Vector3f theUpVector)
|
static void |
pointAt(TransformMatrix4f theResult,
Vector3f theUpVector,
Vector3f thePointAtPosition)
|
static void |
pointAt(TransformMatrix4f theResult,
Vector3f thePosition,
Vector3f theUpVector,
Vector3f thePointAtPosition)
|
static float |
random(float theStart,
float theEnd)
|
static Vector3f |
rotatePoint(Vector3f p,
double theta,
Vector3f theAxis)
Rotate a point p by angle theta around an arbitrary axis r Return the rotated point. |
static Vector3f |
rotatePoint(Vector3f p,
double theta,
Vector3f p1,
Vector3f p2)
|
static Vector2f |
scale(Vector2f theVectorA,
float theValue)
|
static Vector3f |
scale(Vector3f theVectorA,
float theValue)
|
static Vector3f |
scale(Vector3f theVectorA,
Vector3f theValue)
|
static Vector4f |
scale(Vector4f theVectorA,
float theValue)
|
static Vector2f |
sub(Vector2f theVectorA,
Vector2f theVectorB)
subtract two vectors and return the result in a new instance. |
static Vector2i |
sub(Vector2i theVectorA,
Vector2i theVectorB)
subtract two vectors and return the result in a new instance. |
static Vector3f |
sub(Vector3f theVectorA,
Vector3f theVectorB)
subtract two vectors and return the result in a new instance. |
static Vector3i |
sub(Vector3i theVectorA,
Vector3i theVectorB)
subtract two vectors and return the result in a new instance. |
static Vector4f |
sub(Vector4f theVectorA,
Vector4f theVectorB)
subtract two vectors and return the result in a new instance. |
static void |
toLocalSpace(TransformMatrix4f theLocalSpace,
Vector3f theLocalResult)
|
static void |
updateBoundingBox(WorldAxisAlignedBoundingBox theWorldAxisAlignedBoundingBox,
Vector3f[] myVectors)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Vector3f AXIS_X
public static final Vector3f AXIS_Y
public static final Vector3f AXIS_Z
| Constructor Detail |
|---|
public Util()
| Method Detail |
|---|
public static final float areaTriangle(Vector3f v0,
Vector3f v1,
Vector3f v2)
public float length(Vector3f theVector3f)
public static final boolean isPointInTriangle(Vector3f v0,
Vector3f v1,
Vector3f v2,
Vector3f thePoint)
public static final boolean contains(Vector3f thePosition,
WorldAxisAlignedBoundingBox theWorldAlignedBox)
public static final boolean contains(float theTestValue,
float theContainerValue,
float theRange)
public static boolean insidePolygon(Vector2f thePoint,
Vector2f[] thePolygon)
public static void updateBoundingBox(WorldAxisAlignedBoundingBox theWorldAxisAlignedBoundingBox,
Vector3f[] myVectors)
public static void pointAt(TransformMatrix4f theResult,
Vector3f theUpVector,
Vector3f thePointAtPosition)
public static void pointAt(TransformMatrix4f theResult,
Vector3f thePosition,
Vector3f theUpVector,
Vector3f thePointAtPosition)
public static void pointAlong(TransformMatrix4f theResult,
Vector3f theForwardVector,
Vector3f theUpVector)
public static final void toLocalSpace(TransformMatrix4f theLocalSpace,
Vector3f theLocalResult)
public static final float bilinearInterp(float x,
float y,
float q00,
float q10,
float q01,
float q11)
public static final void calculateNormal(Vector3f pointA,
Vector3f pointB,
Vector3f pointC,
Vector3f theResultNormal)
pointA - pointB - pointC - theResultNormal -
public static final void calculateNormal(Vector3f theVectorAB,
Vector3f theVectorBC,
Vector3f theResultNormal)
theVectorAB - Vector3ftheVectorBC - Vector3ftheResultNormal - Vector3f
public static final Vector3f createNormal(Vector3f pointA,
Vector3f pointB,
Vector3f pointC)
pointA - Vector3fpointB - Vector3fpointC - Vector3f
public static final Vector3f createNormal(Vector3f theVectorAB,
Vector3f theVectorBC)
theVectorAB - Vector3ftheVectorBC - Vector3f
public static void createNormals(float[] theVertices,
float[] theNormals)
public static final float distance(Vector3f theVectorA,
Vector3f theVectorB)
theVectorA - Vector3ftheVectorB - Vector3f
public static final Vector4f add(Vector4f theVectorA,
Vector4f theVectorB)
theVectorA - Vector4ftheVectorB - Vector4f
public static final Vector3f add(Vector3f theVectorA,
Vector3f theVectorB)
theVectorA - Vector3ftheVectorB - Vector3f
public static final Vector2f add(Vector2f theVectorA,
Vector2f theVectorB)
theVectorA - Vector2ftheVectorB - Vector2f
public static final Vector3i add(Vector3i theVectorA,
Vector3i theVectorB)
theVectorA - Vector3itheVectorB - Vector3i
public static final Vector2i add(Vector2i theVectorA,
Vector2i theVectorB)
theVectorA - Vector2itheVectorB - Vector2i
public static final Vector4f sub(Vector4f theVectorA,
Vector4f theVectorB)
theVectorA - Vector4ftheVectorB - Vector4f
public static final Vector3f sub(Vector3f theVectorA,
Vector3f theVectorB)
theVectorA - Vector3ftheVectorB - Vector3f
public static final Vector2f sub(Vector2f theVectorA,
Vector2f theVectorB)
theVectorA - Vector2ftheVectorB - Vector2f
public static final Vector3i sub(Vector3i theVectorA,
Vector3i theVectorB)
theVectorA - Vector3itheVectorB - Vector3i
public static final Vector2i sub(Vector2i theVectorA,
Vector2i theVectorB)
theVectorA - Vector2itheVectorB - Vector2i
public static final Vector3f cross(Vector3f theVectorA,
Vector3f theVectorB)
theVectorA - Vector3ftheVectorB - Vector3f
public static final Vector3f normalized(Vector3f theVector)
theVector - Vector3f
public static final Vector2f scale(Vector2f theVectorA,
float theValue)
theVectorA - Vector2ftheValue - float
public static final Vector3f scale(Vector3f theVectorA,
float theValue)
public static final Vector3f scale(Vector3f theVectorA,
Vector3f theValue)
public static final Vector4f scale(Vector4f theVectorA,
float theValue)
public static final float clamp(float theValue,
float theMin,
float theMax)
public static final float normalize(float theValue,
float theStart,
float theEnd)
public static final float map(float theValue,
float theInStart,
float theInEnd,
float theOutStart,
float theOutEnd)
public static Vector2f parseVector2f(java.lang.String theString)
public static Vector3f parseVector3f(java.lang.String theString)
public static boolean contains(java.lang.String theString,
java.lang.CharSequence theContainedString)
public static Vector3f rotatePoint(Vector3f p,
double theta,
Vector3f theAxis)
p - Vector3ftheta - doubletheAxis - Vector3f
public static Vector3f rotatePoint(Vector3f p,
double theta,
Vector3f p1,
Vector3f p2)
public static float distancePointLineSegment(Vector3f thePoint,
Vector3f theLineStart,
Vector3f theLineEnd)
thePoint - Vector3ftheLineStart - Vector3ftheLineEnd - Vector3f
public static float distancePointLine(Vector3f thePoint,
Vector3f theLineStart,
Vector3f theLineEnd)
public static float distancePointLineU(Vector3f thePoint,
Vector3f theLineStart,
Vector3f theLineEnd)
public static float random(float theStart,
float theEnd)
public static TransformMatrix4f getTranslateRotationTransform(int theTransformMode,
TransformMatrix4f theTransform,
Vector3f theRotation,
Vector3f theScale)
public static TransformMatrix4f getRotationTransform(int theTransformMode,
TransformMatrix4f theTransform,
Vector3f theRotation,
Vector3f theScale)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||