Examples of computePointFromPosition()


Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        double surfaceElevation = this.computeSurfaceElevation(dc.getSurfaceGeometry(), globe,
            position.getLatitude(), position.getLongitude());

        Vec4 v1 = globe.computePointFromPosition(position.getLatitude(), position.getLongitude(),
            position.getElevation());
        Vec4 v2 = globe.computePointFromPosition(position.getLatitude(), position.getLongitude(),
            surfaceElevation);
        Vec4 referenceCenter = v1;
        v1 = v1.subtract3(referenceCenter);
        v2 = v2.subtract3(referenceCenter);
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        //          /
        //       C/
        //        | |
        //       Length

        Vec4 pB = globe.computePointFromPosition(tip);

        double baseLength = LatLon.greatCircleDistance(arcData.midpoint, tip).radians * globe.getRadius();
        double arrowLength = baseLength * this.getArrowLength();

        // Find the point at the base of the arrowhead
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        GL2 gl = dc.getGL().getGL2(); // GL initialization checks for GL2 compatibility.
        View view = dc.getView();
        Globe globe = dc.getGlobe();

        Vec4 point = globe.computePointFromPosition(controlPointInfo.position);
        double minSize = this.getMinObjectSize();
        double maxSize = this.computeMaxSizeForPixels(globe, segmentPlane);
        double sizeScale = this.computeSizeForPixels(view, point, 1.0, minSize, maxSize);

        // Apply the control point offset in the local coordinate system at the control point's position. Treat offset
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

            }

            if (point == null)
            {
                double e = globe.getElevation(latlon.getLatitude(), latlon.getLongitude());
                point = globe.computePointFromPosition(
                    latlon.getLatitude(), latlon.getLongitude(), (e + elevation) * sc.getVerticalExaggeration());
            }

            return point;
        }
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        protected Vec4 getPoint(LatLon latlon, double elevation)
        {
            SceneController sc = this.getApp().getWwd().getSceneController();
            Globe globe = this.getApp().getWwd().getModel().getGlobe();
            double e = globe.getElevation(latlon.getLatitude(), latlon.getLongitude());
            return globe.computePointFromPosition(
                latlon.getLatitude(), latlon.getLongitude(), (e + elevation) * sc.getVerticalExaggeration());
        }

        public void createNewEntry(AirspaceFactory factory)
        {
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        Vec4 surfacePoint = this.wwd.getSceneController().getTerrain().getSurfacePoint(
            pos.getLatitude(), pos.getLongitude());
        if (surfacePoint == null)
        {
            Globe globe = this.wwd.getModel().getGlobe();
            surfacePoint = globe.computePointFromPosition(pos.getLatitude(), pos.getLongitude(),
                globe.getElevation(pos.getLatitude(), pos.getLongitude()));
        }

        return this.wwd.getView().project(surfacePoint);
    }
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        //   Mid |______\
        //       |      /
        //      /
        //   B /

        Vec4 pA = globe.computePointFromPosition(this.position2);
        Vec4 pB = globe.computePointFromPosition(this.position3);

        Position baseMidpoint = new Position(LatLon.interpolate(0.5, this.position2, this.position3), 0);
        Vec4 pMid = globe.computePointFromPosition(baseMidpoint);
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        //       |      /
        //      /
        //   B /

        Vec4 pA = globe.computePointFromPosition(this.position2);
        Vec4 pB = globe.computePointFromPosition(this.position3);

        Position baseMidpoint = new Position(LatLon.interpolate(0.5, this.position2, this.position3), 0);
        Vec4 pMid = globe.computePointFromPosition(baseMidpoint);

        // Compute a vector perpendicular to the segment AB and the normal vector
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        Vec4 pA = globe.computePointFromPosition(this.position2);
        Vec4 pB = globe.computePointFromPosition(this.position3);

        Position baseMidpoint = new Position(LatLon.interpolate(0.5, this.position2, this.position3), 0);
        Vec4 pMid = globe.computePointFromPosition(baseMidpoint);

        // Compute a vector perpendicular to the segment AB and the normal vector
        Vec4 vAB = pB.subtract3(pA);
        Vec4 normal = globe.computeSurfaceNormalAtPoint(pMid);
        Vec4 perpendicular = vAB.cross3(normal).normalize3();
View Full Code Here

Examples of gov.nasa.worldwind.globes.Globe.computePointFromPosition()

        arcData.radius = chordLength / (2 * arcAngle.sinHalfAngle());
        double dist = arcData.radius * arcAngle.cosHalfAngle();

        // Determine which side of the line AB the arrow point falls on. We want the arc face away from the arrow, so
        // set the direction of the perpendicular component according to the sign of the scalar triple product.
        Vec4 vOrientation = globe.computePointFromPosition(this.position1).subtract3(pMid);
        double tripleProduct = perpendicular.dot3(vOrientation);
        double sign = (tripleProduct > 0) ? -1 : 1;

        arcData.direction = perpendicular.multiply3(sign);

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.