Package org.robwork.sdurw_geometry
Class BSphere_fCPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.BSphere_fCPtr
-
public class BSphere_fCPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description BSphere_fCPtr()
Default constructor yielding a NULL-pointer.BSphere_fCPtr(long cPtr, boolean cMemoryOwn)
BSphere_fCPtr(BSphere_f ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BSphere_f
__ref__()
Dereferencing operator.float
calcArea()
get the surface areafloat
calcVolume()
get the volumevoid
delete()
BSphere_f
deref()
The pointer stored in the object.boolean
equals(BSphere_f p)
static long
getCPtr(BSphere_fCPtr obj)
BSphere_f
getDeref()
Member access operator.Vector3Df
getPosition()
get the position of the sphere centerfloat
getRadius()
get the sphere radiusfloat
getRadiusSqr()
get the sphere radius^2boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownership
-
-
-
Constructor Detail
-
BSphere_fCPtr
public BSphere_fCPtr(long cPtr, boolean cMemoryOwn)
-
BSphere_fCPtr
public BSphere_fCPtr()
Default constructor yielding a NULL-pointer.
-
BSphere_fCPtr
public BSphere_fCPtr(BSphere_f ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(BSphere_fCPtr obj)
-
delete
public void delete()
-
deref
public BSphere_f deref()
The pointer stored in the object.
-
__ref__
public BSphere_f __ref__()
Dereferencing operator.
-
getDeref
public BSphere_f getDeref()
Member access operator.
-
equals
public boolean equals(BSphere_f 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
-
getPosition
public Vector3Df getPosition()
get the position of the sphere center- Returns:
- a Vector3D with the center coordinates
-
getRadius
public float getRadius()
get the sphere radius- Returns:
- sphere radius
-
getRadiusSqr
public float getRadiusSqr()
get the sphere radius^2- Returns:
- sphere radius^2
-
calcArea
public float calcArea()
get the surface area- Returns:
- surface area
-
calcVolume
public float calcVolume()
get the volume- Returns:
- volume
-
-