Class SimpleFacetDefinition

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Vector3D normal
      Facet normal; may be null.
      private java.util.List<Vector3D> vertices
      Facet vertices.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Vector3D getNormal()
      Get the normal defined for the facet or null if one has not been explicitly specified.
      java.util.List<Vector3D> getVertices()
      Get the facet vertices.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • vertices

        private final java.util.List<Vector3D> vertices
        Facet vertices.
      • normal

        private final Vector3D normal
        Facet normal; may be null.
    • Constructor Detail

      • SimpleFacetDefinition

        public SimpleFacetDefinition​(java.util.List<Vector3D> vertices)
        Construct a new instance with the given vertices and no defined normal.
        Parameters:
        vertices - facet vertices
        Throws:
        java.lang.IllegalArgumentException - if vertices contains fewer than 3 elements
      • SimpleFacetDefinition

        public SimpleFacetDefinition​(java.util.List<Vector3D> vertices,
                                     Vector3D normal)
        Construct a new instance with the given vertices and normal.
        Parameters:
        vertices - facet vertices
        normal - facet normal; may be null
        Throws:
        java.lang.IllegalArgumentException - if vertices contains fewer than 3 elements
    • Method Detail

      • getNormal

        public Vector3D getNormal()
        Get the normal defined for the facet or null if one has not been explicitly specified. No guarantees are made regarding the properties of the normal or its relationship to the vertices.
        Specified by:
        getNormal in interface FacetDefinition
        Returns:
        the defined normal for the facet or null if one has not been explicitly specified
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object