public class AbstractWritableObj extends Object implements WritableObj
WritableObj. | Modifier | Constructor and Description |
|---|---|
protected |
AbstractWritableObj()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFace(int... v)
Add the specified face with the given vertex indices, but without
texture- or normal indices.
|
void |
addFace(int[] v,
int[] vt,
int[] vn)
Add the specified face.
|
void |
addFace(ObjFace face)
Add the given face.
|
void |
addFaceWithAll(int... v)
Add the specified face with the given vertex, texture coordinate
and normal indices.
|
void |
addFaceWithNormals(int... v)
Add the specified face with the given vertex and normal indices,
but without texture coordinate indices.
|
void |
addFaceWithTexCoords(int... v)
Add the specified face with the given vertex and texture coordinate
indices, but without normal indices.
|
void |
addNormal(float x,
float y,
float z)
Add the given normal
|
void |
addNormal(FloatTuple normal)
Add the given normal
|
void |
addTexCoord(float x)
Add the given texture coordinate
|
void |
addTexCoord(float x,
float y)
Add the given texture coordinate
|
void |
addTexCoord(float x,
float y,
float z)
Add the given texture coordinate
|
void |
addTexCoord(FloatTuple texCoord)
Add the given texture coordinate
|
void |
addVertex(float x,
float y,
float z)
Add the given vertex
|
void |
addVertex(FloatTuple vertex)
Add the given vertex
|
void |
setActiveGroupNames(Collection<? extends String> groupNames)
Set the groups with the given names to be active right now.
|
void |
setActiveMaterialGroupName(String materialGroupName)
Set the material group with the given names to be active right now
Faces that are added subsequently will be added to the active
material group, creating this material group if necessary.
|
void |
setMtlFileNames(Collection<? extends String> mtlFileNames)
Set the given MTL file names.
|
public final void addVertex(float x,
float y,
float z)
WritableObjaddVertex in interface WritableObjx - The x-coordinatey - The y-coordinatez - The z-coordinatepublic void addVertex(FloatTuple vertex)
WritableObjaddVertex in interface WritableObjvertex - The vertex to add.public final void addTexCoord(float x)
WritableObjaddTexCoord in interface WritableObjx - The x-coordinatepublic final void addTexCoord(float x,
float y)
WritableObjaddTexCoord in interface WritableObjx - The x-coordinatey - The y-coordinatepublic final void addTexCoord(float x,
float y,
float z)
WritableObjaddTexCoord in interface WritableObjx - The x-coordinatey - The y-coordinatez - The z-coordinatepublic void addTexCoord(FloatTuple texCoord)
WritableObjaddTexCoord in interface WritableObjtexCoord - The texture coordinate to add.public void addNormal(FloatTuple normal)
WritableObjaddNormal in interface WritableObjnormal - The normal to add.public final void addNormal(float x,
float y,
float z)
WritableObjaddNormal in interface WritableObjx - The x-coordinatey - The y-coordinatez - The z-coordinatepublic void setActiveGroupNames(Collection<? extends String> groupNames)
WritableObjnull,
then this call will have no effect. If the given collection is empty,
then the default group (named "default") will be activated.setActiveGroupNames in interface WritableObjgroupNames - The group namespublic void setActiveMaterialGroupName(String materialGroupName)
WritableObjnull, then this call will have no
effect.setActiveMaterialGroupName in interface WritableObjmaterialGroupName - The material group namepublic void addFace(ObjFace face)
WritableObjaddFace in interface WritableObjface - The face to add.public final void addFace(int... v)
WritableObjaddFace in interface WritableObjv - The vertex indicespublic final void addFaceWithTexCoords(int... v)
WritableObjaddFaceWithTexCoords in interface WritableObjv - The vertex- and texture coordinate indicespublic final void addFaceWithNormals(int... v)
WritableObjaddFaceWithNormals in interface WritableObjv - The vertex- and normal indicespublic final void addFaceWithAll(int... v)
WritableObjaddFaceWithAll in interface WritableObjv - The vertex- texture coordinate and normal indicespublic final void addFace(int[] v,
int[] vt,
int[] vn)
WritableObjaddFace in interface WritableObjv - The vertex indicesvt - The texture coordinate indices. May be null.vn - The normal indices. May be nullpublic void setMtlFileNames(Collection<? extends String> mtlFileNames)
WritableObjsetMtlFileNames in interface WritableObjmtlFileNames - The names of the MTL fileCopyright © 2015. All rights reserved.