Package org.robwork.sdurw_geometry
Class IndexedTriMeshN0CPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.IndexedTriMeshN0CPtr
-
public class IndexedTriMeshN0CPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description IndexedTriMeshN0CPtr()
Default constructor yielding a NULL-pointer.IndexedTriMeshN0CPtr(long cPtr, boolean cMemoryOwn)
IndexedTriMeshN0CPtr(IndexedTriMeshN0 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 IndexedTriMeshN0
__ref__()
Dereferencing operator.Vector3D
calcFaceNormal(long triIdx)
calculate face normal of triangle at index triIdxTriMeshPtr
clone()
void
delete()
IndexedTriMeshN0
deref()
The pointer stored in the object.boolean
equals(IndexedTriMeshN0 p)
static long
getCPtr(IndexedTriMeshN0CPtr obj)
IndexedTriMeshN0
getDeref()
Member access operator.IndexedTriangle_32
getIndexedTriangle(long i)
short
getIndexSize()
The size of the index type used.SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t
getNormals()
Get vector of normals.int
getNrTris()
long
getSize()
Triangle
getTriangle(long i)
void
getTriangle(long i, Triangle dst)
void
getTriangle(long i, Triangle_f dst)
VectorIndexedTriangle
getTriangles()
get triangle listshort
getTriangleStride()
The stride of a triangle.Vector3D
getTriVertex(long i, long triIdx)
get vertex i of triangle at index triIdx.GeometryData.GeometryType
getType()
Vector3D
getVertex(long i, VertexIdx vidx)
Vector3D
getVertexNormal(long i, VertexIdx vidx)
SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t
getVertices()
Get vector of vertices.double
getVolume()
calculate a volume of this triangle meshboolean
hasFaceNormals()
Check if trimesh has face normals defined.boolean
hasVertexNormals()
Check if trimesh has vertex normals defined.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershiplong
size()
-
-
-
Constructor Detail
-
IndexedTriMeshN0CPtr
public IndexedTriMeshN0CPtr(long cPtr, boolean cMemoryOwn)
-
IndexedTriMeshN0CPtr
public IndexedTriMeshN0CPtr()
Default constructor yielding a NULL-pointer.
-
IndexedTriMeshN0CPtr
public IndexedTriMeshN0CPtr(IndexedTriMeshN0 ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(IndexedTriMeshN0CPtr obj)
-
delete
public void delete()
-
deref
public IndexedTriMeshN0 deref()
The pointer stored in the object.
-
__ref__
public IndexedTriMeshN0 __ref__()
Dereferencing operator.
-
getDeref
public IndexedTriMeshN0 getDeref()
Member access operator.
-
equals
public boolean equals(IndexedTriMeshN0 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
-
getIndexedTriangle
public IndexedTriangle_32 getIndexedTriangle(long i)
-
getTriangle
public Triangle getTriangle(long i)
-
getTriangle
public void getTriangle(long i, Triangle dst)
-
getTriangle
public void getTriangle(long i, Triangle_f dst)
-
getTriVertex
public Vector3D getTriVertex(long i, long triIdx)
get vertex i of triangle at index triIdx.- Parameters:
i
- [in] should be in interval [0;2]triIdx
- [in] index of triangle in the triangle mesh- Returns:
- a reference to the given vertex.
-
getTriangles
public VectorIndexedTriangle getTriangles()
get triangle list- Returns:
- vector of triangles
-
calcFaceNormal
public Vector3D calcFaceNormal(long triIdx)
calculate face normal of triangle at index triIdx- Returns:
- the face normal.
-
getNrTris
public int getNrTris()
-
getSize
public long getSize()
-
clone
public TriMeshPtr clone()
-
getNormals
public SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t getNormals()
Get vector of normals.- Returns:
- reference to vector.
-
getVertices
public SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t getVertices()
Get vector of vertices.- Returns:
- reference to vector.
-
getTriangleStride
public short getTriangleStride()
The stride of a triangle.- Returns:
- the stride.
-
getIndexSize
public short getIndexSize()
The size of the index type used.- Returns:
- Typically 2 (uint16_t) or 4 (uint32_t).
-
size
public long size()
-
hasVertexNormals
public boolean hasVertexNormals()
Check if trimesh has vertex normals defined.- Returns:
- true if vertex normals are defined.
-
hasFaceNormals
public boolean hasFaceNormals()
Check if trimesh has face normals defined.- Returns:
- true if face normals are defined.
-
getType
public GeometryData.GeometryType getType()
-
getVolume
public double getVolume()
calculate a volume of this triangle mesh
-
-