abstract class J3dThread
extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
active
This indicates that this thread has been activated by MC
|
(package private) java.lang.Object[] |
args
The arguments passed in for this thread
|
(package private) static int |
BEHAVIOR_SCHEDULER
These are the thread types that a message may affect
|
(package private) int |
classification
The classification of this thread.
|
private J3dThreadData[] |
data
The thread data for this thread
|
(package private) static int |
INPUT_DEVICE_SCHEDULER |
private int |
instanceNum |
(package private) long |
lastWaitTimestamp
Use to assign threadOpts WAIT_ALL_THREADS
|
(package private) static int |
NOTIFY
This is used by Canvas3D Renderer to notify user thread
that swap is completed.
|
(package private) static int |
NOTIFY_AND_WAIT
This runMonitor action notifies MasterControl that this thread
has completed and wait.
|
private static int |
numInstances
Some variables used to name threads correctly
|
private boolean |
ready
This flag is set by the RUN action of runMonitor to indicate that the
waiting thread has work to do.
|
(package private) long |
referenceTime
The time values passed into this thread
|
(package private) static int |
RENDER_THREAD |
(package private) static int |
RUN
This runMonitor action tells the thread to run N number of
iterations.
|
private boolean |
running
This indicates that this thread is alive and running
|
(package private) static int |
SOUND_SCHEDULER |
private boolean |
started
This indicates that this thread is started and able to accept work
|
(package private) static int |
STOP
This runMonitor action tells the thread to stop running
|
(package private) int |
type
The type of this thread.
|
(package private) static int |
UPDATE_BEHAVIOR |
(package private) static int |
UPDATE_GEOMETRY |
(package private) static int |
UPDATE_RENDER |
(package private) static int |
UPDATE_RENDERING_ATTRIBUTES |
(package private) static int |
UPDATE_RENDERING_ENVIRONMENT |
(package private) static int |
UPDATE_SOUND |
(package private) static int |
UPDATE_THREAD |
(package private) static int |
UPDATE_TRANSFORM |
(package private) boolean |
userStop
Flag to indicate that user initiate a thread stop
|
(package private) static int |
WAIT
This runMonitor action puts the thread into an initial wait state
|
private boolean |
waiting
Flag to indicate that this thread is waiting to be notify
|
(package private) static int |
WORK_THREAD
The classification types.
|
| Constructor and Description |
|---|
J3dThread(java.lang.ThreadGroup t)
This constructor simply assigns the given id.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
cleanup() |
(package private) void |
cleanupView() |
(package private) abstract void |
doWork(long referenceTime)
This method is defined by all slave threads to implement
one iteration of work.
|
(package private) void |
finish()
This causes the threads run method to exit.
|
(package private) int |
getInstanceNum() |
(package private) J3dThreadData |
getThreadData(View v,
Canvas3D c)
This returns the thread data for this thread.
|
(package private) void |
initialize()
This initializes this thread.
|
private int |
newInstanceNum() |
void |
run()
This thread controls the syncing of all the canvases attached to
this view.
|
(package private) void |
runMonitor(int action,
long referenceTime,
java.lang.Object[] args) |
(package private) void |
shutdown() |
activeCount, checkAccess, clone, 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, yieldstatic final int BEHAVIOR_SCHEDULER
static final int SOUND_SCHEDULER
static final int INPUT_DEVICE_SCHEDULER
static final int RENDER_THREAD
static final int UPDATE_GEOMETRY
static final int UPDATE_RENDER
static final int UPDATE_BEHAVIOR
static final int UPDATE_SOUND
static final int UPDATE_RENDERING_ATTRIBUTES
static final int UPDATE_RENDERING_ENVIRONMENT
static final int UPDATE_TRANSFORM
static final int WORK_THREAD
static final int UPDATE_THREAD
static final int WAIT
static final int NOTIFY_AND_WAIT
static final int NOTIFY
static final int RUN
static final int STOP
boolean active
private volatile boolean running
private volatile boolean ready
private J3dThreadData[] data
private volatile boolean started
long referenceTime
long lastWaitTimestamp
int type
int classification
java.lang.Object[] args
volatile boolean userStop
private volatile boolean waiting
private static int numInstances
private int instanceNum
J3dThread(java.lang.ThreadGroup t)
private int newInstanceNum()
int getInstanceNum()
abstract void doWork(long referenceTime)
J3dThreadData getThreadData(View v, Canvas3D c)
void initialize()
void finish()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadvoid runMonitor(int action,
long referenceTime,
java.lang.Object[] args)
void cleanupView()
void shutdown()
void cleanup()
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.