Package org.osm2world.core.math

Examples of org.osm2world.core.math.VectorXZ.normalize()


   
    if (inVector.equals(outVector)) { //TODO: allow for some small difference?
      cutVector = outVector.rightNormal();
    } else {
      cutVector = outVector.subtract(inVector);
      cutVector = cutVector.normalize();
    }
   
    //make sure that cutVector points to the right, which is equivalent to:
    //y component of the cross product (inVector x cutVector) is positive.
    //If this isn't the case, invert the cut vector.
View Full Code Here


   
    VectorXZ endDirXZ = endDir.xz();
    if (endDirXZ.lengthSquared() < 0.01) { //(almost) vertical vector
      endDirXZ = VectorXZ.X_UNIT;
    } else {
      endDirXZ = endDirXZ.normalize();
    }
    VectorXZ endNormalXZ = endDirXZ.rightNormal();
   
   
    ImmutableMaterial colorMaterial =
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.