com.sun.j3d.loaders.lw3d
Class LwsFrame

java.lang.Object
  extended by com.sun.j3d.loaders.lw3d.TextfileParser
      extended by com.sun.j3d.loaders.lw3d.LwsFrame

 class LwsFrame
extends TextfileParser

This class is responsible for parsing the data in a Scene file associated with a single keyframe. This data includes the position, orientation, and scaling information, in addition to the frame number of that keyframe and some spline controls which are currently ignored.


Field Summary
(package private)  double bank
           
(package private)  double bias
           
(package private)  double continuity
           
(package private)  double frameNumber
           
(package private)  double heading
           
(package private)  int linearValue
           
(package private)  double pitch
           
(package private)  double tension
           
(package private)  double x
           
(package private)  double xScale
           
(package private)  double y
           
(package private)  double yScale
           
(package private)  double z
           
(package private)  double zScale
           
 
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
LwsFrame(LwsFrame prevFrame, LwsFrame nextFrame, double ratio)
          Construct new frame that's in-between two given frames Ratio gives the interpolation value for how far in-between the new frame should be (0.5 is half-way, etc)
LwsFrame(LwsFrame prevFrame, LwsFrame frame1, LwsFrame frame2, LwsFrame nextFrame, double u, double adj0, double adj1)
          Using hermite interpolation construct a new frame that's in-between two given frames.
LwsFrame(java.io.StreamTokenizer st)
          Constructor: parses and stores all data associated with a particular keyframe
 
Method Summary
(package private)  double computeInterpolation(double[] value, double dd0a, double dd0b, double ds1a, double ds1b, double adj0, double adj1, double h1, double h2, double h3, double h4)
           
(package private)  double getBank()
           
(package private)  double getFrameNum()
           
(package private)  double getHeading()
           
(package private)  double getPitch()
           
(package private)  Point3f getPosition()
           
(package private)  Point3f getScale()
           
(package private)  void printVals()
           
(package private)  void setMatrix(Matrix4d mat)
          Sets the given matrix to contain the position, orientation, and scale values for the keyframe
(package private)  void setRotationMatrix(Matrix4d mat)
          Sets the given matrix to contain the orientation for this keyframe
 
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

x

double x

y

double y

z

double z

heading

double heading

pitch

double pitch

bank

double bank

xScale

double xScale

yScale

double yScale

zScale

double zScale

frameNumber

double frameNumber

linearValue

int linearValue

tension

double tension

continuity

double continuity

bias

double bias
Constructor Detail

LwsFrame

LwsFrame(java.io.StreamTokenizer st)
Constructor: parses and stores all data associated with a particular keyframe


LwsFrame

LwsFrame(LwsFrame prevFrame,
         LwsFrame nextFrame,
         double ratio)
Construct new frame that's in-between two given frames Ratio gives the interpolation value for how far in-between the new frame should be (0.5 is half-way, etc)


LwsFrame

LwsFrame(LwsFrame prevFrame,
         LwsFrame frame1,
         LwsFrame frame2,
         LwsFrame nextFrame,
         double u,
         double adj0,
         double adj1)
Using hermite interpolation construct a new frame that's in-between two given frames. We also need to be given a frame before the first frame and a frame after the second frame. The calling function will make sure that we get the four appropriate frames. Ratio gives the interpolation value for how far in-between the new frame should be. (.5 is half-way, etc.)

Method Detail

computeInterpolation

double computeInterpolation(double[] value,
                            double dd0a,
                            double dd0b,
                            double ds1a,
                            double ds1b,
                            double adj0,
                            double adj1,
                            double h1,
                            double h2,
                            double h3,
                            double h4)

getHeading

double getHeading()

getPitch

double getPitch()

getBank

double getBank()

setMatrix

void setMatrix(Matrix4d mat)
Sets the given matrix to contain the position, orientation, and scale values for the keyframe


setRotationMatrix

void setRotationMatrix(Matrix4d mat)
Sets the given matrix to contain the orientation for this keyframe


getPosition

Point3f getPosition()

getScale

Point3f getScale()

getFrameNum

double getFrameNum()

printVals

void printVals()


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.