Package org.robwork.sdurw_geometry
Class IndexedTriArrayPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.IndexedTriArrayPtr
-
public class IndexedTriArrayPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description IndexedTriArrayPtr()
Default constructor yielding a NULL-pointer.IndexedTriArrayPtr(long cPtr, boolean cMemoryOwn)
IndexedTriArrayPtr(IndexedTriArray 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 IndexedTriArray
__ref__()
Dereferencing operator.TriMeshPtr
clone()
IndexedTriArrayCPtr
cptr()
void
delete()
IndexedTriArray
deref()
The pointer stored in the object.boolean
equals(IndexedTriArray p)
Triangle
get(long i)
static long
getCPtr(IndexedTriArrayPtr obj)
IndexedTriArray
getDeref()
Member access operator.long
getGlobalIndex(int idx)
vector_ui
getIndexes()
get the index mappinglong
getSize()
IndexedTriArray
getSubRange(long first, long last)
Triangle
getTriangle(long idx)
void
getTriangle(long i, Triangle dst)
void
getTriangle(long i, Triangle_f dst)
TriMeshPtr
getTriMesh()
TriMeshPtr
getTriMesh(boolean forceCopy)
GeometryData.GeometryType
getType()
double
getVolume()
calculate a volume of this triangle meshboolean
isConvex()
boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipvoid
scale(double s)
void
set(long i, Triangle d)
void
setConvexEnabled(boolean isConvex)
long
size()
void
sortAxis(int axis)
sorts the triangles in the range [first,last[.void
sortAxis(int axis, Transform3D t3d)
java.lang.String
toString(GeometryData.GeometryType type)
format GeometryType to string
-
-
-
Constructor Detail
-
IndexedTriArrayPtr
public IndexedTriArrayPtr(long cPtr, boolean cMemoryOwn)
-
IndexedTriArrayPtr
public IndexedTriArrayPtr()
Default constructor yielding a NULL-pointer.
-
IndexedTriArrayPtr
public IndexedTriArrayPtr(IndexedTriArray ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(IndexedTriArrayPtr obj)
-
delete
public void delete()
-
deref
public IndexedTriArray deref()
The pointer stored in the object.
-
__ref__
public IndexedTriArray __ref__()
Dereferencing operator.
-
getDeref
public IndexedTriArray getDeref()
Member access operator.
-
equals
public boolean equals(IndexedTriArray 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 IndexedTriArrayCPtr cptr()
-
getIndexes
public vector_ui getIndexes()
get the index mapping
-
sortAxis
public void sortAxis(int axis)
sorts the triangles in the range [first,last[. the vertices of the triangles
are projected onto the axis and then sorted in regard to the projected value
from small to high- Parameters:
axis
-
-
sortAxis
public void sortAxis(int axis, Transform3D t3d)
-
getSubRange
public IndexedTriArray getSubRange(long first, long last)
-
clone
public TriMeshPtr clone()
-
scale
public void scale(double s)
-
getGlobalIndex
public long getGlobalIndex(int idx)
-
get
public Triangle get(long i)
-
set
public void set(long i, Triangle d)
-
getTriangle
public Triangle getTriangle(long idx)
-
getTriangle
public void getTriangle(long i, Triangle dst)
-
getTriangle
public void getTriangle(long i, Triangle_f dst)
-
getType
public GeometryData.GeometryType getType()
-
getSize
public long getSize()
-
size
public long size()
-
getTriMesh
public TriMeshPtr getTriMesh(boolean forceCopy)
-
getTriMesh
public TriMeshPtr getTriMesh()
-
isConvex
public boolean isConvex()
-
setConvexEnabled
public void setConvexEnabled(boolean isConvex)
-
getVolume
public double getVolume()
calculate a volume of this triangle mesh
-
toString
public java.lang.String toString(GeometryData.GeometryType type)
format GeometryType to string- Parameters:
type
-
-
-