Package org.spout.math.matrix

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


  @Override
  public void updateReflectedView() {
    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 = Matrix4f.createScaling(new Vector4f(1, -1, 1, 1)).mul(pos).mul(rot);
    frustum.update(projection, view, transform.getPosition());
  }
View Full Code Here

TOP

Related Classes of org.spout.math.matrix.Matrix4f

Copyright © 2018 www.massapicom. 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.