|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.loaders.lw3d.TextfileParser
com.sun.j3d.loaders.lw3d.LwsObject
class LwsObject
An LwsObject is passed a handle to the text file that contains the scene and is responsible for parsing a particular section of that file that describes a single object. This section defines the type of object (either a group or some geometry specified by an Object file) and some keyframe data that describes the an animation of the orientation/position/scale of the object. For geometry objects, this class instantiates a J3dLwoParser object to parse the binary data file. For the keyframe data, the class instantiates an LwsMotion object to parse and store that data.
Field Summary | |
---|---|
(package private) java.lang.String |
fileName
|
(package private) int |
fileType
|
(package private) boolean |
hasPivot
|
(package private) LwsMotion |
motion
|
(package private) java.util.Vector |
objectBehavior
|
(package private) TransformGroup |
objectTransform
|
(package private) java.lang.String |
objName
|
(package private) int |
parent
|
(package private) TransformGroup |
pivotTransGroup
|
(package private) java.lang.String |
protocol
|
(package private) java.util.Vector |
shapeList
|
(package private) java.net.URL |
urlName
|
Fields inherited from class com.sun.j3d.loaders.lw3d.TextfileParser |
---|
currentLevel, debugPrinter, EXCEPTION, LINE_TRACE, lineSeparatorChar, MISC, NONE, NUMBER, TIME, TRACE, VALUES, WORD |
Constructor Summary | |
---|---|
LwsObject(java.io.StreamTokenizer st,
boolean loadObject,
int firstFrame,
int totalFrames,
float totalTime,
Lw3dLoader loader,
int debugVals)
Constructor: parses object section of this scene file and creates all appropriate data structures to hold the information |
Method Summary | |
---|---|
(package private) void |
addChild(LwsPrimitive child)
Adds the given child to the transform of this node (its parent). |
(package private) void |
createJava3dObject(LwsObject cloneObject,
int loadBehaviors)
Creates Java3d objects from the data stored for this object. |
java.util.Vector |
getObjectBehaviors()
Return the Group that holds this object's behaviors. |
TransformGroup |
getObjectNode()
Return the TransformGroup that holds this object file |
(package private) int |
getParent()
Returns parent object |
(package private) java.lang.String |
getQualifiedFilename(java.lang.String pathname,
java.lang.String filename)
This method takes the given path and filename and checks whether that file exists. |
(package private) java.net.URL |
getQualifiedURL(java.lang.String path,
java.lang.String file)
|
(package private) java.util.Vector |
getShapeList()
Return list of Shape3D objects for this object file. |
(package private) void |
printVals()
Utiliy function to print some of the object values. |
Methods inherited from class com.sun.j3d.loaders.lw3d.TextfileParser |
---|
checkString, checkType, debugOutput, debugOutputLn, getAndCheckString, getName, getNumber, getString, isCurrentToken, skip, skipUntilString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.lang.String fileName
java.lang.String objName
LwsMotion motion
int parent
TransformGroup objectTransform
java.util.Vector objectBehavior
java.util.Vector shapeList
boolean hasPivot
TransformGroup pivotTransGroup
java.net.URL urlName
java.lang.String protocol
int fileType
Constructor Detail |
---|
LwsObject(java.io.StreamTokenizer st, boolean loadObject, int firstFrame, int totalFrames, float totalTime, Lw3dLoader loader, int debugVals) throws java.io.FileNotFoundException, ParsingErrorException
st
- StreamTokenizer for scene fileloadObject
- boolean specifying that object is not a lw3d Null
objectfirstFrame
- int holding the first frame of the scene's animationtotalFrames
- int holding the total number of frames in the scenetotalTime
- float holding the total time of the animationloader
- Lw3dLoader loader object that was created by userdebugVals
- in holding current debug flags
java.io.FileNotFoundException
ParsingErrorException
Method Detail |
---|
java.lang.String getQualifiedFilename(java.lang.String pathname, java.lang.String filename) throws java.io.FileNotFoundException
java.io.FileNotFoundException
java.net.URL getQualifiedURL(java.lang.String path, java.lang.String file) throws java.net.MalformedURLException
java.net.MalformedURLException
int getParent()
void addChild(LwsPrimitive child)
void createJava3dObject(LwsObject cloneObject, int loadBehaviors) throws IncorrectFormatException, ParsingErrorException, java.io.FileNotFoundException
IncorrectFormatException
ParsingErrorException
java.io.FileNotFoundException
java.util.Vector getShapeList()
public TransformGroup getObjectNode()
getObjectNode
in interface LwsPrimitive
public java.util.Vector getObjectBehaviors()
getObjectBehaviors
in interface LwsPrimitive
void printVals()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |