Package org.osm2world.core.math

Examples of org.osm2world.core.math.TriangleXYZ


    for (TriangleXZ triangleXZ : trianglesXZ) {
      VectorXYZ v1 = connectors.getPosXYZ(triangleXZ.v1);
      VectorXYZ v2 = connectors.getPosXYZ(triangleXZ.v2);
      VectorXYZ v3 = connectors.getPosXYZ(triangleXZ.v3);
      if (triangleXZ.isClockwise()) {
        trianglesXYZ.add(new TriangleXYZ(v3, v2, v1));
      } else  {
        trianglesXYZ.add(new TriangleXYZ(v1, v2, v3));
      }
    }
   
    return trianglesXYZ;
   
View Full Code Here


    int[] normalIndices = null;
    if (normals != null) {
      normalIndices = normalsToIndices(normals);
    }
   
    VectorXYZ faceNormal = new TriangleXYZ(vs.get(0), vs.get(1), vs.get(2)).getNormal();
   
    for (int layer = 0; layer < max(1, material.getNumTextureLayers()); layer++) {
     
      useMaterial(material, layer);
   
View Full Code Here

   
    private TriangleXYZ triangleXYZ = null;
   
    public TriangleXYZ asTriangleXYZ() {
      if (triangleXYZ == null) {
        triangleXYZ = new TriangleXYZ(p0, p1, p2);
      }
      return triangleXYZ;
    }
View Full Code Here

      VectorXYZ v1 = getPosXYZ(triangleXZ.v1);
      VectorXYZ v2 = getPosXYZ(triangleXZ.v2);
      VectorXYZ v3 = getPosXYZ(triangleXZ.v3);
     
      if (triangleXZ.isClockwise()) { //TODO: ccw test should not be in here, but maybe in triangulation util
        trianglesXYZ.add(new TriangleXYZ(v3, v2, v1));
      } else  {
        trianglesXYZ.add(new TriangleXYZ(v1, v2, v3));
      }
     
    }
   
    return trianglesXYZ;
View Full Code Here

  }
 
  private static final IsolatedTriangle triangle(
      VectorXYZ v1, VectorXYZ v2, VectorXYZ v3) {
   
    TriangleXYZ triangleXYZ = new TriangleXYZ(v1, v2, v3);
   
    return new IsolatedTriangle(
        triangleXYZ, triangleXYZ.getNormal(),
        0, Collections.<List<VectorXZ>>emptyList());
   
  }
View Full Code Here

    Iterator<? extends TriangleXYZ> itr1 = triangles.iterator();
    Iterator<VectorXZ> itr2 = texCoordList.iterator();
   
    while (itr1.hasNext()) {
   
      TriangleXYZ triangle = itr1.next();
      VectorXYZ normal = triangle.getNormal();
      VectorXZ tex1 = itr2.next();
      VectorXZ tex2 = itr2.next();
      VectorXZ tex3 = itr2.next();
   
      append(INDENT);
View Full Code Here

        List<TriangleXYZ> trianglesXYZ =
            new ArrayList<TriangleXYZ>(triangles.size());
       
        for (TriangleXZ triangle : triangles) {
          TriangleXZ tCCW = triangle.makeCounterclockwise();
          trianglesXYZ.add(new TriangleXYZ(
              withRoofEle(tCCW.v1),
              withRoofEle(tCCW.v2),
              withRoofEle(tCCW.v3)));
          //TODO: avoid duplicate objects for points in more than one triangle
        }
View Full Code Here

TOP

Related Classes of org.osm2world.core.math.TriangleXYZ

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.