|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.loaders.ac3d.Ac3dSurface
public class Ac3dSurface
Representation of the attributes for a polygon surface in the AC3D file format definition.
Primitives are used wherever possible to reduce memory usage and object clutter.
TODO:
Field Summary | |
---|---|
static int |
FLAG_CLOSEDLINE
Surface flag for a closed line loop |
static int |
FLAG_LINE
Surface flag for an open line |
static int |
FLAG_POLYGON
Surface flag for a polygon |
static int |
FLAG_SHADED
Surface flag for a shaded polygon |
static int |
FLAG_TWOSIDED
Surface flag for a double sided polygon |
Constructor Summary | |
---|---|
Ac3dSurface()
Default constructor, which sets up the initial state. |
Method Summary | |
---|---|
void |
addRef(int index,
int vertex,
float[] texCoord)
Append an additional reference to the surface. |
boolean |
checkFlag(int flag)
Helper function that tests to see if the requested flag is set in the local instance state. |
int |
getFlags()
Accessor to get the current flag state. |
int |
getMaterial()
Get the material index reference for this surface. |
int |
getNumrefs()
Retrieve the number of vertex references for this surface. |
float[] |
getTextureCoordinates()
Accessor for the textureCoordinates property. |
int[] |
getVerticesIndex()
Get the array of vertices. |
void |
setFlags(int flags)
Mutator to set the current flag state. |
void |
setMaterial(int mat)
Set the material index reference. |
void |
setNumrefs(int numrefs)
Mutator to set the number of vertex references for this surface. |
java.lang.String |
toString()
Creates and returns the stringified version of the internal state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FLAG_POLYGON
public static final int FLAG_CLOSEDLINE
public static final int FLAG_LINE
public static final int FLAG_SHADED
public static final int FLAG_TWOSIDED
Constructor Detail |
---|
public Ac3dSurface()
Method Detail |
---|
public void setNumrefs(int numrefs)
Mutator to set the number of vertex references for this surface. This also allocates space for all of the associated data.
numrefs
- The number of references this surface is to have.public int getNumrefs()
public void setFlags(int flags)
Mutator to set the current flag state.
flags
- The value ot set the current flag state to.public int getFlags()
Accessor to get the current flag state.
public void setMaterial(int mat)
mat
- The material index to associate this surface to.public int getMaterial()
public void addRef(int index, int vertex, float[] texCoord)
index
- Indicates the index number of the surface vertes.vertex
- The index of the vertex in the object the surface is a
part of.texCoord
- The texture coordinates for the surface vertex relating
to the texture map.public int[] getVerticesIndex()
public float[] getTextureCoordinates()
Accessor for the textureCoordinates
property.
public boolean checkFlag(int flag)
flag
- The flag to check for.
public java.lang.String toString()
Creates and returns the stringified version of the internal state.
toString
in class java.lang.Object
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |