|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.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 Obj
public FloatTuple getVertex(int index)
Obj
getVertex
in interface Obj
index
- The index of the vertex
public int getNumTexCoords()
Obj
getNumTexCoords
in interface Obj
public FloatTuple getTexCoord(int index)
Obj
getTexCoord
in interface Obj
index
- The index of the texture coordinate
public int getNumNormals()
Obj
getNumNormals
in interface Obj
public FloatTuple getNormal(int index)
Obj
getNormal
in interface Obj
index
- The index of the normal
public int getNumFaces()
Obj
getNumFaces
in interface Obj
public ObjFace getFace(int index)
Obj
getFace
in interface Obj
index
- The index of the face.
public int getNumGroups()
Obj
getNumGroups
in interface Obj
public ObjGroup getGroup(int index)
Obj
getGroup
in interface Obj
index
- The index of the group.
public ObjGroup getGroup(String name)
Obj
getGroup
in interface Obj
name
- The name of the group.
public int getNumMaterialGroups()
Obj
getNumMaterialGroups
in interface Obj
public ObjGroup getMaterialGroup(int index)
Obj
getMaterialGroup
in interface Obj
index
- The index of the material group.
public ObjGroup getMaterialGroup(String name)
Obj
getMaterialGroup
in interface Obj
name
- The name of the material group.
public String getMtlFileName()
Obj
getMtlFileName
in interface Obj
public void addFace(ObjFace face)
ObjTarget
addFace
in interface ObjTarget
face
- The face to add.public void addGroup(ObjGroup group)
ObjTarget
addGroup
in interface ObjTarget
group
- The group to add.public void addMaterialGroup(ObjGroup group)
ObjTarget
addMaterialGroup
in interface ObjTarget
group
- The material group to add.public void addVertex(FloatTuple vertex)
ObjTarget
addVertex
in interface ObjTarget
vertex
- The vertex to add.public void addTexCoord(FloatTuple texCoord)
ObjTarget
addTexCoord
in interface ObjTarget
texCoord
- The texture coordinate to add.public void addNormal(FloatTuple normal)
ObjTarget
addNormal
in interface ObjTarget
normal
- The normal to add.public void setMtlFileName(String mtlFileName)
ObjTarget
setMtlFileName
in interface ObjTarget
mtlFileName
- The name of the MTL filepublic void printInfo()
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |