Examples of Matrix4f


Examples of org.lwjgl.util.vector.Matrix4f

  public static void glLoadMatrix(final Matrix4f s) {
    getCurrentMatrix().load(s);
  }

  public static void glMultMatrix(final Matrix4f m) {
    final Matrix4f c = getCurrentMatrix();
    Matrix4f.mul(c, m, c);
  }
View Full Code Here

Examples of org.lwjgl.util.vector.Matrix4f

    final Matrix4f c = getCurrentMatrix();
    Matrix4f.mul(c, m, c);
  }

  public static void glTranslatef(final float x, final float y, final float z) {
    final Matrix4f m = getCurrentMatrix();
    v3f.set(x, y, z);
    m.translate(v3f);
  }
View Full Code Here

Examples of org.lwjgl.util.vector.Matrix4f

    v3f.set(x, y, z);
    m.translate(v3f);
  }

  public static void glRotatef(final float angle, final float x, final float y, final float z) {
    final Matrix4f m = getCurrentMatrix();
    v3f.set(x, y, z);
    m.rotate((float)toRadians(angle), v3f);
  }
View Full Code Here

Examples of org.lwjgl.util.vector.Matrix4f

    v3f.set(x, y, z);
    m.rotate((float)toRadians(angle), v3f);
  }

  public static void glOrtho(final float l, final float r, final float b, final float t, final float n, final float f) {
    final Matrix4f m = m4f;
    m.setIdentity();

    m.m00 = 2.0f / (r - l);
    m.m30 = -(r + l) / (r - l);

    m.m11 = 2.0f / (t - b);
View Full Code Here

Examples of org.lwjgl.util.vector.Matrix4f

    glMultMatrix(m);
  }

  public static void glFrustum(final float l, final float r, final float b, final float t, final float n, final float f) {
    final Matrix4f m = m4f;
    m.setIdentity();

    m.m00 = 2.0f * n / (r - l);
    m.m20 = (r + l) / (r - l);

    m.m11 = 2.0f * n / (t - b);
View Full Code Here

Examples of org.lwjgl.util.vector.Matrix4f

      return;
    }

    final float cotangent = (float)cos(radians) / sine;

    final Matrix4f m = m4f;
    m.setIdentity();

    m.m00 = cotangent / aspect;
    m.m11 = cotangent;
    m.m22 = -(zFar + zNear) / deltaZ;
    m.m23 = -1.0f;
View Full Code Here

Examples of org.spout.math.matrix.Matrix4f

  @Override
  public void updateView() {
    Transform transform = getOwner().getPhysics().getTransform();
    Point point = transform.getPosition().add(0.0f, getHeight(), 0.0f);
    Matrix4f pos = Matrix4f.createTranslation(point.mul(-1));
    Matrix4f rot = getRotation();
    view = pos.mul(rot);
    frustum.update(projection, view, transform.getPosition());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.