Package net.imglib2.mesh
Interface Vertices
-
- All Known Implementing Classes:
BufferMesh.Vertices,NaiveDoubleMesh.Vertices,NaiveFloatMesh.Vertices
public interface Vertices extends Iterable<Vertex>
Collection of vertices for aMesh.- Author:
- Curtis Rueden
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default longadd(double x, double y, double z)Adds a vertex.default longadd(double x, double y, double z, double nx, double ny, double nz, double u, double v)Adds a vertex.default longaddf(float x, float y, float z)Adds a vertex.longaddf(float x, float y, float z, float nx, float ny, float nz, float u, float v)Adds a vertex.default intaddfi(float x, float y, float z)Adds a vertex, restricting the number of vertices to be anint.default intaddfi(float x, float y, float z, float nx, float ny, float nz, float u, float v)Adds a vertex, restrictig the number of vertices to be anint.default intaddi(double x, double y, double z)Adds a vertex, restricting the size of the vertices collection toint.default intaddi(double x, double y, double z, double nx, double ny, double nz, double u, double v)Adds a vertex, restricting the size of the vertices collection toint.default Iterator<Vertex>iterator()Meshmesh()The mesh to which the collection of vertices belongs.default doublenx(long vIndex)X coordinate of vertex normal, as a double.floatnxf(long vIndex)X coordinate of vertex normal, as a float.default doubleny(long vIndex)Y coordinate of vertex normal, as a double.floatnyf(long vIndex)Y coordinate of vertex normal, as a float.default doublenz(long vIndex)Z coordinate of vertex normal, as a double.floatnzf(long vIndex)Z coordinate of vertex normal, as a float.default voidset(long vIndex, double x, double y, double z)Overwrites the position of a vertex, sets normal and texture coordinates to0default voidset(long vIndex, double x, double y, double z, double nx, double ny, double nz, double u, double v)Overwrites a vertex's position, normal and texture coordinates.default voidsetf(long vIndex, float x, float y, float z)Overwrites the position of a vertex, sets normal and texture coordinates to0voidsetf(long vIndex, float x, float y, float z, float nx, float ny, float nz, float u, float v)Overwrites a vertex's position, normal and texture coordinates.default voidsetNormal(long vIndex, double nx, double ny, double nz)Overwrites a vertex's normal.voidsetNormalf(long vIndex, float nx, float ny, float nz)Overwrites a vertex's normal.default voidsetPosition(long vIndex, double x, double y, double z)Overwrites a vertex's position.voidsetPositionf(long vIndex, float x, float y, float z)Overwrites a vertex's position.default voidsetTexture(long vIndex, double u, double v)Overwrites a vertex's texture coordinates.voidsetTexturef(long vIndex, float u, float v)Overwrites a vertex's texture coordinates.default intsize()Number of vertices in the collection as anintvalue.longsizel()Number of vertices in the collection as alongvalue.default doubleu(long vIndex)U value of vertex texture coordinate, as a double.floatuf(long vIndex)U value of vertex texture coordinate, as a float.default doublev(long vIndex)V value of vertex texture coordinate, as a double.floatvf(long vIndex)V value of vertex texture coordinate, as a float.default doublex(long vIndex)X position of a vertex, as a double.floatxf(long vIndex)X position of a vertex, as a float.default doubley(long vIndex)Y position of a vertex, as a double.floatyf(long vIndex)Y position of a vertex, as a float.default doublez(long vIndex)Z position of a vertex, as a double.floatzf(long vIndex)Z position of a vertex, as a float.-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
mesh
Mesh mesh()
The mesh to which the collection of vertices belongs.
-
sizel
long sizel()
Number of vertices in the collection as alongvalue.
-
size
default int size()
Number of vertices in the collection as anintvalue.- Throws:
RuntimeException- if the number of vertices exceedInteger.MAX_VALUE.
-
xf
float xf(long vIndex)
X position of a vertex, as a float.
-
yf
float yf(long vIndex)
Y position of a vertex, as a float.
-
zf
float zf(long vIndex)
Z position of a vertex, as a float.
-
nxf
float nxf(long vIndex)
X coordinate of vertex normal, as a float.
-
nyf
float nyf(long vIndex)
Y coordinate of vertex normal, as a float.
-
nzf
float nzf(long vIndex)
Z coordinate of vertex normal, as a float.
-
uf
float uf(long vIndex)
U value of vertex texture coordinate, as a float.
-
vf
float vf(long vIndex)
V value of vertex texture coordinate, as a float.
-
addf
long addf(float x, float y, float z, float nx, float ny, float nz, float u, float v)Adds a vertex.- Parameters:
x- X position of the vertex.y- Y position of the vertex.z- Z position of the vertex.nx- X coordinate of the vertex's normal.ny- Y coordinate of the vertex's normal.nz- Z coordinate of the vertex's normal.u- U value of vertex texture coordinate.v- V value of vertex texture coordinate.- Returns:
- Index of newly added vertex.
-
addfi
default int addfi(float x, float y, float z, float nx, float ny, float nz, float u, float v)Adds a vertex, restrictig the number of vertices to be anint.- Parameters:
x- X position of the vertex.y- Y position of the vertex.z- Z position of the vertex.nx- X coordinate of the vertex's normal.ny- Y coordinate of the vertex's normal.nz- Z coordinate of the vertex's normal.u- U value of vertex texture coordinate.v- V value of vertex texture coordinate.- Returns:
- Index of newly added vertex.
- Throws:
RuntimeException- if the number of vertices exceedInteger.MAX_VALUE.
-
setf
void setf(long vIndex, float x, float y, float z, float nx, float ny, float nz, float u, float v)Overwrites a vertex's position, normal and texture coordinates.- Parameters:
vIndex- Index of vertex to overwrite.x- X position of the vertex.y- Y position of the vertex.z- Z position of the vertex.nx- X coordinate of the vertex's normal.ny- Y coordinate of the vertex's normal.nz- Z coordinate of the vertex's normal.u- U value of vertex texture coordinate.v- V value of vertex texture coordinate.
-
setPositionf
void setPositionf(long vIndex, float x, float y, float z)Overwrites a vertex's position.- Parameters:
vIndex- Index of vertex to overwrite.x- X position of the vertex.y- Y position of the vertex.z- Z position of the vertex.
-
setNormalf
void setNormalf(long vIndex, float nx, float ny, float nz)Overwrites a vertex's normal.- Parameters:
vIndex- Index of vertex to overwrite.nx- X coordinate of the vertex's normal.ny- Y coordinate of the vertex's normal.nz- Z coordinate of the vertex's normal.
-
setTexturef
void setTexturef(long vIndex, float u, float v)Overwrites a vertex's texture coordinates.- Parameters:
vIndex- Index of vertex to overwrite.u- U value of vertex texture coordinate.v- V value of vertex texture coordinate.
-
addf
default long addf(float x, float y, float z)Adds a vertex.- Parameters:
x- X position of the vertex.y- Y position of the vertex.z- Z position of the vertex.- Returns:
- Index of newly added vertex.
-
addfi
default int addfi(float x, float y, float z)Adds a vertex, restricting the number of vertices to be anint.- Parameters:
x- X position of the vertex.y- Y position of the vertex.z- Z position of the vertex.- Returns:
- Index of newly added vertex.
- Throws:
RuntimeException- if the number of vertices exceed Integer.MAX_VALUE.
-
setf
default void setf(long vIndex, float x, float y, float z)Overwrites the position of a vertex, sets normal and texture coordinates to0- Parameters:
vIndex- Index of vertex to overwrite.x- X position of the vertex.y- Y position of the vertex.z- Z position of the vertex.
-
x
default double x(long vIndex)
X position of a vertex, as a double.
-
y
default double y(long vIndex)
Y position of a vertex, as a double.
-
z
default double z(long vIndex)
Z position of a vertex, as a double.
-
nx
default double nx(long vIndex)
X coordinate of vertex normal, as a double.
-
ny
default double ny(long vIndex)
Y coordinate of vertex normal, as a double.
-
nz
default double nz(long vIndex)
Z coordinate of vertex normal, as a double.
-
u
default double u(long vIndex)
U value of vertex texture coordinate, as a double.
-
v
default double v(long vIndex)
V value of vertex texture coordinate, as a double.
-
add
default long add(double x, double y, double z)Adds a vertex.- Parameters:
x- X coordinate of the vertex.y- Y coordinate of the vertex.z- Z coordinate of the vertex.- Returns:
- Index of newly added vertex.
-
addi
default int addi(double x, double y, double z)Adds a vertex, restricting the size of the vertices collection toint.- Parameters:
x- X coordinate of the vertex.y- Y coordinate of the vertex.z- Z coordinate of the vertex.- Returns:
- Index of newly added vertex.
- Throws:
RuntimeException- if the number of vertices exceedInteger.MAX_VALUE.
-
add
default long add(double x, double y, double z, double nx, double ny, double nz, double u, double v)Adds a vertex.- Parameters:
x- X position of the vertex.y- Y position of the vertex.z- Z position of the vertex.nx- X coordinate of the vertex's normal.ny- Y coordinate of the vertex's normal.nz- Z coordinate of the vertex's normal.u- U value of vertex texture coordinate.v- V value of vertex texture coordinate.- Returns:
- Index of newly added vertex.
-
addi
default int addi(double x, double y, double z, double nx, double ny, double nz, double u, double v)Adds a vertex, restricting the size of the vertices collection toint.- Parameters:
x- X position of the vertex.y- Y position of the vertex.z- Z position of the vertex.nx- X coordinate of the vertex's normal.ny- Y coordinate of the vertex's normal.nz- Z coordinate of the vertex's normal.u- U value of vertex texture coordinate.v- V value of vertex texture coordinate.- Returns:
- Index of newly added vertex.
- Throws:
RuntimeException- if the number of vertices exceedInteger.MAX_VALUE.
-
set
default void set(long vIndex, double x, double y, double z)Overwrites the position of a vertex, sets normal and texture coordinates to0- Parameters:
vIndex- Index of vertex to overwrite.x- X position of the vertex.y- Y position of the vertex.z- Z position of the vertex.
-
set
default void set(long vIndex, double x, double y, double z, double nx, double ny, double nz, double u, double v)Overwrites a vertex's position, normal and texture coordinates.- Parameters:
vIndex- Index of vertex to overwrite.x- X position of the vertex.y- Y position of the vertex.z- Z position of the vertex.nx- X coordinate of the vertex's normal.ny- Y coordinate of the vertex's normal.nz- Z coordinate of the vertex's normal.u- U value of vertex texture coordinate.v- V value of vertex texture coordinate.
-
setPosition
default void setPosition(long vIndex, double x, double y, double z)Overwrites a vertex's position.- Parameters:
vIndex- Index of vertex to overwrite.x- X position of the vertex.y- Y position of the vertex.z- Z position of the vertex.
-
setNormal
default void setNormal(long vIndex, double nx, double ny, double nz)Overwrites a vertex's normal.- Parameters:
vIndex- Index of vertex to overwrite.nx- X coordinate of the vertex's normal.ny- Y coordinate of the vertex's normal.nz- Z coordinate of the vertex's normal.
-
setTexture
default void setTexture(long vIndex, double u, double v)Overwrites a vertex's texture coordinates.- Parameters:
vIndex- Index of vertex to overwrite.u- U value of vertex texture coordinate.v- V value of vertex texture coordinate.
-
-