JNISpice
version 2.0.0

spice.basic
Class TriangularPlate

java.lang.Object
  extended by spice.basic.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
 int[] vertexNumbers
           
 
Constructor Summary
TriangularPlate()
          No-arguments constructor.
TriangularPlate(int vix1, int vix2, int vix3)
          Construct a plate from three vertex numbers.
TriangularPlate(TriangularPlate p)
          Construct a plate from another plate.
 
Method Summary
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.

Throws:
SpiceErrorException

TriangularPlate

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

This constructor creates a deep copy.

Method Detail

toArray

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


volume

public static double volume(TriangularPlate[] plates,
                            Vector3[] vertices)
                     throws SpiceErrorException
Compute the volume of a three-dimensional region bounded by a collection of triangular plates.

Throws:
SpiceErrorException

area

public static double area(TriangularPlate[] plates,
                          Vector3[] vertices)
                   throws SpiceErrorException
Compute the total area of a collection of triangular plates.

Throws:
SpiceErrorException

JNISpice
version 2.0.0

JNISpice Alpha Test Version 2.0.0 28-JAN-2017 (NJB)