Class mil.navy.nps.javaViaScriptNode.EspduReadTransform
java.lang.Object
|
+----vrml.BaseNode
|
+----vrml.node.Script
|
+----mil.navy.nps.javaViaScriptNode.EspduReadTransform
- public class EspduReadTransform
- extends vrml.node.Script
- Version:
- 1.0
- Author:
- Don Brutzman (http://www.stl.nps.navy.mil/~brutzman)
- Location:
-
http://www.stl.nps.navy.mil/dis-java-vrml/mil/navy/nps/JavaViaScriptNode/EspduReadTransform.java
- Summary:
- PROTO providing DIS ESPDU interface for a VRML entity
- Explanation
- This Java class provides the interface between the EspduReadTransform Script node
in the VRML scene, and the DIS class library.
- History:
- 1Aug97 /Don Brutzman /New
- 5Feb98 /Don McGregor /changes for multiple entities, using SimulationManager
- 12Feb98 /Don Brutzman /changes for documentation templates + complements in documentation
- Associated VRML Files:
- EspduReadTransform.wrl (EXTERNPROTO)
- EspduReadTransformExample.wrl (Example Use)
- Unfinished business:
- Need to verify PDU identity and match that given in scene
- Need to verify Euler angle order & quaternion conversion
- Is there another callback alternative to trigger processEvent originating from DIS rather than VRML?
- Is VRML timeSensor processEvent trigger best? Likely so, since it ensures VRML scene redraw doesn't undergo starvation, and it also prevents "simultaneous" data access/modification of Transform node values by VRML browser/Java script.
- Exercise clock synchronization or relative local time? dead reckon interval dt is currently estimated by accumulating frame rate (redraw time) during each loop.
- Add algorithms for dead-reckoning and smoothing.
- See Also:
- EspduWriteTransform
Field Summary
|
static boolean
|
DEBUG
When DEBUG is true, System.out.println text messages trace the internals of script operation.
|
static mil.navy.nps.dis.SimulationManager
|
simulationManager
|
Fields inherited from class vrml.node.Script
|
loader |
Method Summary
|
void
|
addPDU(mil.navy.nps.dis.ProtocolDataUnit pPDU)
addPDU() is called by the simulation manager when a PDU for the node
arrives.
|
static void
|
debug(java.lang.String pDiagnostic)
Debugging output.
|
mil.navy.nps.dis.EntityID
|
getEntityIDObject()
gets the entity ID, which is the unique triplet that identifies the entity.
|
java.lang.String
|
getName()
|
void
|
initialize()
For a good initialize () discussion, see example 3.15, pp.
|
void
|
processEvent(vrml.Event event)
|
void
|
processEvents(int count,
vrml.Event[] events)
Ignore all but latest event so only one set of PDU network reads
and one set of dead-reckon calculations occur.
|
Methods inherited from class vrml.node.Script
|
, eventsProcessed, getEventIn, getEventOut, getField, initialize, main, mainloadClass, objectReady, processEvent, processEvents, shutdown, toString |
Methods inherited from class vrml.BaseNode
|
getBrowser, getType |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG
public static boolean DEBUG
- When DEBUG is true, System.out.println text messages trace the internals of script operation.
Text output appears in the Java Console (CosmoPlayer browser) or in the VRML console (WorldView browser)
simulationManager
public static mil.navy.nps.dis.SimulationManager simulationManager
EspduReadTransform
public EspduReadTransform()
debug
protected static void debug(java.lang.String pDiagnostic)
- Debugging output. Pass in a string, and it gets printed out on the console.
You can pass in strings such as "foo " + "bar"
getName
public java.lang.String getName()
initialize
public void initialize()
- For a good initialize () discussion, see example 3.15, pp. 95-97,
"Java for 3D and VRML Worlds," Lea/Matsuda/Miyashita, New Riders Press, 1996.
- Overrides:
- initialize in class vrml.node.Script
processEvents
public void processEvents(int count,
vrml.Event[] events)
- Ignore all but latest event so only one set of PDU network reads
and one set of dead-reckon calculations occur.
This allows frequent updating triggered by the script eventIn.
- Overrides:
- processEvents in class vrml.node.Script
addPDU
public void addPDU(mil.navy.nps.dis.ProtocolDataUnit pPDU)
- addPDU() is called by the simulation manager when a PDU for the node
arrives. The PDU is added to the list of PDUs that have already arrived,
and is later processed when processEvent() is called.
getEntityIDObject
public mil.navy.nps.dis.EntityID getEntityIDObject()
- gets the entity ID, which is the unique triplet that identifies the entity.
The triplet is (site, application, ID). This is set in the VRML node, and
retrieved for use here.
processEvent
public void processEvent(vrml.Event event)
- Overrides:
- processEvent in class vrml.node.Script