|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jreality.math.P3
public class P3
Static methods for geometry of real projective 3-space (RP3). As with Pn
, some methods
are purely projective, while others relate to the various metric geometries contained
within projective geometry.
The bulk of the methods here fall into two categories:
Only methods which are specific to 3-dimensional space are included here. Actually most of
the methods of the first sort listed above could be generalized and moved to Pn
.
Any volunteers?
Scaling transformations are included here even though scaling is not an isometry in any
metric.
Rn
for method conventions and representation of matrices.
Pn
for other methods applicable in n-dimensional real projective space.
Field Summary | |
---|---|
static double[] |
p3involution
|
static double[] |
Q_ELLIPTIC
|
static double[] |
Q_EUCLIDEAN
|
static double[] |
Q_HYPERBOLIC
|
Method Summary | |
---|---|
static double |
affineCoordinate(double[] p1,
double[] p2,
double[] pw)
|
static double[] |
barycentricCoordinates(double[] weights,
double[] p0,
double[] p1,
double[] p)
|
static double[] |
composeMatrixFromFactors(double[] m,
double[] transV,
Quaternion rotQ,
Quaternion stretchRotQ,
double[] stretchV,
boolean isFlipped,
int sig)
|
static double[] |
extractOrientationMatrix(double[] dst,
double[] src,
double[] point,
int signature)
Extract a matrix from the src input matrix, such that it fixes the input position point. |
static double[] |
factorMatrix(double[] m,
double[] transV,
Quaternion rotQ,
Quaternion stretchRotQ,
double[] stretchV,
boolean[] isFlipped,
int sig)
see Graphics Gems IV, p. |
static boolean |
isometryIsUnstable(double[] matrix,
int signature)
|
static double[] |
lineIntersectPlane(double[] dst,
double[] p1,
double[] p2,
double[] plane)
Calculate the intersection point of the line determined by p1 and p2 with plane. |
static double[] |
lineJoinPoint(double[] plane,
double[] p1,
double[] p2,
double[] point)
|
static double[] |
makeGlideReflectionMatrix(double[] m,
double[] p1,
double[] p2,
double[] plane,
int signature)
Generate a glide reflection in the plane through the origin whose normal vector is given by vec Under construction. |
static double[] |
makeLookatMatrix(double[] m,
double[] from,
double[] to,
double roll,
int sig)
Creates an isometry that carries the from vector to the origin; and takes the normalized to vector to the (homogeneous) vector (0,0,-1,0). |
static double[] |
makeOrthographicProjectionMatrix(double[] m,
Rectangle2D viewport,
double near,
double far)
|
static double[] |
makePerspectiveProjectionMatrix(double[] dst,
Rectangle2D viewport,
double near,
double far)
Generate a 4x4 perspective projection matrix based on the parameters. |
static double[] |
makeReflectionMatrix(double[] m,
double[] plane,
int sig)
Construct a projective reflection that fixes the element plane considered as a pole/polar point/plane pair. |
static double[] |
makeRotationMatrix(double[] m,
double[] axis,
double angle)
Generate a rotation matrix fixing the origin (0,0,0,1) around the given axis with the given angle. |
static double[] |
makeRotationMatrix(double[] m,
double[] from,
double[] to)
Generate a rotation matrix which fixes the origin (0,0,0,1) and carries the vector from to the vector to. |
static double[] |
makeRotationMatrix(double[] m,
double[] p1,
double[] p2,
double angle,
int sig)
Calculate a rotation matrix in the given metric which rotates a given angle about the axis determined by p1 and p2. |
static double[] |
makeRotationMatrixX(double[] mat,
double angle)
|
static double[] |
makeRotationMatrixY(double[] mat,
double angle)
|
static double[] |
makeRotationMatrixZ(double[] mat,
double angle)
|
static double[] |
makeScaleMatrix(double[] dst,
double s)
For those who are uncomfortable with the word stretch -- even though only euclidean geometry supports scaling (changing size without changing shape). |
static double[] |
makeScaleMatrix(double[] dst,
double[] s)
|
static double[] |
makeScaleMatrix(double[] dst,
double sx,
double sy,
double sz)
|
static double[] |
makeScrewMotionMatrix(double[] dst,
double[] p1,
double[] p2,
double angle,
int sig)
|
static double[] |
makeStretchMatrix(double[] dst,
double stretch)
Create a diagonal matric with entries (stretch, stretch,stretch, 1) |
static double[] |
makeStretchMatrix(double[] dst,
double[] v)
Construct a diagonal matrix with the given entries. |
static double[] |
makeStretchMatrix(double[] dst,
double xscale,
double yscale,
double zscale)
Create a diagonal matric with entries (xscale, yscale, zscale, 1) |
static double[] |
makeTranslationMatrix(double[] dst,
double[] from,
double[] to,
int sig)
Calculate a translation matrix in the given metric which carries the point from to the point to. |
static double[] |
makeTranslationMatrix(double[] mat,
double[] to,
int sig)
Calculate a translation matrix which carries the origin (0,0,0,1 to the point to. |
static double |
orientation(double[] to,
double[] up,
double[] upNoRoll)
Calculate the determinant of the matrix spanned by the three input vectors and the origin (0,0,0,1). |
static double[] |
orthonormalizeMatrix(double[] dst,
double[] m,
double tolerance,
int signature)
Attempt to convert a matrix m into an isometry with respect to signature signature. |
static double[] |
perpendicularBisector(double[] dst,
double[] p1,
double[] p2,
int signature)
Calculate the plane coordinates for the plane which lies midway between the input planes p1 and p2. |
static double[] |
planeFromPoints(double[] planeIn,
double[] p1,
double[] p2,
double[] p3)
Construct the homogeneous plane coordinates for the plane containing the three points (p1, p2, p3). |
static double[] |
pointFromPlanes(double[] point,
double[] p1,
double[] p2,
double[] p3)
Via duality, an alias for planeFromPoints(double[], double[], double[], double[]) . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static double[] p3involution
public static double[] Q_HYPERBOLIC
public static double[] Q_EUCLIDEAN
public static double[] Q_ELLIPTIC
Method Detail |
---|
public static double[] composeMatrixFromFactors(double[] m, double[] transV, Quaternion rotQ, Quaternion stretchRotQ, double[] stretchV, boolean isFlipped, int sig)
m
- transV
- rotQ
- stretchRotQ
- stretchV
- isFlipped
- sig
-
public static double[] extractOrientationMatrix(double[] dst, double[] src, double[] point, int signature)
dst
- src
- point
- signature
-
public static double[] factorMatrix(double[] m, double[] transV, Quaternion rotQ, Quaternion stretchRotQ, double[] stretchV, boolean[] isFlipped, int sig)
m
- transV
- rotQ
- stretchRotQ
- stretchV
- isFlipped
- sig
-
public static double[] makeGlideReflectionMatrix(double[] m, double[] p1, double[] p2, double[] plane, int signature)
m
- vec
-
public static double[] makeLookatMatrix(double[] m, double[] from, double[] to, double roll, int sig)
m
- from
- to
- roll
- sig
-
public static double[] makeOrthographicProjectionMatrix(double[] m, Rectangle2D viewport, double near, double far)
m
- viewport
- n
- f
-
public static double[] makePerspectiveProjectionMatrix(double[] dst, Rectangle2D viewport, double near, double far)
dst
- matrix to put the resultviewport
- The viewport of the camera (normalized to lie in z = -1 plane)n
- near clipping planef
- far clipping plane
public static double[] makeReflectionMatrix(double[] m, double[] plane, int sig)
m
- vec
- sig
-
public static double[] makeRotationMatrix(double[] m, double[] axis, double angle)
m
- the target matrixaxis
- double[3]angle
-
public static double[] makeRotationMatrix(double[] m, double[] from, double[] to)
m
- double[16]from
- double[3]to
- double[3]
public static double[] makeRotationMatrix(double[] m, double[] p1, double[] p2, double angle, int sig)
m
- p1
- p2
- angle
- sig
-
public static double[] makeRotationMatrixX(double[] mat, double angle)
object
- earthPhi
-
public static double[] makeRotationMatrixY(double[] mat, double angle)
public static double[] makeRotationMatrixZ(double[] mat, double angle)
public static double[] makeStretchMatrix(double[] dst, double stretch)
dst
- stretch
-
public static double[] makeStretchMatrix(double[] dst, double xscale, double yscale, double zscale)
dst
- xscale
- yscale
- zscale
-
public static double[] makeStretchMatrix(double[] dst, double[] v)
dst
- scales
-
public static double[] makeScaleMatrix(double[] dst, double s)
dst
- s
-
public static double[] makeScaleMatrix(double[] dst, double[] s)
public static double[] makeScaleMatrix(double[] dst, double sx, double sy, double sz)
public static double[] makeScrewMotionMatrix(double[] dst, double[] p1, double[] p2, double angle, int sig)
public static double[] makeTranslationMatrix(double[] dst, double[] from, double[] to, int sig)
dst
- from
- to
- sig
-
public static double[] makeTranslationMatrix(double[] mat, double[] to, int sig)
mat
- to
- sig
-
public static double orientation(double[] to, double[] up, double[] upNoRoll)
to
- up
- upNoRoll
-
public static double[] orthonormalizeMatrix(double[] dst, double[] m, double tolerance, int signature)
dst
- m
- tolerance
- signature
-
public static boolean isometryIsUnstable(double[] matrix, int signature)
public static double[] perpendicularBisector(double[] dst, double[] p1, double[] p2, int signature)
dst
- p1
- p2
- signature
-
public static double[] planeFromPoints(double[] planeIn, double[] p1, double[] p2, double[] p3)
plane
- double[4]p1
- double[3] or double[4]p2
- double[3] or double[4]p3
- double[3] or double[4]
public static double[] lineIntersectPlane(double[] dst, double[] p1, double[] p2, double[] plane)
point
- p1
- p2
- plane
-
public static double[] pointFromPlanes(double[] point, double[] p1, double[] p2, double[] p3)
planeFromPoints(double[], double[], double[], double[])
.
point
- p1
- p2
- p3
-
public static double[] lineJoinPoint(double[] plane, double[] p1, double[] p2, double[] point)
public static double[] barycentricCoordinates(double[] weights, double[] p0, double[] p1, double[] p)
public static double affineCoordinate(double[] p1, double[] p2, double[] pw)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |