com.sun.j3d.loaders.lw3d
Class LwsCamera

java.lang.Object
  extended by com.sun.j3d.loaders.lw3d.TextfileParser
      extended by com.sun.j3d.loaders.lw3d.LwsCamera
All Implemented Interfaces:
LwsPrimitive

 class LwsCamera
extends TextfileParser
implements LwsPrimitive

This class parses the data in a Scene file related to the camera and creates Java3D TransformGroup that holds the data for positioning and orienting the view according to the camera specifications.


Field Summary
(package private)  java.lang.String fileName
           
(package private)  LwsMotion motion
           
(package private)  java.util.Vector objectBehavior
           
(package private)  TransformGroup objectTransform
           
(package private)  java.lang.String objName
           
(package private)  int parent
           
 
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
LwsCamera(java.io.StreamTokenizer st, int firstFrame, int totalFrames, float totalTime, int debugVals)
          Constructor: parses camera info and creates LwsMotion object for keyframe data
 
Method Summary
(package private)  void createJava3dObject(int loadBehaviors)
          Creates Java3D items from the camera data.
 java.util.Vector getObjectBehaviors()
          Returns animation behaviors for camera
 TransformGroup getObjectNode()
          Returns TransformGroup of camera
(package private)  int getParent()
          Returns parent of the camera object
(package private)  void printVals()
          This is a debuggin utility, not currently activated.
 
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

fileName

java.lang.String fileName

objName

java.lang.String objName

motion

LwsMotion motion

parent

int parent

objectTransform

TransformGroup objectTransform

objectBehavior

java.util.Vector objectBehavior
Constructor Detail

LwsCamera

LwsCamera(java.io.StreamTokenizer st,
          int firstFrame,
          int totalFrames,
          float totalTime,
          int debugVals)
    throws ParsingErrorException
Constructor: parses camera info and creates LwsMotion object for keyframe data

Throws:
ParsingErrorException
Method Detail

getParent

int getParent()
Returns parent of the camera object


createJava3dObject

void createJava3dObject(int loadBehaviors)
Creates Java3D items from the camera data. These objects consist of: a TransformGroup to hold the view platform, and the behaviors (if any) that act upon the view's TransformGroup.


getObjectNode

public TransformGroup getObjectNode()
Returns TransformGroup of camera

Specified by:
getObjectNode in interface LwsPrimitive

getObjectBehaviors

public java.util.Vector getObjectBehaviors()
Returns animation behaviors for camera

Specified by:
getObjectBehaviors in interface LwsPrimitive

printVals

void printVals()
This is a debuggin utility, not currently activated. It prints out the camera values



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