Package com.irurueta.geometry.io
Class VertexOBJ
java.lang.Object
com.irurueta.geometry.io.VertexOBJ
This class defines the structure that contains data for a single vertex in
an OBJ file.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intIndex of normal corresponding to this vertex in OBJ file.private intIndex of texture assigned to this vertex in OBJ file.private com.irurueta.geometry.Point3DContains coordinates of 3D point.private intIndex of vertex in OBJ file. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns index of normal corresponding to this vertex in OBJ file.intReturns index of texture assigned to this vertex in OBJ file.com.irurueta.geometry.Point3DReturns coordinates of 3D point.intReturns index of vertex in OBJ file.booleanIndicates whether normal index has been provided or not.booleanIndicates if texture assigned to this vertex is available or notbooleanIndicates whether 3D point has been provided or not.booleanIndicates whether vertex index has been provided or not.voidsetNormalIndex(int normalIndex) Sets index of normal corresponding to this vertex in OBJ file.voidsetTextureIndex(int textureIndex) Sets index of texture assigned to this vertex in OBJ file.voidsetVertex(com.irurueta.geometry.Point3D vertex) Sets coordinates of 3D point.voidsetVertexIndex(int vertexIndex) Sets index of vertex in OBJ file.
-
Field Details
-
vertex
private com.irurueta.geometry.Point3D vertexContains coordinates of 3D point. -
vertexIndex
private int vertexIndexIndex of vertex in OBJ file. -
normalIndex
private int normalIndexIndex of normal corresponding to this vertex in OBJ file. -
textureIndex
private int textureIndexIndex of texture assigned to this vertex in OBJ file.
-
-
Constructor Details
-
VertexOBJ
public VertexOBJ()Constructor.
-
-
Method Details
-
getVertex
public com.irurueta.geometry.Point3D getVertex()Returns coordinates of 3D point.- Returns:
- coordinates of 3D point.
-
setVertex
public void setVertex(com.irurueta.geometry.Point3D vertex) Sets coordinates of 3D point.- Parameters:
vertex- coordinates of 3D point.
-
isVertexAvailable
public boolean isVertexAvailable()Indicates whether 3D point has been provided or not.- Returns:
- true if 3D point is available, false otherwise.
-
getVertexIndex
public int getVertexIndex()Returns index of vertex in OBJ file.- Returns:
- index of vertex in OBJ file.
-
setVertexIndex
public void setVertexIndex(int vertexIndex) Sets index of vertex in OBJ file.- Parameters:
vertexIndex- index of vertex in OBJ file.
-
isVertexIndexAvailable
public boolean isVertexIndexAvailable()Indicates whether vertex index has been provided or not.- Returns:
- true if vertex index is available, false otherwise.
-
getNormalIndex
public int getNormalIndex()Returns index of normal corresponding to this vertex in OBJ file.- Returns:
- index of normal corresponding to this vertex in OBJ file.
-
setNormalIndex
public void setNormalIndex(int normalIndex) Sets index of normal corresponding to this vertex in OBJ file.- Parameters:
normalIndex- index of normal corresponding to this vertex in OBJ file.
-
isNormalIndexAvailable
public boolean isNormalIndexAvailable()Indicates whether normal index has been provided or not.- Returns:
- true if normal index is available, false otherwise.
-
getTextureIndex
public int getTextureIndex()Returns index of texture assigned to this vertex in OBJ file.- Returns:
- index of texture assigned to this vertex in OBJ file.
-
setTextureIndex
public void setTextureIndex(int textureIndex) Sets index of texture assigned to this vertex in OBJ file.- Parameters:
textureIndex- index of texture assigned to this vertex in OBJ file.
-
isTextureIndexAvailable
public boolean isTextureIndexAvailable()Indicates if texture assigned to this vertex is available or not- Returns:
- true if available, false otherwise.
-