Package org.robwork.sdurw_geometry
Class IndexedTriMeshN0_fCPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.IndexedTriMeshN0_fCPtr
-
public class IndexedTriMeshN0_fCPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description IndexedTriMeshN0_fCPtr()
Default constructor yielding a NULL-pointer.IndexedTriMeshN0_fCPtr(long cPtr, boolean cMemoryOwn)
IndexedTriMeshN0_fCPtr(IndexedTriMeshN0_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 IndexedTriMeshN0_f
__ref__()
Dereferencing operator.Vector3Df
calcFaceNormal(long triIdx)
calculate face normal of triangle at index triIdxTriMeshPtr
clone()
void
delete()
IndexedTriMeshN0_f
deref()
The pointer stored in the object.boolean
equals(IndexedTriMeshN0_f p)
static long
getCPtr(IndexedTriMeshN0_fCPtr obj)
IndexedTriMeshN0_f
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_float_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.Vector3Df
getTriVertex(long i, long triIdx)
get vertex i of triangle at index triIdx.GeometryData.GeometryType
getType()
Vector3Df
getVertex(long i, VertexIdx vidx)
Vector3Df
getVertexNormal(long i, VertexIdx vidx)
SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_float_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
-
IndexedTriMeshN0_fCPtr
public IndexedTriMeshN0_fCPtr(long cPtr, boolean cMemoryOwn)
-
IndexedTriMeshN0_fCPtr
public IndexedTriMeshN0_fCPtr()
Default constructor yielding a NULL-pointer.
-
IndexedTriMeshN0_fCPtr
public IndexedTriMeshN0_fCPtr(IndexedTriMeshN0_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(IndexedTriMeshN0_fCPtr obj)
-
delete
public void delete()
-
deref
public IndexedTriMeshN0_f deref()
The pointer stored in the object.
-
__ref__
public IndexedTriMeshN0_f __ref__()
Dereferencing operator.
-
getDeref
public IndexedTriMeshN0_f getDeref()
Member access operator.
-
equals
public boolean equals(IndexedTriMeshN0_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
-
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 Vector3Df 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 Vector3Df 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_float_t_t getNormals()
Get vector of normals.- Returns:
- reference to vector.
-
getVertices
public SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_float_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
-
-