de.javagl.utils.obj
Interface Obj

All Known Implementing Classes:
DefaultObj

public interface Obj

Interface for classes providing part of the data that may be stored in an OBJ file. The data represented by this interface is:
Vertices
Texture Coordinates
Normals
Faces
Groups
Material groups


Method Summary
 ObjFace getFace(int index)
          Returns the face with the given index.
 ObjGroup getGroup(int index)
          Returns the group with the given index.
 ObjGroup getGroup(String name)
          Returns the group with the given name.
 ObjGroup getMaterialGroup(int index)
          Returns the material group with the given index.
 ObjGroup getMaterialGroup(String name)
          Returns the material group with the given name.
 String getMtlFileName()
          Returns the name of the MTL file that is associated with this Obj.
 FloatTuple getNormal(int index)
          Returns the normal with the given index.
 int getNumFaces()
          Returns the number of faces in the Obj.
 int getNumGroups()
          Returns the number of groups in this Obj.
 int getNumMaterialGroups()
          Returns the number of material groups in this Obj.
 int getNumNormals()
          Returns the number of normals in the Obj.
 int getNumTexCoords()
          Returns the number of texture coordinates in the Obj.
 int getNumVertices()
          Returns the number of vertices in the Obj.
 FloatTuple getTexCoord(int index)
          Returns the texture coordinate with the given index.
 FloatTuple getVertex(int index)
          Returns the vertex with the given index.
 

Method Detail

getNumVertices

int getNumVertices()
Returns the number of vertices in the Obj.

Returns:
The number of vertices in the Obj.

getVertex

FloatTuple getVertex(int index)
Returns the vertex with the given index. Note that the index is ZERO-based, in contrast to the ONE-based indices of the actual OBJ file.

Parameters:
index - The index of the vertex
Returns:
The vertex with the given index

getNumTexCoords

int getNumTexCoords()
Returns the number of texture coordinates in the Obj.

Returns:
The number of texture coodrinates in the Obj.

getTexCoord

FloatTuple getTexCoord(int index)
Returns the texture coordinate with the given index. Note that the index is ZERO-based, in contrast to the ONE-based indices of the actual OBJ file.

Parameters:
index - The index of the texture coordinate
Returns:
The texture coordinate with the given index

getNumNormals

int getNumNormals()
Returns the number of normals in the Obj.

Returns:
The number of normals in the Obj.

getNormal

FloatTuple getNormal(int index)
Returns the normal with the given index. Note that the index is ZERO-based, in contrast to the ONE-based indices of the actual OBJ file.

Parameters:
index - The index of the normal
Returns:
The normal with the given index

getNumFaces

int getNumFaces()
Returns the number of faces in the Obj.

Returns:
The number of faces in the Obj.

getFace

ObjFace getFace(int index)
Returns the face with the given index.

Parameters:
index - The index of the face.
Returns:
The face with the given index

getNumGroups

int getNumGroups()
Returns the number of groups in this Obj.

Returns:
The number of groups in this Obj.

getGroup

ObjGroup getGroup(int index)
Returns the group with the given index.

Parameters:
index - The index of the group.
Returns:
The group with the given index.

getGroup

ObjGroup getGroup(String name)
Returns the group with the given name.

Parameters:
name - The name of the group.
Returns:
The group with the given name.

getNumMaterialGroups

int getNumMaterialGroups()
Returns the number of material groups in this Obj.

Returns:
The number of material groups in this Obj.

getMaterialGroup

ObjGroup getMaterialGroup(int index)
Returns the material group with the given index.

Parameters:
index - The index of the material group.
Returns:
The material group with the given index.

getMaterialGroup

ObjGroup getMaterialGroup(String name)
Returns the material group with the given name.

Parameters:
name - The name of the material group.
Returns:
The material group with the given name.

getMtlFileName

String getMtlFileName()
Returns the name of the MTL file that is associated with this Obj.

Returns:
The name of the MTL file.