Package geomss.geom

Class TriangleVertData


  • public class TriangleVertData
    extends java.lang.Object
    An simple container that packages together information about a list of triangles. In particular, it stores a list of non-repeating (unique) vertices and indexes into that list for each triangle, the area of each triangle, and the normal vector for each triangle.

    Modified by: Joseph A. Huwaldt

    Version:
    September 11, 2015
    Author:
    Joseph A. Huwaldt, Date: August 28, 2015
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.List<Parameter<javax.measure.quantity.Area>> areas
      The surface area of one side of each triangle.
      java.util.List<GeomVector<javax.measure.quantity.Dimensionless>> normals
      The surface normal vector for each triangle.
      int numTris
      The number of triangles in the list.
      int[] tris
      The array of indexes into the "vertices" list for the vertices of each triangle.
      PointString<? extends GeomPoint> vertices
      The list of unique vertices in this triangle data.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static TriangleVertData newInstance()
      Construct a new TriangleVertData structure.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • numTris

        public int numTris
        The number of triangles in the list.
      • tris

        public int[] tris
        The array of indexes into the "vertices" list for the vertices of each triangle. Each set of indices is represented by 3 consecutive integer indexes in a counter-clockwise winding.
      • areas

        public java.util.List<Parameter<javax.measure.quantity.Area>> areas
        The surface area of one side of each triangle. The area is always positive, but can be zero.
      • normals

        public java.util.List<GeomVector<javax.measure.quantity.Dimensionless>> normals
        The surface normal vector for each triangle. If a triangle is degenerate (zero area), then the normal vector will have zero length.
    • Method Detail

      • newInstance

        public static TriangleVertData newInstance()
        Construct a new TriangleVertData structure.
        Returns:
        A new TriangleVertData structure.