javax.media.j3d
Class BehaviorScheduler

java.lang.Object
  extended by java.lang.Thread
      extended by javax.media.j3d.J3dThread
          extended by javax.media.j3d.BehaviorScheduler
All Implemented Interfaces:
java.lang.Runnable

 class BehaviorScheduler
extends J3dThread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  BehaviorStructure behaviorStructure
           
private  int instanceNum
           
(package private)  java.lang.Object intervalTimeLock
           
(package private)  long lastStartTime
          These are used for start/stop BehaviorScheduler
(package private)  long lastStopTime
           
private static int numInstances
          Some variables used to name threads correctly
(package private)  UnorderList[] processList
           
(package private)  IndexedUnorderSet scheduleList
           
(package private)  int stopCount
           
(package private)  VirtualUniverse univ
          The virtual universe that owns this BehaviorScheduler
 
Fields inherited from class javax.media.j3d.J3dThread
active, args, BEHAVIOR_SCHEDULER, classification, INPUT_DEVICE_SCHEDULER, lastWaitTimestamp, NOTIFY, NOTIFY_AND_WAIT, referenceTime, RENDER_THREAD, RUN, SOUND_SCHEDULER, STOP, type, UPDATE_BEHAVIOR, UPDATE_GEOMETRY, UPDATE_RENDER, UPDATE_RENDERING_ATTRIBUTES, UPDATE_RENDERING_ENVIRONMENT, UPDATE_SOUND, UPDATE_THREAD, UPDATE_TRANSFORM, userStop, WAIT, WORK_THREAD
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
BehaviorScheduler(java.lang.ThreadGroup t, VirtualUniverse universe)
           
 
Method Summary
(package private)  void deactivate()
           
(package private)  void doWork(long referenceTime)
          The main loop for the Behavior Scheduler.
(package private)  void free()
           
(package private)  int getInstanceNum()
           
private  int newInstanceNum()
           
(package private)  void startBehaviorScheduler()
           
(package private)  void stopBehaviorScheduler(long[] intervalTime)
           
 
Methods inherited from class javax.media.j3d.J3dThread
cleanup, cleanupView, finish, getThreadData, initialize, run, runMonitor, shutdown
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

univ

VirtualUniverse univ
The virtual universe that owns this BehaviorScheduler


processList

UnorderList[] processList

scheduleList

IndexedUnorderSet scheduleList

behaviorStructure

BehaviorStructure behaviorStructure

stopCount

int stopCount

lastStartTime

long lastStartTime
These are used for start/stop BehaviorScheduler


lastStopTime

long lastStopTime

intervalTimeLock

java.lang.Object intervalTimeLock

numInstances

private static int numInstances
Some variables used to name threads correctly


instanceNum

private int instanceNum
Constructor Detail

BehaviorScheduler

BehaviorScheduler(java.lang.ThreadGroup t,
                  VirtualUniverse universe)
Method Detail

newInstanceNum

private int newInstanceNum()

getInstanceNum

int getInstanceNum()
Overrides:
getInstanceNum in class J3dThread

stopBehaviorScheduler

void stopBehaviorScheduler(long[] intervalTime)

startBehaviorScheduler

void startBehaviorScheduler()

deactivate

void deactivate()

doWork

void doWork(long referenceTime)
The main loop for the Behavior Scheduler. Main method for firing off vector of satisfied conditions that are contained in the condMet vector. Method is synchronized because it is modifying the current wakeup vectors in the clean (emptying out satisfied conditions) and processStimulus (adding conditions again if wakeupOn called) calls.

Specified by:
doWork in class J3dThread

free

void free()


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