|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.javagl.utils.obj.impl.DefaultObj
public class DefaultObj
Default implementation of an Obj and an ObjTarget.
| Constructor Summary | |
|---|---|
DefaultObj()
Creates a new, empty DefaultObj. |
|
| Method Summary | |
|---|---|
void |
addFace(ObjFace face)
Add the given face to this ObjTarget |
void |
addGroup(ObjGroup group)
Add the given group to this ObjTarget |
void |
addMaterialGroup(ObjGroup group)
Add the given material group to this ObjTarget |
void |
addNormal(FloatTuple normal)
Add the given normal to this ObjTarget |
void |
addTexCoord(FloatTuple texCoord)
Add the given texture coordinate to this ObjTarget |
void |
addVertex(FloatTuple vertex)
Add the given vertex to this ObjTarget |
boolean |
equals(Object obj)
|
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. |
int |
hashCode()
|
void |
printInfo()
Debug method: Prints some information about the contents of this Obj. |
void |
setMtlFileName(String mtlFileName)
Set the given MTL file name that was read from the 'mtllib' line of the OBJ file. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultObj()
| Method Detail |
|---|
public int getNumVertices()
Obj
getNumVertices in interface Objpublic FloatTuple getVertex(int index)
Obj
getVertex in interface Objindex - The index of the vertex
public int getNumTexCoords()
Obj
getNumTexCoords in interface Objpublic FloatTuple getTexCoord(int index)
Obj
getTexCoord in interface Objindex - The index of the texture coordinate
public int getNumNormals()
Obj
getNumNormals in interface Objpublic FloatTuple getNormal(int index)
Obj
getNormal in interface Objindex - The index of the normal
public int getNumFaces()
Obj
getNumFaces in interface Objpublic ObjFace getFace(int index)
Obj
getFace in interface Objindex - The index of the face.
public int getNumGroups()
Obj
getNumGroups in interface Objpublic ObjGroup getGroup(int index)
Obj
getGroup in interface Objindex - The index of the group.
public ObjGroup getGroup(String name)
Obj
getGroup in interface Objname - The name of the group.
public int getNumMaterialGroups()
Obj
getNumMaterialGroups in interface Objpublic ObjGroup getMaterialGroup(int index)
Obj
getMaterialGroup in interface Objindex - The index of the material group.
public ObjGroup getMaterialGroup(String name)
Obj
getMaterialGroup in interface Objname - The name of the material group.
public String getMtlFileName()
Obj
getMtlFileName in interface Objpublic void addFace(ObjFace face)
ObjTarget
addFace in interface ObjTargetface - The face to add.public void addGroup(ObjGroup group)
ObjTarget
addGroup in interface ObjTargetgroup - The group to add.public void addMaterialGroup(ObjGroup group)
ObjTarget
addMaterialGroup in interface ObjTargetgroup - The material group to add.public void addVertex(FloatTuple vertex)
ObjTarget
addVertex in interface ObjTargetvertex - The vertex to add.public void addTexCoord(FloatTuple texCoord)
ObjTarget
addTexCoord in interface ObjTargettexCoord - The texture coordinate to add.public void addNormal(FloatTuple normal)
ObjTarget
addNormal in interface ObjTargetnormal - The normal to add.public void setMtlFileName(String mtlFileName)
ObjTarget
setMtlFileName in interface ObjTargetmtlFileName - The name of the MTL filepublic void printInfo()
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||