Module JNISpice
Package spice.basic

Class TriangularPlate


  • public class TriangularPlate
    extends java.lang.Object
    Class TriangularPlate represents triangular shapes used to tessellate surfaces of extended bodies.

    This class represents each plate as an integer-valued 3-vector, which is associated with a set of 3-vectors. The integers are the indices of the vectors in that set comprising the plate's three vertices. The vertex indices range from 1 to `nv'---the number of vectors in the associated set.

    Vertex indices are 1-based in all SPICE language versions; this convention makes them compatible with vertex indices used in type 2 DSK segments.

    The order of a plate's vertices implies an "outward" normal direction: the vertices are ordered in the positive (counterclockwise) sense about the outward normal direction.

    See the related class TriangularPlateVertices which supports various geometric plate operations not covered by this class.

    Version 1.0.0 09-NOV-2016 (NJB)

    • Field Summary

      Fields 
      Modifier and Type Field Description
      int[] vertexNumbers  
    • Method Summary

      Modifier and Type Method Description
      static double area​(TriangularPlate[] plates, Vector3[] vertices)
      Compute the total area of a collection of triangular plates.
      int[] toArray()
      Extract the vertex number of a Triangular plate into an array of ints.
      static double volume​(TriangularPlate[] plates, Vector3[] vertices)
      Compute the volume of a three-dimensional region bounded by a collection of triangular plates.
      • Methods inherited from class java.lang.Object

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

      • vertexNumbers

        public int[] vertexNumbers
    • Constructor Detail

      • TriangularPlate

        public TriangularPlate()
        No-arguments constructor. This constructor generates a zero-filled array of ints. Note that the resulting plate is not valid until it has been initialized.
      • TriangularPlate

        public TriangularPlate​(int vix1,
                               int vix2,
                               int vix3)
                        throws SpiceErrorException
        Construct a plate from three vertex numbers.

        The caller must ensure the numbers are within the valid range for a given set of vertices.

        Parameters:
        vix1 -
        vix3 -
        vix2 -
        Throws:
        SpiceErrorException
      • TriangularPlate

        public TriangularPlate​(TriangularPlate p)
        Construct a plate from another plate.

        This constructor creates a deep copy.

        Parameters:
        p -
    • Method Detail

      • toArray

        public int[] toArray()
        Extract the vertex number of a Triangular plate into an array of ints.
        Returns: