Package com.ardor3d.math

Examples of com.ardor3d.math.Plane


        setSpeedReflection(0.02);
        setSpeedReflection(-0.01);

        // setting to default value just to show
        this.waterHeight = waterHeight;
        setWaterPlane(new Plane(new Vector3(0.0, 1.0, 0.0), waterHeight));

        // Create a quad to use as geometry for the water.
        waterQuad = new Quad("waterQuad", 1, 1);
        // Hack the quad normals to point up in the y-axis. Since we are manipulating the vertices as
        // we move this is more convenient than rotating the quad.
View Full Code Here


  setDudvMapTextureString("images/water/dudvmap.png");
        setFallbackMapTextureString("images/water/water2.png");
        setFoamMapTextureString("images/water/oceanfoam.png");
       
        this.waterHeight = waterHeight;
        setWaterPlane(new Plane(new Vector3(0.0, 1.0, 0.0), waterHeight));
       
        useFadeToFogColor(true);
       

       
View Full Code Here

        _planeQuantity = 6;

        _worldPlane = new Plane[MAX_WORLD_PLANES];
        for (int i = 0; i < MAX_WORLD_PLANES; i++) {
            _worldPlane[i] = new Plane();
        }

        onFrustumChange();
        onViewPortChange();
        onFrameChange();
View Full Code Here

        _coeffBottom = new double[2];
        _coeffTop = new double[2];

        _worldPlane = new Plane[MAX_WORLD_PLANES];
        for (int i = 0; i < MAX_WORLD_PLANES; i++) {
            _worldPlane[i] = new Plane();
        }

        set(source);

        _logger.fine("Camera created. W: " + getWidth() + "  H: " + getHeight());
View Full Code Here

            return 0;
        }
        final ReadOnlyVector3 direction = l.getDirection();
        final ReadOnlyVector3 location = l.getLocation();
        // direction is copied into Plane, not reused.
        final Plane p = new Plane(direction, direction.dot(location));
        if (val.whichSide(p) != Plane.Side.Inside) {
            return getValueFor((PointLight) l, val);
        }

        return 0;
View Full Code Here

        // rotate to arrow plane
        _handle.getRotation().applyPost(_calcVec3C, _calcVec3C);
        final Line3 arrowLine = new Line3(_calcVec3A, _calcVec3C.normalize(_calcVec3D));

        // make plane object
        final Plane pickPlane = new Plane().setPlanePoints(_calcVec3A, _calcVec3B, _calcVec3C.addLocal(_calcVec3A));

        // find out where we were hitting the plane before
        getPickRay(oldMouse, camera);
        if (!_calcRay.intersectsPlane(pickPlane, _calcVec3A)) {
            return _calcVec3A.zero();
View Full Code Here

            final InteractManager manager) {
        // calculate a plane running through the Arrow and facing the camera.
        _calcVec3A.set(_handle.getWorldTranslation());
        _calcVec3B.set(_calcVec3A).addLocal(camera.getLeft());
        _calcVec3C.set(_calcVec3A).addLocal(_arrowDirection);
        final Plane pickPlane = new Plane().setPlanePoints(_calcVec3A, _calcVec3B, _calcVec3C);

        // find out where we were hitting the plane before
        getPickRay(oldMouse, camera);
        _calcRay.intersectsPlane(pickPlane, _calcVec3A);
        final double oldHeight = _calcVec3A.getY();
View Full Code Here

        // rotate to arrow plane
        _handle.getRotation().applyPost(_calcVec3B, _calcVec3B);
        _handle.getRotation().applyPost(_calcVec3C, _calcVec3C);

        // make plane object
        final Plane pickPlane = new Plane().setPlanePoints(_calcVec3A, _calcVec3B.addLocal(_calcVec3A),
                _calcVec3C.addLocal(_calcVec3A));

        // find out where we were hitting the plane before
        getPickRay(oldMouse, camera);
        if (!_calcRay.intersectsPlane(pickPlane, _calcVec3A)) {
View Full Code Here

        // rotate to ring plane
        ring.getRotation().applyPost(_calcVec3B, _calcVec3B);
        ring.getRotation().applyPost(_calcVec3C, _calcVec3C);

        // make plane object
        final Plane pickPlane = new Plane().setPlanePoints(_calcVec3A, _calcVec3B.addLocal(_calcVec3A),
                _calcVec3C.addLocal(_calcVec3A));

        // find out where we were hitting the plane before
        getPickRay(oldMouse, camera);
        if (!_calcRay.intersectsPlane(pickPlane, _calcVec3A)) {
View Full Code Here

    protected Vector3 getNewOffset(final Vector2 oldMouse, final MouseState current, final Camera camera,
            final InteractManager manager) {

        // make plane object
        final Plane pickPlane = new Plane().setPlanePoints(_calcVec3A, _calcVec3B, _calcVec3C);

        // find out where we were hitting the plane before
        getPickRay(oldMouse, camera);
        if (!_calcRay.intersectsPlane(pickPlane, _calcVec3A)) {
            return _calcVec3A.zero();
View Full Code Here

TOP

Related Classes of com.ardor3d.math.Plane

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.