Package org.robwork.sdurw_geometry
Class BSphereCPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.BSphereCPtr
-
public class BSphereCPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description BSphereCPtr()Default constructor yielding a NULL-pointer.BSphereCPtr(long cPtr, boolean cMemoryOwn)BSphereCPtr(BSphere 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__ref__()Dereferencing operator.doublecalcArea()get the surface areadoublecalcVolume()get the volumevoiddelete()BSpherederef()The pointer stored in the object.booleanequals(BSphere p)static longgetCPtr(BSphereCPtr obj)BSpheregetDeref()Member access operator.Vector3DgetPosition()get the position of the sphere centerdoublegetRadius()get the sphere radiusdoublegetRadiusSqr()get the sphere radius^2booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownership
-
-
-
Constructor Detail
-
BSphereCPtr
public BSphereCPtr(long cPtr, boolean cMemoryOwn)
-
BSphereCPtr
public BSphereCPtr()
Default constructor yielding a NULL-pointer.
-
BSphereCPtr
public BSphereCPtr(BSphere ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(BSphereCPtr obj)
-
delete
public void delete()
-
deref
public BSphere deref()
The pointer stored in the object.
-
__ref__
public BSphere __ref__()
Dereferencing operator.
-
getDeref
public BSphere getDeref()
Member access operator.
-
equals
public boolean equals(BSphere 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 Vector3D getPosition()
get the position of the sphere center- Returns:
- a Vector3D with the center coordinates
-
getRadius
public double getRadius()
get the sphere radius- Returns:
- sphere radius
-
getRadiusSqr
public double getRadiusSqr()
get the sphere radius^2- Returns:
- sphere radius^2
-
calcArea
public double calcArea()
get the surface area- Returns:
- surface area
-
calcVolume
public double calcVolume()
get the volume- Returns:
- volume
-
-