Class TriangleF


  • public class TriangleF
    extends java.lang.Object
    • Constructor Detail

      • TriangleF

        public TriangleF​(long cPtr,
                         boolean cMemoryOwn)
      • TriangleF

        public TriangleF()
        default constructor
      • TriangleF

        public TriangleF​(Vector3Df p1,
                         Vector3Df p2,
                         Vector3Df p3)
        constructor
        Parameters:
        p1 - [in] vertice 1
        p2 - [in] vertice 2
        p3 - [in] vertice 3
      • TriangleF

        public TriangleF​(TriangleF f)
        copy constructor

        Parameters:
        f - [in] - The face that is to be copied.
    • Method Detail

      • getCPtr

        public static long getCPtr​(TriangleF obj)
      • delete

        public void delete()
      • getVertex

        public Vector3Df getVertex​(long i)
        get vertex at index i
      • calcFaceNormal

        public Vector3Df calcFaceNormal()
        calculates the face normal of this triangle. It is assumed
        that the triangle vertices are arranged counter clock wise.
      • isInside

        public boolean isInside​(Vector3Df x)
        tests wheather the point x is inside the triangle
      • calcArea

        public double calcArea()
        calculate the area of the triangle
        Returns:
        area in m^2
      • applyTransform

        public void applyTransform​(Transform3Df t3d)
        apply a transformation to this triangle
        Parameters:
        t3d - [in] transform that is to be applied
      • getTriangle

        public TriangleF getTriangle()