Package com.jogamp.opencl.demos.julia3d.structs

Examples of com.jogamp.opencl.demos.julia3d.structs.Vec


    private void updateCamera() {

        Camera camera = config.getCamera();

        Vec dir    = camera.getDir();
        Vec target = camera.getTarget();
        Vec camX   = camera.getX();
        Vec camY   = camera.getY();
        Vec orig   = camera.getOrig();

        vsub(dir, target, orig);
        vnorm(dir);

        Vec up = Vec.create().setX(0).setY(1).setZ(0);
        vxcross(camX, dir, up);
        vnorm(camX);
        vmul(camX, config.getWidth() * .5135f / config.getHeight(), camX);

        vxcross(camY, camX, dir);
View Full Code Here


        component.addMouseMotionListener(mouseAdapter);
        component.addMouseWheelListener(mouseAdapter);

    }
    private void zoom(float zoom) {
        Vec orig = model.getCamera().getOrig();
        orig.setX(orig.getX()+zoom)
            .setY(orig.getY()+zoom)
            .setZ(orig.getZ()+zoom);
    }
View Full Code Here

        light[2] = (float) (x * sin(k) + z * cos(k));
        model.setLight(light);
    }

    private void rotateCameraXbyOrig(double k) {
        Vec orig = model.getCamera().getOrig();
        float y = orig.getY();
        float z = orig.getZ();
        orig.setY((float) ( y * cos(k) + z * sin(k)));
        orig.setZ((float) (-y * sin(k) + z * cos(k)));
    }
View Full Code Here

        orig.setY((float) ( y * cos(k) + z * sin(k)));
        orig.setZ((float) (-y * sin(k) + z * cos(k)));
    }

    private void rotateCameraYbyOrig(double k) {
        Vec orig = model.getCamera().getOrig();
        float x = orig.getX();
        float z = orig.getZ();
        orig.setX((float) (x * cos(k) - z * sin(k)));
        orig.setZ((float) (x * sin(k) + z * cos(k)));
    }
View Full Code Here

TOP

Related Classes of com.jogamp.opencl.demos.julia3d.structs.Vec

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.