Examples of applyPre()


Examples of com.ardor3d.math.type.ReadOnlyMatrix4.applyPre()

        double optimalCameraNear = Double.MAX_VALUE;
        double optimalCameraFar = -Double.MAX_VALUE;
        final Vector4 position = Vector4.fetchTempInstance();
        for (int i = 0; i < _corners.length; i++) {
            position.set(_corners[i].getX(), _corners[i].getY(), _corners[i].getZ(), 1);
            mvMatrix.applyPre(position, position);

            optimalCameraNear = Math.min(-position.getZ(), optimalCameraNear);
            optimalCameraFar = Math.max(-position.getZ(), optimalCameraFar);
        }
        Vector4.releaseTempInstance(position);
View Full Code Here

Examples of com.ardor3d.math.type.ReadOnlyMatrix4.applyPre()

        projectionMatrix = cam.getProjectionMatrix().toArray(projectionMatrix);

        // Get the inverse transpose of the current modelview matrix
        final ReadOnlyMatrix4 modelViewMatrixInvTrans = tRenderer.getCamera().getModelViewMatrix().invert(tmpMatrix)
                .transposeLocal();
        modelViewMatrixInvTrans.applyPre(clipPlane, clipPlane);

        // Calculate the clip-space corner point opposite the clipping plane
        // as (sgn(clipPlane.x), sgn(clipPlane.y), 1, 1) and
        // transform it into camera space by multiplying it
        // by the inverse of the projection matrix
View Full Code Here

Examples of com.ardor3d.math.type.ReadOnlyMatrix4.applyPre()

        // transform points to projector space
        final ReadOnlyMatrix4 modelViewProjectionMatrix = projectorCamera.getModelViewProjectionMatrix();
        final Vector4 spaceTransformation = new Vector4();
        for (int i = 0; i < nrPoints; i++) {
            spaceTransformation.set(intersections[i].getX(), 0.0, intersections[i].getZ(), 1.0);
            modelViewProjectionMatrix.applyPre(spaceTransformation, spaceTransformation);
            intersections[i].set(spaceTransformation.getX(), spaceTransformation.getY(), 0);
            intersections[i].divideLocal(spaceTransformation.getW());
        }

        // find min/max in projector space
View Full Code Here

Examples of com.ardor3d.math.type.ReadOnlyMatrix4.applyPre()

        double optimalCameraNear = Double.MAX_VALUE;
        double optimalCameraFar = -Double.MAX_VALUE;
        final Vector4 position = Vector4.fetchTempInstance();
        for (int i = 0; i < _corners.length; i++) {
            position.set(_corners[i].getX(), _corners[i].getY(), _corners[i].getZ(), 1);
            mvMatrix.applyPre(position, position);

            optimalCameraNear = Math.min(-position.getZ(), optimalCameraNear);
            optimalCameraFar = Math.max(-position.getZ(), optimalCameraFar);
        }
        Vector4.releaseTempInstance(position);
View Full Code Here

Examples of com.ardor3d.math.type.ReadOnlyMatrix4.applyPre()

        final ReadOnlyMatrix4 lightviewproj = shadowCam.getModelViewProjectionMatrix();

        final Vector4 position = Vector4.fetchTempInstance();
        for (final Vector3 frustumCorner : frustumCorners) {
            position.set(frustumCorner.getX(), frustumCorner.getY(), frustumCorner.getZ(), 1);
            lightviewproj.applyPre(position, position);

            position.setX(position.getX() / position.getW());
            position.setY(position.getY() / position.getW());
            position.setZ(position.getZ());
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.