Package org.robwork.sdurw_geometry
Class PrimitiveCPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.PrimitiveCPtr
-
public class PrimitiveCPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description PrimitiveCPtr()
Default constructor yielding a NULL-pointer.PrimitiveCPtr(long cPtr, boolean cMemoryOwn)
PrimitiveCPtr(Primitive 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 Primitive
__ref__()
Dereferencing operator.TriMeshPtr
createMesh(int resolution)
make a trimesh from this primitive.void
delete()
Primitive
deref()
The pointer stored in the object.boolean
equals(Primitive p)
static long
getCPtr(PrimitiveCPtr obj)
Primitive
getDeref()
Member access operator.Q
getParameters()
get the parameters that define this primitiveGeometryData.GeometryType
getType()
the type of this primitiveboolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownership
-
-
-
Constructor Detail
-
PrimitiveCPtr
public PrimitiveCPtr(long cPtr, boolean cMemoryOwn)
-
PrimitiveCPtr
public PrimitiveCPtr()
Default constructor yielding a NULL-pointer.
-
PrimitiveCPtr
public PrimitiveCPtr(Primitive ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(PrimitiveCPtr obj)
-
delete
public void delete()
-
deref
public Primitive deref()
The pointer stored in the object.
-
__ref__
public Primitive __ref__()
Dereferencing operator.
-
getDeref
public Primitive getDeref()
Member access operator.
-
equals
public boolean equals(Primitive 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
-
createMesh
public TriMeshPtr createMesh(int resolution)
make a trimesh from this primitive. Use granularity to
specify minimum number of line segments a half circle is split into- Parameters:
resolution
- [in]
-
getParameters
public Q getParameters()
get the parameters that define this primitive
-
getType
public GeometryData.GeometryType getType()
the type of this primitive
-
-