math.matrix4 - ICE 0.1 API documentation

ICE 0.1 API documentation

# math.matrix4

4x4 matrix struct.

struct Matrix4(T);

  4x4 column major OpenGL style matrix. Default initialized to indentity matrix.

  T[16] identity_;

    Identity matrix array.

  T[16] m_;

    Matrix data.

  pure T* ptr();

    Get a pointer to matrix data. Useful for passing to OpenGL functions.

  const pure Matrix4!(T) opMul(ref const Matrix4!(T) m);

    Multiplication with a matrix.

Matrix4!(T) translationMatrix(T)(const Vector2!(T) translate);

  Create a translation matrix.

  Parameters:

  translate | Translation coordinates.

  Returns:
  Resulting translation matrix.
pure Matrix4!(T) orthoMatrix(T)(const T left, const T right, const T bottom, const T top, const T near, const T far);

  Create an orthographic projection matrix.

  Parameters:

  left | Left clipping plane.
  right | Right clipping plane.
  bottom | Bottom clipping plane.
  top | Top clipping plane.
  near | Near clipping plane.
  far | Far clipping plane.

  Returns:
  Resulting projection matrix.
alias Matrix4f;

  Matrix4 of floats.

Copyright © Ferdinand Majerech 2011. | Page generated by AutoDDoc and Ddoc.