RENDER_IMMEDIATE 44 SOUND_STATE_CHANGED 45 ORIENTEDSHAPE3D_CHANGED (Net web server) 46 TEXTURE_UNIT_STATE_CHANGED 47
RENDER_IMMEDIATE 44 SOUND_STATE_CHANGED 45 ORIENTEDSHAPE3D_CHANGED 46 TEXTURE_UNIT_STATE_CHANGED 47 UPDATE_VIEWPLATFORM 48 BEHAVIOR_ACTIVATE 49 The type member refers to one of the predefined message types from the table. Each J3dMessagemaintains a reference count so that it can clear the references to its arguments when its reference count reaches zero. Messages with a reference count of zero are placed back into a list of free messages, for subsequent reuse. This message instance cache minimizes the number of message objects created by the Java 3D at runtime in an attempt to prevent excessive garbage collection. Interestingly this type of Object pooling is no longer favored as Sun s HotSpot compiler performs object pooling and reuse automatically. The MasterControlmethod getMessagewill either return a message from the free list if one is available or allocate a new J3dMessageinstance, which will get added to the free list once its reference count reaches zero. The J3dMessagealso maintains a reference to a Viewobject and contains a thread identifier (bit-field) that identifies the threads that should receive the message, as shown in table 18.6. Table 18.6 Java 3D Threads Identifier Java 3D Thread 0×1 BEHAVIOR_SCHEDULER 0×2 SOUND_SCHEDULER 0×4 INPUT_DEVICE_SCHEDULER 0×10 RENDER_THREAD 0×40 UPDATE_GEOMETRY 0×80 UPDATE_RENDER 0×100 UPDATE_BEHAVIOR 0×200 UPDATE_SOUND 0×400 UPDATE_RENDERING_ATTRIBUTES 0×1000 UPDATE_RENDERING_ENVIRONMENT 0×2000 UPDATE_TRANSFORM Java 3D Thread Name J3D-BehaviorScheduler-INSTANCE# J3D-SoundSchedulerUpdateThread-INSTANCE# J3D-InputDeviceScheduler-INSTANCE# J3D-Renderer-INSTANCE# J3D-GeometryStructureUpdateThread-INSTANCE# J3D-RenderStructureUpdateThread-INSTANCE# J3D-BehaviorStructureUpdateThread-INSTANCE# J3D-SoundStructureUpdateThread-INSTANCE# J3D-RenderingAttributesStructureUpdateThread J3D-RenderingEnvironmentStructureUpdateThread-INSTANCE# J3D-TransformStructureUpdateThread-INSTANCE# The sendMessagemethod updates appropriate message queue data structures based on the value of the thread identifier (table 18.7). Table 18.7 Target thread identifiers for messages Thread Identifier Effect UPDATE_RENDERING_ATTRIBUTES Appends the message to the global (across VirtualUniverses) RenderingAttributesStructure UPDATE_GEOMETRY Appends the message to the VirtualUniverses GeometryStructure UPDATE_TRANSFORM Appends the message to the VirtualUniverses 320
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.