Package org.robwork.sdurw
Class TriangleD
- java.lang.Object
-
- org.robwork.sdurw.TriangleD
-
public class TriangleD extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyTransform(Transform3Dd t3d)apply a transformation to this triangledoublecalcArea()calculate the area of the triangleVector3DdcalcFaceNormal()calculates the face normal of this triangle.voiddelete()static longgetCPtr(TriangleD obj)TriangleDgetTriangle()Vector3DdgetVertex(long i)get vertex at index ibooleanisInside(Vector3Dd x)tests wheather the point x is inside the triangleTriangleDtransform(Transform3Dd t3d)Returns Triangle transformed by t3d.
-
-
-
Constructor Detail
-
TriangleD
public TriangleD(long cPtr, boolean cMemoryOwn)
-
TriangleD
public TriangleD()
default constructor
-
TriangleD
public TriangleD(Vector3Dd p1, Vector3Dd p2, Vector3Dd p3)
constructor- Parameters:
p1- [in] vertice 1p2- [in] vertice 2p3- [in] vertice 3
-
TriangleD
public TriangleD(TriangleD f)
copy constructor
- Parameters:
f- [in] - The face that is to be copied.
-
-
Method Detail
-
getCPtr
public static long getCPtr(TriangleD obj)
-
delete
public void delete()
-
getVertex
public Vector3Dd getVertex(long i)
get vertex at index i
-
calcFaceNormal
public Vector3Dd calcFaceNormal()
calculates the face normal of this triangle. It is assumed
that the triangle vertices are arranged counter clock wise.
-
isInside
public boolean isInside(Vector3Dd 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(Transform3Dd t3d)
apply a transformation to this triangle- Parameters:
t3d- [in] transform that is to be applied
-
transform
public TriangleD transform(Transform3Dd t3d)
Returns Triangle transformed by t3d.
-
getTriangle
public TriangleD getTriangle()
-
-