Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## proscene
Class PSUtility

    java.lang.Object
      proscene.PSUtility

    public class PSUtility

extends java.lang.Object

Utility class that complements the PVector and PMatrix classes.

Constructor Summary
`PSUtility()`

Method Summary
`static float[]` | `from4x4MatrixToArray(float[][] mat)` Utility function that returns the [16] float array version of the given `mat` matrix.
`static float[][]` | `fromArray4x4ToMatrix(float[] m)` Utility function that returns the [4][4] float matrix version of the given `m` array.
`static processing.core.PMatrix3D` | `fromOpenGLArray(float[] array)` Utility function that returns the PMatrix3D representation of the 16 `array` given in OpenGL format.
`static processing.core.PMatrix3D` | `fromOpenGLToPMatrix3D(float[][] matrix)` Utility function that returns the PMatrix3D representation of the 4x4 `matrix` given in OpenGL format.
`static float[][]` | `fromPMatrix3DToMatrix(processing.core.PMatrix3D pM)` Utility function that returns the [4][4]float matrix representation (European format) of the given PMatrix3D.
`static float[][]` | `fromPMatrix3DToOpenGL(processing.core.PMatrix3D pM)` Utility function that returns the [4][4]float matrix representation (OpenGL format) of the given PMatrix3D.
`static float[][]` | `get3x3UpperLeftMatrixFromPMatrix3D(processing.core.PMatrix3D pM)` Utility function that returns the 3x3 upper left sub-matrix of the given PMatrix3D.
`static processing.core.PVector` | `orthogonalVector(processing.core.PVector v)` Utility function that returns a PVector orthogonal to `v`.
`static processing.core.PVector` | `projectVectorOnAxis(processing.core.PVector src, processing.core.PVector direction)` Utility function that simply projects `src` on the axis of direction `direction` that passes through the origin.
`static processing.core.PVector` | `projectVectorOnPlane(processing.core.PVector src, processing.core.PVector normal)` Utility function that simply projects `src` on the plane whose normal is `normal` that passes through the origin.
`static float` | `squaredNorm(processing.core.PVector v)` Utility function that returns the squared norm of the PVector.
`static float[][]` | `transpose3x3Matrix(float[][] m)` Utility function that returns the transpose of the given 3X3 matrix.
`static float[][]` | `transpose4x4Matrix(float[][] m)` Utility function that returns the transpose of the given 4X4 matrix.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PSUtility

    public PSUtility()

Method Detail

### projectVectorOnAxis

    public static processing.core.PVector projectVectorOnAxis(processing.core.PVector src,
                                                              processing.core.PVector direction)

  Utility function that simply projects `src` on the axis of direction `direction` that passes through the origin.

  `direction` does not need to be normalized (but must be non null).

### projectVectorOnPlane

    public static processing.core.PVector projectVectorOnPlane(processing.core.PVector src,
                                                               processing.core.PVector normal)

  Utility function that simply projects `src` on the plane whose normal is `normal` that passes through the origin.

  `normal` does not need to be normalized (but must be non null).

### squaredNorm

    public static float squaredNorm(processing.core.PVector v)

  Utility function that returns the squared norm of the PVector.

### orthogonalVector

    public static processing.core.PVector orthogonalVector(processing.core.PVector v)

  Utility function that returns a PVector orthogonal to `v`. Its `mag()` depends on the PVector, but is zero only for a `null` PVector. Note that the function that associates an `orthogonalVector()` to a PVector is not continuous.

### fromOpenGLToPMatrix3D

    public static final processing.core.PMatrix3D fromOpenGLToPMatrix3D(float[][] matrix)

  Utility function that returns the PMatrix3D representation of the 4x4 `matrix` given in OpenGL format.

### fromOpenGLArray

    public static final processing.core.PMatrix3D fromOpenGLArray(float[] array)

  Utility function that returns the PMatrix3D representation of the 16 `array` given in OpenGL format.

### fromPMatrix3DToMatrix

    public static final float[][] fromPMatrix3DToMatrix(processing.core.PMatrix3D pM)

  Utility function that returns the [4][4]float matrix representation (European format) of the given PMatrix3D.

### fromPMatrix3DToOpenGL

    public static final float[][] fromPMatrix3DToOpenGL(processing.core.PMatrix3D pM)

  Utility function that returns the [4][4]float matrix representation (OpenGL format) of the given PMatrix3D.

### transpose3x3Matrix

    public static final float[][] transpose3x3Matrix(float[][] m)

  Utility function that returns the transpose of the given 3X3 matrix.

### transpose4x4Matrix

    public static final float[][] transpose4x4Matrix(float[][] m)

  Utility function that returns the transpose of the given 4X4 matrix.

### fromArray4x4ToMatrix

    public static final float[][] fromArray4x4ToMatrix(float[] m)

  Utility function that returns the [4][4] float matrix version of the given `m` array.

### from4x4MatrixToArray

    public static final float[] from4x4MatrixToArray(float[][] mat)

  Utility function that returns the [16] float array version of the given `mat` matrix.

### get3x3UpperLeftMatrixFromPMatrix3D

    public static final float[][] get3x3UpperLeftMatrixFromPMatrix3D(processing.core.PMatrix3D pM)

  Utility function that returns the 3x3 upper left sub-matrix of the given PMatrix3D.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

processing library glgraphics by Andres Colubri. (c) 2008