Package org.robwork.sdurw_geometry
Class ShellPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.ShellPtr
-
public class ShellPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Shell
__ref__()
Dereferencing operator.ShellCPtr
cptr()
void
delete()
Shell
deref()
The pointer stored in the object.boolean
equals(Shell p)
pair_d_d
extremums(Vector3D dir)
Get the minimum and maximum values of the shell in a certain direction.static long
getCPtr(ShellPtr obj)
Shell
getDeref()
Member access operator.FaceCPtr
getFace(long idx)
Get a surface patch.void
getFace(long idx, GenericFace face)
Get a surface patch.TriMeshPtr
getTriMesh()
TriMeshPtr
getTriMesh(boolean forceCopy)
GeometryData.GeometryType
getType()
boolean
isConvex()
boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipOBB
obb()
Create Oriented Bounding Box (OBB) as a bounding volume for the shell.long
size()
Get the number of surface patches in this shell.java.lang.String
toString(GeometryData.GeometryType type)
format GeometryType to string
-
-
-
Constructor Detail
-
ShellPtr
public ShellPtr(long cPtr, boolean cMemoryOwn)
-
ShellPtr
public ShellPtr()
Default constructor yielding a NULL-pointer.
-
ShellPtr
public ShellPtr(Shell ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(ShellPtr obj)
-
delete
public void delete()
-
deref
public Shell deref()
The pointer stored in the object.
-
__ref__
public Shell __ref__()
Dereferencing operator.
-
getDeref
public Shell getDeref()
Member access operator.
-
equals
public boolean equals(Shell p)
-
isShared
public boolean isShared()
check if this Ptr has shared ownership or none
ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
cptr
public ShellCPtr cptr()
-
getType
public GeometryData.GeometryType getType()
-
getTriMesh
public TriMeshPtr getTriMesh(boolean forceCopy)
-
getTriMesh
public TriMeshPtr getTriMesh()
-
isConvex
public boolean isConvex()
-
size
public long size()
Get the number of surface patches in this shell.- Returns:
- the number of surface patches.
-
getFace
public FaceCPtr getFace(long idx)
Get a surface patch.- Parameters:
idx
- [in] index of patch.- Returns:
- a copy of the surface patch.
-
getFace
public void getFace(long idx, GenericFace face)
Get a surface patch.- Parameters:
idx
- [in] index of patch.face
- [out] existing face to copy data into.
-
extremums
public pair_d_d extremums(Vector3D dir)
Get the minimum and maximum values of the shell in a certain direction.- Parameters:
dir
- [in] the direction to find extremums for.- Returns:
- the minimum and maximum as a pair of values.
-
obb
public OBB obb()
Create Oriented Bounding Box (OBB) as a bounding volume for the shell.- Returns:
- the OBB.
-
toString
public java.lang.String toString(GeometryData.GeometryType type)
format GeometryType to string- Parameters:
type
-
-
-