Examples of normalize()


Examples of com.jme3.math.Quaternion.normalize()

        }

        newUp.set(newDirection).crossLocal(newLeft).normalizeLocal();
       
    Quaternion r = new Quaternion().fromAxes(newLeft, newUp, newDirection);
    r.normalize();
    this.setLocalRotation(r);   
  }

}
View Full Code Here

Examples of com.jme3.math.Vector2f.normalize()

  }

   public Vector2f GetDirection()
  {
     Vector2f Direction = (m_PointB.subtract(m_PointA));
    return Direction.normalize();
//    return Direction;
  }

  void ComputeNormal()
  {
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.types.Vector3.normalize()

    Vector3 eye = new Vector3(eyeX, eyeY, eyeZ);
    Vector3 center = new Vector3(centerX, centerY, centerZ);
    Vector3 up = new Vector3(upX, upY, upZ);
   
    Vector3 f = Vector3.subtract(center, eye);
    f.normalize();
//    Vector3 up2 = new Vector3(up);
//    up2.normalize();
   
    Vector3 s = Vector3.cross(f, up);
    s.normalize();
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.normalize()

              expectedPart.normalize();
       
              boolean found = false;
              for (int j = 0; j < splitResult.size(); j++) {
            Geometry fragment = splitResult.get(j);
            fragment.normalize();
            if (expectedPart.equals(fragment)) {
                found = true;
                assertTrue(fragment.isValid());
                break;
            }
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryCollection.normalize()

  }

  public void testNormalizeGeometryCollection() throws Exception {
    GeometryCollection actualValue = (GeometryCollection) reader.read(
          "GEOMETRYCOLLECTION (LINESTRING (200 300, 200 280, 220 280, 220 320, 180 320), POINT (140 220), POLYGON ((100 80, 100 160, 20 160, 20 80, 100 80), (40 140, 40 100, 80 100, 80 140, 40 140)), POINT (100 240))");
    actualValue.normalize();
    GeometryCollection expectedValue = (GeometryCollection) reader.read(
          "GEOMETRYCOLLECTION (POINT (100 240), POINT (140 220), LINESTRING (180 320, 220 320, 220 280, 200 280, 200 300), POLYGON ((20 80, 20 160, 100 160, 100 80, 20 80), (40 100, 80 100, 80 140, 40 140, 40 100)))");
    assertEqualsExact(expectedValue, actualValue);
  }
View Full Code Here

Examples of com.vividsolutions.jts.geom.LineSegment.normalize()

    // edges creation
    int i = 0;
    for (QuadEdge qe : qeSorted.keySet()) {
      LineSegment s = qe.toLineSegment();
      s.normalize();
     
      Integer idS = this.coordinates.get(s.p0);
      Integer idD = this.coordinates.get(s.p1);
      Vertex oV = this.vertices.get(idS);
      Vertex eV = this.vertices.get(idD);
View Full Code Here

Examples of com.vividsolutions.jts.geom.LineString.normalize()

  }

  public void testNormalizeLineString1() throws Exception {
    LineString l = (LineString) reader.read(
          "LINESTRING (20 20, 160 40, 160 100, 100 120, 60 60)");
    l.normalize();
    LineString expectedValue = (LineString) reader.read(
          "LINESTRING (20 20, 160 40, 160 100, 100 120, 60 60)");
    assertEqualsExact(expectedValue, l);
  }
View Full Code Here

Examples of com.vividsolutions.jts.geom.MultiLineString.normalize()

  }

  public void testNormalizeMultiLineString() throws Exception {
    MultiLineString actualValue = (MultiLineString) reader.read(
          "MULTILINESTRING ((200 260, 180 320, 260 340), (120 180, 140 100, 40 80), (200 180, 220 160, 200 180), (100 280, 120 260, 140 260, 140 240, 120 240, 120 260, 100 280))");
    actualValue.normalize();
    MultiLineString expectedValue = (MultiLineString) reader.read(
          "MULTILINESTRING ((40 80, 140 100, 120 180), (100 280, 120 260, 120 240, 140 240, 140 260, 120 260, 100 280), (200 180, 220 160, 200 180), (200 260, 180 320, 260 340))");
    assertEqualsExact(expectedValue, actualValue);
  }
View Full Code Here

Examples of com.vividsolutions.jts.geom.MultiPoint.normalize()

  }

  public void testNormalizeMultiPoint() throws Exception {
    MultiPoint m = (MultiPoint) reader.read(
          "MULTIPOINT(30 20, 10 10, 20 20, 30 30, 20 10)");
    m.normalize();
    MultiPoint expectedValue = (MultiPoint) reader.read(
          "MULTIPOINT(10 10, 20 10, 20 20, 30 20, 30 30)");
    assertEqualsExact(expectedValue, m);
    MultiPoint unexpectedValue = (MultiPoint) reader.read(
          "MULTIPOINT(20 10, 20 20, 30 20, 30 30, 10 10)");
View Full Code Here

Examples of com.vividsolutions.jts.geom.MultiPolygon.normalize()

  }

  public void testNormalizeMultiPolygon() throws Exception {
    MultiPolygon actualValue = (MultiPolygon) reader.read(
          "MULTIPOLYGON (((40 360, 40 280, 140 280, 140 360, 40 360), (60 340, 60 300, 120 300, 120 340, 60 340)), ((140 200, 260 200, 260 100, 140 100, 140 200), (160 180, 240 180, 240 120, 160 120, 160 180)))");
    actualValue.normalize();
    MultiPolygon expectedValue = (MultiPolygon) reader.read(
          "MULTIPOLYGON (((40 280, 40 360, 140 360, 140 280, 40 280), (60 300, 120 300, 120 340, 60 340, 60 300)), ((140 100, 140 200, 260 200, 260 100, 140 100), (160 120, 240 120, 240 180, 160 180, 160 120)))");
    assertEqualsExact(expectedValue, actualValue);
  }
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.