- java.lang.Object
-
- 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
Fields Modifier and Type Field Description int[]
vertexNumbers
-
Constructor Summary
Constructors Constructor Description 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
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.
-
-
-
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:
-
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.- Parameters:
plates
-vertices
-- Returns:
- Throws:
SpiceErrorException
-
area
public static double area(TriangularPlate[] plates, Vector3[] vertices) throws SpiceErrorException
Compute the total area of a collection of triangular plates.- Parameters:
plates
-vertices
-- Returns:
- Throws:
SpiceErrorException
-
-