Class MeshBuilder<X extends Point_>

java.lang.Object
Jcg.mesh.MeshBuilder<X>

public class MeshBuilder<X extends Point_> extends Object
Author:
Luca Castelli Aleardi (Ecole Polytechnique, 2014) This class provides methods for building a polyhedral mesh (Polyhedron_3 class)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    Add and set boundary half-edges to the representation Remark: it allows to deal with meshes having boundaries
    createMesh(X[] points, int[] faceDegrees, int[][] faces)
    Efficient construction of a Polyhedron (Half-edge DS) for a surface mesh (from a share vertex representation)

    Remark: it works for arbitrary polygonal meshes,possibly having boundaries
    (package private) Polyhedron_3<X>
    createMeshOld(X[] points, int[] faceDegrees, int[][] faces)
    Efficient construction of a polyhedral mesh (Half-edge DS) (from a share vertex representation)
    private Halfedge<X>
    Given a boundary half-edge e, returns the next boundary half-edge around the same face Warning: the mesh is supposed to be manifold (boundary cycles are disjoint)
    static Point_2[]
    Convert an array of 3D points to an array of 2D points (by orthogonal projection on the z=0 hyperplane)
    private String
    Print the edge (the index of its extremities) Useful for debugging

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MeshBuilder

      public MeshBuilder()
  • Method Details

    • createMesh

      public Polyhedron_3<X> createMesh(X[] points, int[] faceDegrees, int[][] faces)
      Efficient construction of a Polyhedron (Half-edge DS) for a surface mesh (from a share vertex representation)

      Remark: it works for arbitrary polygonal meshes,possibly having boundaries
    • createMeshOld

      Polyhedron_3<X> createMeshOld(X[] points, int[] faceDegrees, int[][] faces)
      Efficient construction of a polyhedral mesh (Half-edge DS) (from a share vertex representation)
    • addBoundaryEdges

      private void addBoundaryEdges(Polyhedron_3<X> mesh)
      Add and set boundary half-edges to the representation Remark: it allows to deal with meshes having boundaries
    • getNextBoundaryHalfedge

      private Halfedge<X> getNextBoundaryHalfedge(Halfedge<X> e)
      Given a boundary half-edge e, returns the next boundary half-edge around the same face Warning: the mesh is supposed to be manifold (boundary cycles are disjoint)
    • printEdge

      private String printEdge(Halfedge<X> e)
      Print the edge (the index of its extremities) Useful for debugging
    • Point3DToPoint2D

      public static Point_2[] Point3DToPoint2D(Point_3[] points)
      Convert an array of 3D points to an array of 2D points (by orthogonal projection on the z=0 hyperplane)