001: /*
002: * $RCSfile: J3dThreadData.java,v $
003: *
004: * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
005: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
006: *
007: * This code is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU General Public License version 2 only, as
009: * published by the Free Software Foundation. Sun designates this
010: * particular file as subject to the "Classpath" exception as provided
011: * by Sun in the LICENSE file that accompanied this code.
012: *
013: * This code is distributed in the hope that it will be useful, but WITHOUT
014: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
015: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
016: * version 2 for more details (a copy is included in the LICENSE file that
017: * accompanied this code).
018: *
019: * You should have received a copy of the GNU General Public License version
020: * 2 along with this work; if not, write to the Free Software Foundation,
021: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
022: *
023: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
024: * CA 95054 USA or visit www.sun.com if you need additional information or
025: * have any questions.
026: *
027: * $Revision: 1.5 $
028: * $Date: 2008/02/28 20:17:25 $
029: * $State: Exp $
030: */
031:
032: package javax.media.j3d;
033:
034: /**
035: * The J3dThreadData is the data wrapper for threads in Java 3D.
036: */
037:
038: class J3dThreadData extends Object {
039: /**
040: * Thread run options
041: */
042: static final int WAIT_ALL_THREADS = 0x01;
043: static final int CONT_THREAD = 0x02;
044: static final int WAIT_THIS_THREAD = 0x04;
045: static final int START_TIMER = 0x08;
046: static final int STOP_TIMER = 0x10;
047: static final int LAST_STOP_TIMER = 0x20;
048: //static final int LOCK_RENDERBIN = 0x20;
049: //static final int RELEASE_RENDERBIN = 0x40;
050:
051: /**
052: * The thread for this data
053: */
054: J3dThread thread = null;
055:
056: /**
057: * The last time that a message was sent to this thread.
058: */
059: long lastUpdateTime = -1;
060:
061: /**
062: * The last time that this thread was run
063: */
064: long lastRunTime = -1;
065:
066: /**
067: * The thread type
068: */
069: int threadType = 0;
070:
071: /**
072: * The run options for this thread.
073: */
074: int threadOpts = 0;
075:
076: /**
077: * The arguments to be passed to this thread
078: */
079: Object threadArgs = null;
080:
081: /**
082: * This indicates whether or not this thread needs to run.
083: */
084: boolean needsRun = false;
085:
086: /**
087: * The following data is only used by the Render Thread
088: */
089:
090: /**
091: * The type of the thread invocation. RENDER or SWAP
092: */
093: int type = 0;
094:
095: /**
096: * The view that this Render invocation belongs to.
097: */
098: View view = null;
099:
100: /**
101: * The Canvas3D that this Render invocation belongs to.
102: * It is null for the SWAP invocation.
103: */
104: Canvas3D canvas = null;
105:
106: /**
107: * This constructor does nothing
108: */
109: J3dThreadData() {
110: }
111: }
|