com.sun.j3d.loaders.lw3d
Class LwoSurface
java.lang.Object
com.sun.j3d.loaders.lw3d.ParserObject
com.sun.j3d.loaders.lw3d.LwoSurface
class LwoSurface
- extends ParserObject
This class is responsible for retrieving the surface parameters for a
particular surface from a binary Object file and turning that data
into Java3D data. These surface parameters include
diffuse/specular/emissive properties, color, shininess, transparency,
and textures. For textures, this class instantiates a LwoTexture object
to parse that data and turn it into Java3D texture data.
Constructor Summary |
LwoSurface(LWOBFileReader reader,
int length,
int debugVals)
Constructor that parses surface data from the binary file
and creates the necessary Java3d objects |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
theReader
LWOBFileReader theReader
red
int red
green
int green
blue
int blue
diffuse
float diffuse
specular
float specular
transparency
float transparency
luminosity
float luminosity
creaseAngle
float creaseAngle
gloss
int gloss
color
Color3f color
diffuseColor
Color3f diffuseColor
specularColor
Color3f specularColor
emissiveColor
Color3f emissiveColor
shininess
float shininess
theImage
java.awt.Image theImage
textureCenter
Vector3f textureCenter
textureSize
Vector3f textureSize
textureAxis
int textureAxis
surfName
java.lang.String surfName
textureList
java.util.Vector textureList
LwoSurface
LwoSurface(LWOBFileReader reader,
int length,
int debugVals)
throws java.io.FileNotFoundException
- Constructor that parses surface data from the binary file
and creates the necessary Java3d objects
- Throws:
java.io.FileNotFoundException
setJ3dColors
void setJ3dColors()
- Creates Java3d color objects from the lw3d surface data
getColor
Color3f getColor()
getDiffuseColor
Color3f getDiffuseColor()
getSpecularColor
Color3f getSpecularColor()
getEmissiveColor
Color3f getEmissiveColor()
getShininess
float getShininess()
getCreaseAngle
float getCreaseAngle()
getTexture
LwoTexture getTexture()
- Returns the LwoTexture for the surface, if any is defined. Note that
lw3d allows users to define multiple textures for any surface, which
is not possible through Java3d. Therefore, we just grab the first
texture in any list of textures for a surface
getSurfName
java.lang.String getSurfName()
getTransparency
float getTransparency()
getSurf
void getSurf(int length)
throws java.io.FileNotFoundException,
IncorrectFormatException,
ParsingErrorException
- Parses the binary file and gets all data for this surface
- Throws:
java.io.FileNotFoundException
IncorrectFormatException
ParsingErrorException
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.