Package de.hpi.eworld.model.db.data

Examples of de.hpi.eworld.model.db.data.GlobalPosition.distanceTo()


        EdgeModel edge = edgeList.get(0);

        GlobalPosition edgeStartGlobal = edge.getFromNode().getPosition();
        GlobalPosition edgeEndGlobal = edge.getToNode().getPosition();
       
        double globalLenght = edgeEndGlobal.distanceTo(edgeStartGlobal);
        double distanceToStart = edgeLocation.getDistance();

        Point2D edgeStartLocal = edge.getFromNode().getPosition().projected();
        Point2D edgeEndLocal = edge.getToNode().getPosition().projected();
       
View Full Code Here


    GlobalPosition edgeEndGlobal = edge.getToNode().getPosition();

    Point2D edgeStartLocal = edgeStartGlobal.projected();
    Point2D edgeEndLocal = edgeEndGlobal.projected();
   
    double globalLenght = edgeEndGlobal.distanceTo(edgeStartGlobal);
    double localLength = Point2DUtils.distance(edgeEndLocal, edgeStartLocal);
    double distanceToStart = Point2DUtils.distance(position, edgeStartLocal);
   
    double realtiveEdgePosition = distanceToStart / localLength;
    if (realtiveEdgePosition < 0.0d || realtiveEdgePosition > 1.0d) {
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.