| java.lang.Object com.sun.j3d.loaders.lw3d.TextfileParser com.sun.j3d.loaders.lw3d.LwsObject
LwsObject | class LwsObject extends TextfileParser implements LwsPrimitive(Code) | | 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.
|
hasPivot | boolean hasPivot(Code) | | |
LwsObject | LwsObject(StreamTokenizer st, boolean loadObject, int firstFrame, int totalFrames, float totalTime, Lw3dLoader loader, int debugVals) throws java.io.FileNotFoundException, ParsingErrorException(Code) | | Constructor: parses object section of this scene file and
creates all appropriate data structures to hold the information
Parameters: st - StreamTokenizer for scene file Parameters: loadObject - boolean specifying that object is not a lw3d Nullobject Parameters: firstFrame - int holding the first frame of the scene's animation Parameters: totalFrames - int holding the total number of frames in the scene Parameters: totalTime - float holding the total time of the animation Parameters: loader - Lw3dLoader loader object that was created by user Parameters: debugVals - in holding current debug flags |
addChild | void addChild(LwsPrimitive child)(Code) | | Adds the given child to the transform of this node (its parent).
|
createJava3dObject | void createJava3dObject(LwsObject cloneObject, int loadBehaviors) throws IncorrectFormatException, ParsingErrorException, FileNotFoundException(Code) | | Creates Java3d objects from the data stored for this object.
The objects created consist of: A TransformGroup that holds the
transform specified by the first keyframe, a Behavior that acts
on the TransformGroup if there are more than 1 keyframes, and
some geometry (created by J3dLwoParser) from an external geometry
file (if the object wasn't an lw3d Null object (group)).
|
getObjectBehaviors | public Vector getObjectBehaviors()(Code) | | Return the Group that holds this object's behaviors. The behaviors
are grouped separately from the geometry so that they can be handled
differently by the parent application.
|
getObjectNode | public TransformGroup getObjectNode()(Code) | | Return the TransformGroup that holds this object file
|
getParent | int getParent()(Code) | | Returns parent object
|
getQualifiedFilename | String getQualifiedFilename(String pathname, String filename) throws java.io.FileNotFoundException(Code) | | This method takes the given path and filename and checks whether
that file exists. If not, it chops off the last part of pathname
and recurse to try again. This has the effect of searching all the
way up a given pathname for the existence of the file anywhere
along that path. This is somewhat of a hack to get around the
constraining way that Lightwave uses to define its data object
locations in its scene files.
If the filename is absolute, it will use the path information from
the filename first, then the path information from the lws file.
If the file can not be found in these locations, the local directory
will be searched.
In addition, it will look for filenames converted to lowercase to
make it easier to use between Windows and Unix.
|
getShapeList | Vector getShapeList()(Code) | | Return list of Shape3D objects for this object file. This is used
when cloning objects (if the scene file requests the same object file
more than once, that object will be cloned instead of recreated each
time).
|
printVals | void printVals()(Code) | | Utiliy function to print some of the object values. Used in
debugging.
|
Methods inherited from com.sun.j3d.loaders.lw3d.TextfileParser | void checkString(StreamTokenizer st, String theString) throws ParsingErrorException(Code)(Java Doc) void checkType(StreamTokenizer st, int theType) throws ParsingErrorException(Code)(Java Doc) protected void debugOutput(int outputType, String theOutput)(Code)(Java Doc) protected void debugOutputLn(int outputType, String theOutput)(Code)(Java Doc) void getAndCheckString(StreamTokenizer st, String expectedValue) throws ParsingErrorException(Code)(Java Doc) String getName(StreamTokenizer st) throws ParsingErrorException(Code)(Java Doc) double getNumber(StreamTokenizer st) throws ParsingErrorException, NumberFormatException(Code)(Java Doc) String getString(StreamTokenizer st) throws ParsingErrorException(Code)(Java Doc) boolean isCurrentToken(StreamTokenizer st, String tokenString)(Code)(Java Doc) void skip(StreamTokenizer st, String tokenString, int skipVals) throws ParsingErrorException(Code)(Java Doc) void skipUntilString(StreamTokenizer st, String theString) throws ParsingErrorException(Code)(Java Doc)
|
|
|