class LwsMotion extends TextfileParser
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
LwsMotion.FrameHolder
Class that associates a particular frame with its effective frame
number (which accounts for animations that start after frame 1)
|
| Modifier and Type | Field and Description |
|---|---|
(package private) Behavior |
behaviors |
(package private) int |
firstFrame |
(package private) LwsFrame[] |
frames |
(package private) boolean |
loop |
(package private) java.lang.String |
motionName |
(package private) int |
numChannels |
(package private) int |
numFrames |
(package private) int |
totalFrames |
(package private) float |
totalTime |
currentLevel, debugPrinter, EXCEPTION, LINE_TRACE, lineSeparatorChar, MISC, NONE, NUMBER, TIME, TRACE, VALUES, WORD| Constructor and Description |
|---|
LwsMotion(java.io.StreamTokenizer st,
int frames,
float time)
Constructor
|
LwsMotion(java.io.StreamTokenizer st,
int firstFrame,
int frames,
float time,
int debugVals)
Constructor: takes tokenizer, 1st frame of this animation, total
number of frames, total time of animation, and the debug settings
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
createJava3dBehaviors(TransformGroup target)
Create j3d behaviors for the data stored in this animation.
|
(package private) void |
createJava3dBehaviorsForFramesSubset(TransformGroup target)
Normally, we just create j3d behaviors from the frames.
|
(package private) void |
fixFrames()
The previous version of this method looked for sucessive frames with
the same rotation value (mod 2PI).
|
(package private) Behavior |
getBehaviors()
Returns the Behavior object created for this animation
|
(package private) LwsFrame |
getFirstFrame()
Returns the first LwsFrame object (which contains the initial
setup for a given object)
|
(package private) void |
getMotion(java.io.StreamTokenizer st)
This method parses the tokenizer and creates the data structures
that hold the data from that file.
|
(package private) int |
intMod(int divisee,
int divisor)
Utility for getting integer mod value
|
(package private) void |
playWithFrameTimes(java.util.Vector framesVector)
This method was added to account for animations that start after
the first frame (e.g., Juggler.lws starts at frame 30).
|
(package private) void |
printVals()
Utility function for printing values
|
checkString, checkType, debugOutput, debugOutputLn, getAndCheckString, getName, getNumber, getString, isCurrentToken, skip, skipUntilStringjava.lang.String motionName
LwsFrame[] frames
int numFrames
int numChannels
boolean loop
float totalTime
int firstFrame
int totalFrames
Behavior behaviors
LwsMotion(java.io.StreamTokenizer st,
int frames,
float time)
LwsMotion(java.io.StreamTokenizer st,
int firstFrame,
int frames,
float time,
int debugVals)
throws ParsingErrorException,
IncorrectFormatException
void getMotion(java.io.StreamTokenizer st)
throws ParsingErrorException,
IncorrectFormatException
void fixFrames()
int intMod(int divisee,
int divisor)
void playWithFrameTimes(java.util.Vector framesVector)
void createJava3dBehaviorsForFramesSubset(TransformGroup target)
void createJava3dBehaviors(TransformGroup target)
Behavior getBehaviors()
LwsFrame getFirstFrame()
void printVals()
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.