Package jmt.engine.graphic

Examples of jmt.engine.graphic.Matrix4


    halfH = screenH / 2;
    aspect = screenW / screenH;
    prj.setScreenSize(size);
    prj.updateProjection();

    Matrix4 mv = prj.getModelView();
    eyeRT = Matrix4.createScale(0.95f * (enableCustomZoom ? zoomFactor
        : 1.0f));
    eyeRT.multSelf(Matrix4.createRotationX(rotX));
    eyeRT.multSelf(Matrix4.createRotationY(rotY));
    eyeRT.multSelf(Matrix4.createTranslation(-centroid.x(), centroid.y(),
        centroid.z()));
    Vector4 eyePos = Vector4.createPoint3D(0.0f, 0.0f, 10.0f);
    prj.lookAt(eyePos, Vector4.ORIGIN, false);
    prj.push(mv.clone());
    prj.push(eyeRT.clone());
    mv.set(eyeRT.mult(mv));

    originPrj = prj.project(Vector4.ORIGIN);
    axisPrjX = prj.project(nx);
    axisPrjY = prj.project(ny);
    axisPrjZ = prj.project(nz);
    axisLabelX = prj.project(lx);
    axisLabelY = prj.project(ly);
    axisLabelZ = prj.project(lz);
    eyeRT.set(prj.pop());

    eyeRT.multSelf(Matrix4.createScale((aspect < 1.0f ? aspect : 1.0f)
        / maxVertexDistance));
    mv.set(eyeRT.mult(prj.pop()));

    // TODO: Project points here instead of inside of paint()

    forward = mv.getRow(Matrix4.Z_INDEX);
    forward.normalize();
    splitByVisibility(forward);
  }
View Full Code Here

TOP

Related Classes of jmt.engine.graphic.Matrix4

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.