Package net.imglib2.mesh.impl.nio
Class BufferMesh.Triangles
- java.lang.Object
-
- net.imglib2.mesh.impl.nio.BufferMesh.Triangles
-
-
Constructor Summary
Constructors Constructor Description Triangles(IntBuffer indices, FloatBuffer normals)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longaddf(long v0, long v1, long v2, float nx, float ny, float nz)Adds a triangle to the mesh's triangles list.IntBufferindices()Meshmesh()The mesh to which the collection of triangles belongs.FloatBuffernormals()floatnxf(long tIndex)X coordinate of triangle's normal, as a float.floatnyf(long tIndex)Y coordinate of triangle's normal, as a float.floatnzf(long tIndex)Z coordinate of triangle's normal, as a float.longsizel()Number of triangles in the collection as alongvalue.longvertex0(long tIndex)Index of first vertex in a triangle.longvertex1(long tIndex)Index of second vertex in a triangle.longvertex2(long tIndex)Index of third vertex in a triangle.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
Triangles
public Triangles(IntBuffer indices, FloatBuffer normals)
-
-
Method Detail
-
indices
public IntBuffer indices()
-
normals
public FloatBuffer normals()
-
mesh
public Mesh mesh()
Description copied from interface:TrianglesThe mesh to which the collection of triangles belongs.
-
sizel
public long sizel()
Description copied from interface:TrianglesNumber of triangles in the collection as alongvalue.
-
vertex0
public long vertex0(long tIndex)
Description copied from interface:TrianglesIndex of first vertex in a triangle.
-
vertex1
public long vertex1(long tIndex)
Description copied from interface:TrianglesIndex of second vertex in a triangle.
-
vertex2
public long vertex2(long tIndex)
Description copied from interface:TrianglesIndex of third vertex in a triangle.
-
nxf
public float nxf(long tIndex)
Description copied from interface:TrianglesX coordinate of triangle's normal, as a float.
-
nyf
public float nyf(long tIndex)
Description copied from interface:TrianglesY coordinate of triangle's normal, as a float.
-
nzf
public float nzf(long tIndex)
Description copied from interface:TrianglesZ coordinate of triangle's normal, as a float.
-
addf
public long addf(long v0, long v1, long v2, float nx, float ny, float nz)Description copied from interface:TrianglesAdds a triangle to the mesh's triangles list.- Specified by:
addfin interfaceTriangles- Parameters:
v0- Index of triangle's first vertex.v1- Index of triangle's second vertex.v2- Index of triangle's third vertex.nx- X coordinate of triangle's normal.ny- Y coordinate of triangle's normal.nz- Z coordinate of triangle's normal.- Returns:
- Index of newly added triangle.
-
-