|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectt3.hrd.state.JOGLHelper
public class JOGLHelper
Nested Class Summary | |
---|---|
static class |
JOGLHelper.OGLException
|
static class |
JOGLHelper.PropertiesException
|
static class |
JOGLHelper.TesselatedPolygonComponent
tesselation! |
Constructor Summary | |
---|---|
JOGLHelper()
|
Method Summary | |
---|---|
static java.util.List<Jama.Matrix> |
applyMatrixToSetOfMatrices(Jama.Matrix m,
java.util.List<Jama.Matrix> ms)
|
static Jama.Matrix[] |
applyMatrixToSetOfMatrices(Jama.Matrix m,
Jama.Matrix[] ms)
|
static boolean |
areasIntersect(java.awt.geom.Area i,
java.awt.geom.Area j)
|
static int[] |
bufferedImageToIntArrayForTextureWithoutCopyIfPossible(java.awt.image.BufferedImage b)
|
static short[] |
bufferedImageToShortArrayForTextureWithoutCopyIfPossible(java.awt.image.BufferedImage b)
|
static java.awt.geom.Area |
cleanUpPolygonalArea(java.awt.geom.Area messyArea)
|
static java.awt.image.BufferedImage |
convertBufferedImageToNewTypeIfNecessary(java.awt.image.BufferedImage o,
int newType)
|
static java.awt.image.BufferedImage |
createNewBufferedImageForTexture(int w,
int h,
boolean useUSHORT565RGBnotINTARGB)
|
static java.awt.image.ColorModel |
createNewColorModelForTexture(boolean useUSHORT565RGBnotINTARGB)
|
static java.awt.image.BufferedImage |
createNewImageFromPartOfImageAWithoutSharing(int x,
int y,
int w,
int h,
java.awt.image.BufferedImage a)
|
static java.awt.image.BufferedImage |
createNewImageFromPartOfImageAWithSharing(int ax,
int ay,
int w,
int h,
int offsetXInNewImage,
int offsetYInNewImage,
java.awt.image.BufferedImage a)
|
static java.awt.image.WritableRaster |
createNewRasterForTexture(int w,
int h,
boolean useUSHORT565RGBnotINTARGB)
|
static java.awt.image.SampleModel |
createNewSampleModelForTexture(int w,
int h,
boolean useUSHORT565RGBnotINTARGB)
|
static java.awt.geom.Rectangle2D |
createUnionButIgnoreZeroAreaRects(java.awt.geom.Rectangle2D a,
java.awt.geom.Rectangle2D b)
|
static void |
drawRectangleCorrectSize(java.awt.Graphics2D g,
java.awt.Rectangle r)
|
static void |
drawShapesInRandomColors(java.awt.Graphics2D g,
java.util.List<java.awt.Shape> ss)
|
static boolean |
equalToPrecision(double a,
double b,
double precision)
|
static java.util.List<java.lang.String> |
explode(java.lang.String v,
java.lang.String sep)
|
static void |
fillAreaPolysInRandomColors(java.awt.Graphics2D g,
java.awt.geom.Area a)
|
static void |
fillShapeInRandomColor(java.awt.Graphics2D g,
java.awt.Shape s)
|
static Jama.Matrix[] |
get2hmCornerPointsFrom2r(java.awt.geom.Rectangle2D r)
|
static Jama.Matrix |
get2hmIdentity()
|
static java.util.List<java.util.List<Jama.Matrix>> |
get2hmPolysFromPolygonalArea(java.awt.geom.Area a)
|
static Jama.Matrix |
get2hmRotation(double thetaClockwise)
|
static Jama.Matrix |
get2hmScale(double sx,
double sy)
|
static Jama.Matrix |
get2hmScaRotTra(double sx,
double sy,
double thetaClockwise,
double dx,
double dy)
|
static Jama.Matrix |
get2hmTranslation(double dx,
double dy)
|
static Jama.Matrix |
get3hmIdentity()
|
static Jama.Matrix |
get3hmScale(double sx,
double sy,
double sz)
|
static Jama.Matrix |
get3hmTranslation(double dx,
double dy,
double dz)
|
static java.awt.image.BufferedImage |
getBIthatUsesAllOfBuffer(java.awt.image.BufferedImage b)
|
static java.awt.geom.Rectangle2D |
getBoundingRectFrom2hmPoly(java.util.List<Jama.Matrix> poly,
Jama.Matrix transform)
|
static java.awt.geom.Rectangle2D.Double |
getBoundingRectFrom2hmPoly(Jama.Matrix[] poly,
Jama.Matrix transform)
|
static java.awt.geom.Area |
getCopyOfArea(java.awt.geom.Area a)
|
static double[] |
getDFromM(Jama.Matrix m)
|
static double |
getDistanceBetween2hmPoints(Jama.Matrix pt1,
Jama.Matrix pt2)
|
static double |
getDistOfPointFromLine(double px,
double py,
Jama.Matrix lp1,
Jama.Matrix lp2)
|
static double |
getDistOfPointFromLine(Jama.Matrix p,
Jama.Matrix lp1,
Jama.Matrix lp2)
|
static double |
getDistOfPointFromPoly(double px,
double py,
Jama.Matrix[] poly)
|
static java.awt.geom.GeneralPath |
getGeneralPathFrom2hmPoly(java.util.List<Jama.Matrix> poly)
|
static java.awt.geom.GeneralPath |
getGeneralPathFrom2hmPoly(Jama.Matrix[] poly)
|
static double |
getHarvilleDistOfPointFromPoly(double px,
double py,
Jama.Matrix[] poly)
|
static java.awt.geom.Point2D |
getIntersectionOfTwoLines(double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double x4,
double y4)
Computes the intersection between two lines. |
static Jama.Matrix |
getIntersectionOfTwoLines(Jama.Matrix l1a,
Jama.Matrix l1b,
Jama.Matrix l2a,
Jama.Matrix l2b)
|
static Jama.Matrix |
getm2hTo3hSettingZToConst(double z)
|
static Jama.Matrix |
getm3hTo2hDiscardZDoNotProject()
|
static Jama.Matrix[] |
getMatrixArrayFromMatrixList(java.util.List<Jama.Matrix> poly)
|
static Jama.Matrix |
getMFromD(double[] d)
|
static Jama.Matrix |
getMFromD(double d1,
double d2,
double d3)
|
static Jama.Matrix |
getMFromD(double d1,
double d2,
double d3,
double d4)
|
static int |
getNearestPowerOfTwoGE(int i)
|
static double |
getNormalisedAngleRads(double o)
GEOM STUFF *********************** |
static Jama.Matrix |
getPlaneToPlaneHomogMatrixFromFour2hmPointCorrespondances(Jama.Matrix[] pointsFrom2hm,
Jama.Matrix[] pointsTo2hm)
|
static Jama.Matrix |
getPlaneToPlaneHomogMatrixFromN2hmPointCorrespondances(Jama.Matrix[] pointsFrom2hm,
Jama.Matrix[] pointsTo2hm,
int n)
|
static double |
getPolarAngleOfLineBetween2hmPoints(Jama.Matrix pt1,
Jama.Matrix pt2)
|
static Jama.Matrix |
getProjectionMatrixFromFrustum(double left,
double right,
double bottom,
double top,
double near,
double far)
|
static java.awt.Color |
getRandomColor(int alpha)
|
static Jama.Matrix |
getViewportMatrix(double w,
double h,
double cx,
double cy,
double f,
double n)
|
static double[] |
homogeniseD(double[] v)
|
static Jama.Matrix |
homogeniseM(Jama.Matrix m)
|
static java.lang.String |
implode(java.util.List<?> l,
java.lang.String sep)
|
static java.awt.image.WritableRaster |
intArrayToWritableRasterForTextureWithoutCopy(int[] buff,
int w,
int h)
|
static void |
logMatrix(java.util.logging.Logger logger,
java.util.logging.Level level,
java.lang.String msg,
Jama.Matrix m)
|
static java.lang.String |
matrixToString(Jama.Matrix m,
int w,
int d)
|
static double |
mean(java.util.List<java.lang.Double> l)
|
static double |
moduloAndPositive(double n,
double mod)
|
static void |
oglColor(javax.media.opengl.GL gl,
java.awt.Color c)
|
static void |
oglColorFromARGBint(javax.media.opengl.GL gl,
int ARGB)
|
static int |
oglCreateTexture(javax.media.opengl.GL gl,
int w,
int h,
java.awt.image.BufferedImage b)
|
static boolean |
oglCurrentBoundTextureIsResident(javax.media.opengl.GL gl)
|
static void |
oglDestroyTexture(javax.media.opengl.GL gl,
int textureName)
|
static void |
oglDrawTesselatedPolygon(javax.media.opengl.GL gl,
java.util.List<JOGLHelper.TesselatedPolygonComponent> l)
|
static void |
oglReportIfError(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu)
|
static void |
oglTesselateAndDraw2hmPoly(javax.media.opengl.GL gl,
java.lang.Iterable<Jama.Matrix> m2hPoints,
Jama.Matrix m2hTo3hTransform)
|
static void |
oglThrowExceptionIfError(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu)
|
static void |
oglUpdateTextureContents(javax.media.opengl.GL gl,
int tx,
int ty,
int iw,
int ih,
java.awt.image.BufferedImage b)
|
static void |
oglVertex4dFromM(javax.media.opengl.GL gl,
Jama.Matrix m)
|
static void |
oglVertex4dFromMs(javax.media.opengl.GL gl,
java.util.List<Jama.Matrix> ms,
Jama.Matrix transform)
|
static void |
pastePartOfImageAIntoPartOfImageBWithoutSharing(int bx,
int by,
int ax,
int ay,
int w,
int h,
java.awt.image.BufferedImage a,
java.awt.image.BufferedImage b)
|
static void |
printOutPoint(Jama.Matrix m2hPoint)
|
static void |
printOutPolygon(java.util.List<Jama.Matrix> poly)
|
static void |
printOutPolygons(java.util.List<java.util.List<Jama.Matrix>> polys)
|
static boolean |
props_getBoolean(java.util.Properties p,
java.lang.String s)
|
static double |
props_getDouble(java.util.Properties p,
java.lang.String s)
|
static int |
props_getInt(java.util.Properties p,
java.lang.String s)
|
static java.util.List<java.lang.Integer> |
props_getIntList(java.util.Properties p,
java.lang.String k)
|
static java.lang.String |
props_getString(java.util.Properties p,
java.lang.String s)
|
static java.util.List<java.lang.String> |
props_getStringList(java.util.Properties p,
java.lang.String s)
|
static void |
props_setList(java.util.List<?> l,
java.util.Properties p,
java.lang.String s)
|
static boolean |
rectanglesAreEqualToPrecision(java.awt.geom.Rectangle2D i,
java.awt.geom.Rectangle2D j,
double precision)
|
static void |
removeLimbsWidthLessThanD(java.util.List<Jama.Matrix> poly,
double d)
|
static Jama.Matrix[] |
rotateArray(Jama.Matrix[] a,
int n)
|
static double |
sd(java.util.List<java.lang.Double> l)
|
static java.awt.image.WritableRaster |
shortArrayToWritableRasterForTextureWithoutCopy(short[] buff,
int w,
int h)
|
static void |
sortAscending(java.util.List<java.lang.Double> l)
STATS STUFF *********************** |
static void |
storePropertiesSorted(java.util.Properties p,
java.io.OutputStream out,
java.lang.String comments)
writing out a properties file |
static java.util.List<JOGLHelper.TesselatedPolygonComponent> |
tesselateJavaAreaInto2hmPolys(java.awt.geom.Area a,
Jama.Matrix mTransform)
|
static double[] |
unhomogeniseD(double[] v)
|
static Jama.Matrix |
unhomogeniseM(Jama.Matrix m)
|
static void |
unHomogeniseMInPlaceLeavingThreeEls(Jama.Matrix m)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JOGLHelper()
Method Detail |
---|
public static java.lang.String implode(java.util.List<?> l, java.lang.String sep)
public static void logMatrix(java.util.logging.Logger logger, java.util.logging.Level level, java.lang.String msg, Jama.Matrix m)
public static void props_setList(java.util.List<?> l, java.util.Properties p, java.lang.String s)
public static java.util.List<java.lang.String> props_getStringList(java.util.Properties p, java.lang.String s) throws JOGLHelper.PropertiesException
JOGLHelper.PropertiesException
public static java.util.List<java.lang.String> explode(java.lang.String v, java.lang.String sep)
public static java.util.List<java.lang.Integer> props_getIntList(java.util.Properties p, java.lang.String k) throws JOGLHelper.PropertiesException
JOGLHelper.PropertiesException
public static java.lang.String props_getString(java.util.Properties p, java.lang.String s) throws JOGLHelper.PropertiesException
JOGLHelper.PropertiesException
public static int props_getInt(java.util.Properties p, java.lang.String s) throws JOGLHelper.PropertiesException
JOGLHelper.PropertiesException
public static double props_getDouble(java.util.Properties p, java.lang.String s) throws JOGLHelper.PropertiesException
JOGLHelper.PropertiesException
public static boolean props_getBoolean(java.util.Properties p, java.lang.String s) throws JOGLHelper.PropertiesException
JOGLHelper.PropertiesException
public static void sortAscending(java.util.List<java.lang.Double> l)
public static double mean(java.util.List<java.lang.Double> l)
public static double sd(java.util.List<java.lang.Double> l)
public static boolean oglCurrentBoundTextureIsResident(javax.media.opengl.GL gl)
public static int oglCreateTexture(javax.media.opengl.GL gl, int w, int h, java.awt.image.BufferedImage b)
public static void oglDestroyTexture(javax.media.opengl.GL gl, int textureName)
public static void oglUpdateTextureContents(javax.media.opengl.GL gl, int tx, int ty, int iw, int ih, java.awt.image.BufferedImage b)
public static java.awt.image.BufferedImage createNewBufferedImageForTexture(int w, int h, boolean useUSHORT565RGBnotINTARGB)
public static java.awt.image.WritableRaster createNewRasterForTexture(int w, int h, boolean useUSHORT565RGBnotINTARGB)
public static java.awt.image.SampleModel createNewSampleModelForTexture(int w, int h, boolean useUSHORT565RGBnotINTARGB)
public static java.awt.image.ColorModel createNewColorModelForTexture(boolean useUSHORT565RGBnotINTARGB)
public static java.awt.image.WritableRaster intArrayToWritableRasterForTextureWithoutCopy(int[] buff, int w, int h)
public static java.awt.image.WritableRaster shortArrayToWritableRasterForTextureWithoutCopy(short[] buff, int w, int h)
public static int[] bufferedImageToIntArrayForTextureWithoutCopyIfPossible(java.awt.image.BufferedImage b)
public static short[] bufferedImageToShortArrayForTextureWithoutCopyIfPossible(java.awt.image.BufferedImage b)
public static java.awt.image.BufferedImage getBIthatUsesAllOfBuffer(java.awt.image.BufferedImage b)
public static java.awt.image.BufferedImage createNewImageFromPartOfImageAWithoutSharing(int x, int y, int w, int h, java.awt.image.BufferedImage a)
public static java.awt.image.BufferedImage createNewImageFromPartOfImageAWithSharing(int ax, int ay, int w, int h, int offsetXInNewImage, int offsetYInNewImage, java.awt.image.BufferedImage a)
public static void pastePartOfImageAIntoPartOfImageBWithoutSharing(int bx, int by, int ax, int ay, int w, int h, java.awt.image.BufferedImage a, java.awt.image.BufferedImage b)
public static java.awt.image.BufferedImage convertBufferedImageToNewTypeIfNecessary(java.awt.image.BufferedImage o, int newType)
public static java.awt.Color getRandomColor(int alpha)
public static void drawShapesInRandomColors(java.awt.Graphics2D g, java.util.List<java.awt.Shape> ss)
public static void fillShapeInRandomColor(java.awt.Graphics2D g, java.awt.Shape s)
public static void fillAreaPolysInRandomColors(java.awt.Graphics2D g, java.awt.geom.Area a)
public static java.awt.geom.Area cleanUpPolygonalArea(java.awt.geom.Area messyArea)
public static void removeLimbsWidthLessThanD(java.util.List<Jama.Matrix> poly, double d)
public static void printOutPolygons(java.util.List<java.util.List<Jama.Matrix>> polys)
public static void printOutPolygon(java.util.List<Jama.Matrix> poly)
public static void printOutPoint(Jama.Matrix m2hPoint)
public static double getNormalisedAngleRads(double o)
public static double moduloAndPositive(double n, double mod)
public static void drawRectangleCorrectSize(java.awt.Graphics2D g, java.awt.Rectangle r)
public static Jama.Matrix getIntersectionOfTwoLines(Jama.Matrix l1a, Jama.Matrix l1b, Jama.Matrix l2a, Jama.Matrix l2b)
public static java.awt.geom.Point2D getIntersectionOfTwoLines(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
x1
- Point 1 of Line 1y1
- Point 1 of Line 1x2
- Point 2 of Line 1y2
- Point 2 of Line 1x3
- Point 1 of Line 2y3
- Point 1 of Line 2x4
- Point 2 of Line 2y4
- Point 2 of Line 2
public static java.awt.geom.Area getCopyOfArea(java.awt.geom.Area a)
public static boolean rectanglesAreEqualToPrecision(java.awt.geom.Rectangle2D i, java.awt.geom.Rectangle2D j, double precision)
public static boolean equalToPrecision(double a, double b, double precision)
public static boolean areasIntersect(java.awt.geom.Area i, java.awt.geom.Area j)
public static java.awt.geom.Rectangle2D createUnionButIgnoreZeroAreaRects(java.awt.geom.Rectangle2D a, java.awt.geom.Rectangle2D b)
public static int getNearestPowerOfTwoGE(int i)
public static Jama.Matrix getProjectionMatrixFromFrustum(double left, double right, double bottom, double top, double near, double far)
public static Jama.Matrix getViewportMatrix(double w, double h, double cx, double cy, double f, double n)
public static Jama.Matrix getm2hTo3hSettingZToConst(double z)
public static Jama.Matrix getm3hTo2hDiscardZDoNotProject()
public static Jama.Matrix[] rotateArray(Jama.Matrix[] a, int n)
public static Jama.Matrix get2hmScale(double sx, double sy)
public static Jama.Matrix get3hmScale(double sx, double sy, double sz)
public static Jama.Matrix get2hmIdentity()
public static Jama.Matrix get3hmIdentity()
public static Jama.Matrix get2hmTranslation(double dx, double dy)
public static Jama.Matrix get2hmScaRotTra(double sx, double sy, double thetaClockwise, double dx, double dy)
public static Jama.Matrix get3hmTranslation(double dx, double dy, double dz)
public static Jama.Matrix get2hmRotation(double thetaClockwise)
public static double getDistanceBetween2hmPoints(Jama.Matrix pt1, Jama.Matrix pt2)
public static double getPolarAngleOfLineBetween2hmPoints(Jama.Matrix pt1, Jama.Matrix pt2)
public static Jama.Matrix[] applyMatrixToSetOfMatrices(Jama.Matrix m, Jama.Matrix[] ms)
public static java.util.List<Jama.Matrix> applyMatrixToSetOfMatrices(Jama.Matrix m, java.util.List<Jama.Matrix> ms)
public static double[] unhomogeniseD(double[] v)
public static Jama.Matrix homogeniseM(Jama.Matrix m)
public static void unHomogeniseMInPlaceLeavingThreeEls(Jama.Matrix m)
public static Jama.Matrix unhomogeniseM(Jama.Matrix m)
public static double[] homogeniseD(double[] v)
public static double[] getDFromM(Jama.Matrix m)
public static Jama.Matrix getMFromD(double[] d)
public static Jama.Matrix getMFromD(double d1, double d2, double d3)
public static Jama.Matrix getMFromD(double d1, double d2, double d3, double d4)
public static java.awt.geom.Rectangle2D getBoundingRectFrom2hmPoly(java.util.List<Jama.Matrix> poly, Jama.Matrix transform)
poly
- transform
- can be null if desired
public static java.awt.geom.Rectangle2D.Double getBoundingRectFrom2hmPoly(Jama.Matrix[] poly, Jama.Matrix transform)
poly
- transform
- can be null if desired
public static Jama.Matrix[] getMatrixArrayFromMatrixList(java.util.List<Jama.Matrix> poly)
public static java.awt.geom.GeneralPath getGeneralPathFrom2hmPoly(java.util.List<Jama.Matrix> poly)
public static java.awt.geom.GeneralPath getGeneralPathFrom2hmPoly(Jama.Matrix[] poly)
public static double getDistOfPointFromPoly(double px, double py, Jama.Matrix[] poly)
public static double getHarvilleDistOfPointFromPoly(double px, double py, Jama.Matrix[] poly)
public static double getDistOfPointFromLine(double px, double py, Jama.Matrix lp1, Jama.Matrix lp2)
public static double getDistOfPointFromLine(Jama.Matrix p, Jama.Matrix lp1, Jama.Matrix lp2)
public static java.util.List<java.util.List<Jama.Matrix>> get2hmPolysFromPolygonalArea(java.awt.geom.Area a)
public static Jama.Matrix[] get2hmCornerPointsFrom2r(java.awt.geom.Rectangle2D r)
public static Jama.Matrix getPlaneToPlaneHomogMatrixFromFour2hmPointCorrespondances(Jama.Matrix[] pointsFrom2hm, Jama.Matrix[] pointsTo2hm)
public static Jama.Matrix getPlaneToPlaneHomogMatrixFromN2hmPointCorrespondances(Jama.Matrix[] pointsFrom2hm, Jama.Matrix[] pointsTo2hm, int n)
public static void oglVertex4dFromM(javax.media.opengl.GL gl, Jama.Matrix m)
public static void oglVertex4dFromMs(javax.media.opengl.GL gl, java.util.List<Jama.Matrix> ms, Jama.Matrix transform)
public static void oglThrowExceptionIfError(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu) throws JOGLHelper.OGLException
JOGLHelper.OGLException
public static void oglReportIfError(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu)
public static void oglColor(javax.media.opengl.GL gl, java.awt.Color c)
public static void oglColorFromARGBint(javax.media.opengl.GL gl, int ARGB)
public static java.lang.String matrixToString(Jama.Matrix m, int w, int d)
public static void storePropertiesSorted(java.util.Properties p, java.io.OutputStream out, java.lang.String comments) throws java.io.IOException
java.io.IOException
public static java.util.List<JOGLHelper.TesselatedPolygonComponent> tesselateJavaAreaInto2hmPolys(java.awt.geom.Area a, Jama.Matrix mTransform)
public static void oglDrawTesselatedPolygon(javax.media.opengl.GL gl, java.util.List<JOGLHelper.TesselatedPolygonComponent> l)
public static void oglTesselateAndDraw2hmPoly(javax.media.opengl.GL gl, java.lang.Iterable<Jama.Matrix> m2hPoints, Jama.Matrix m2hTo3hTransform)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |