Package org.robwork.sdurw_geometry
Class OBB_f
- java.lang.Object
-
- org.robwork.sdurw_geometry.OBB_f
-
public class OBB_f extends java.lang.Object
class representing an Oriented Bounding Box (OBB)
-
-
Constructor Summary
Constructors Constructor Description OBB_f()
constructorOBB_f(long cPtr, boolean cMemoryOwn)
OBB_f(Transform3Df t3d, Vector3Df halfLng)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OBB_f
buildTightOBB(TriMesh tris)
static OBB_f
buildTightOBB(TriMesh tris, long index)
float
calcArea()
calculates the total area of the boxfloat
calcVolume()
calculate the volume of this OBBTriMeshPtr
createMesh()
Creates a TriMesh representing the OBB.
The triangles of the mesh is by default placed in the "global" frame corresponding to the
frame in which the OBB is defined.TriMeshPtr
createMesh(boolean local)
Creates a TriMesh representing the OBB.
The triangles of the mesh is by default placed in the "global" frame corresponding to the
frame in which the OBB is defined.void
delete()
static long
getCPtr(OBB_f obj)
Vector3Df
getHalfLengths()
get the halflengths of this OBBTransform3Df
getTransform()
void
setHalfLengths(Vector3Df halfLng)
set the halflengths of the OBBvoid
setTransform(Transform3Df t3d)
set the transformation of this OBBjava.lang.String
toString()
-
-
-
Constructor Detail
-
OBB_f
public OBB_f(long cPtr, boolean cMemoryOwn)
-
OBB_f
public OBB_f()
constructor
-
OBB_f
public OBB_f(Transform3Df t3d, Vector3Df halfLng)
-
-
Method Detail
-
getCPtr
public static long getCPtr(OBB_f obj)
-
delete
public void delete()
-
getTransform
public Transform3Df getTransform()
-
setTransform
public void setTransform(Transform3Df t3d)
set the transformation of this OBB
-
getHalfLengths
public Vector3Df getHalfLengths()
get the halflengths of this OBB
-
setHalfLengths
public void setHalfLengths(Vector3Df halfLng)
set the halflengths of the OBB
-
calcVolume
public float calcVolume()
calculate the volume of this OBB
-
calcArea
public float calcArea()
calculates the total area of the box
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
createMesh
public TriMeshPtr createMesh(boolean local)
Creates a TriMesh representing the OBB.
The triangles of the mesh is by default placed in the "global" frame corresponding to the
frame in which the OBB is defined. In case the parameter local is set to true, the
reference frame will be the frame of the OBB itself.
-
createMesh
public TriMeshPtr createMesh()
Creates a TriMesh representing the OBB.
The triangles of the mesh is by default placed in the "global" frame corresponding to the
frame in which the OBB is defined. In case the parameter local is set to true, the
reference frame will be the frame of the OBB itself.
-
-