Archive for November, 2007

Dedicated web hosting - 3. Renders the background geometry 4. Sets the

Monday, November 26th, 2007

3. Renders the background geometry 4. Sets the frustrum planes for rendering 5. Renders the opaque geometry 6. Renders the ordered geometry 7. Calls renderFieldon the Canvas3D 8. Renders the semitransparent geometry 9. Calls postRenderon the Canvas3D 10. Performs offscreen rendering
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

j3d.deviceSampleTime 0 Input device sampling time. (Web hosting account) j3d.debug False

Sunday, November 25th, 2007

j3d.deviceSampleTime 0 Input device sampling time. j3d.debug False Switch on Java 3D debug output. Currently only used by the MasterController. Javax.media.j3d.compileStats None Output scenegraph compilation statistics Javax.media.j3d.compileVerbose None Output verbose message when compiling scenegraph 18.4 BehaviorScheduler The BehaviorScheduleris responsible for activating all the Behaviorsregistered with a VirtualUniverse. For active and activated Behaviors, the processStimulusmethod is called on the Behavior. The BehaviorSchedulerintegrates tightly with the BehaviorStructureclass, which maintains lists of all the Behaviorsthat have been created for a VirtualUniverseinstance. The BehaviorStructurealso contains much of the logic to determine when a Behaviorhas been activated, whether due to an AWT event, BehaviorID being posted, Boundsintersection, Sensorcondition, or a Transform3Dchange. 18.5 InputDeviceScheduler The InputDeviceSchedulermaintains lists of nonblocking and blocking Java 3D InputDevices. It calls pollAndProcessInputon each nonblocking InputDevice. 18.6 Renderer Name: J3D-Renderer-INSTANCE# A Rendererinstance is created for each screen device that is to be rendered into. The Rendererinstances are kept in a static Hashtablein the Screen3Dclass. The Renderercalls into the Canvas3Dinstances (second JThreadDataargument) that are available for rendering. If a device supports swapping, there may be multiple Canvas3Dsin the second argument. Rendereruses the first argument, which is one of the GraphicsContext3Drendering commands (see table 18.9). The Rendererextracts the messages from the RendererStructureand calls methods on the GraphicsContext3Das appropriate. The complex RendererdoWorkmethod implements the main Java 3D rendering loop. It sets up the projection matrices, handles stereoscopic rendering, and performs the main rendering loop; specifically, it: 1. Clears the background using the background fill color 2. Calls preRenderon the Canvas3D 322
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

TransformStructure UPDATE_BEHAVIOR Appends the message to the VirtualUniverses

Saturday, November 24th, 2007

TransformStructure UPDATE_BEHAVIOR Appends the message to the VirtualUniverses BehaviorStructure UPDATE_SOUND Appends the message to the VirtualUniverses SoundStructure UPDATE_RENDERING_ENVIRONMENT Appends the message to the VirtualUniverses RenderingEnvironmentStructure SOUND_SCHEDULER Appends the message to the View s SoundScheduler (if a View is not specified, the message is added to the SoundScheduler for all registered Views) UPDATE_RENDER Appends the message to the View s RenderBin (if a View is not specified, the message is added to the RenderBin for all registered Views that are attached to the specified VirtualUniverse) 18.3.1 System properties read by Java 3D Java 3D reads a number of system properties, some documented and some internal. A list of these properties is also maintained on the J3D.ORG site at http://www.j3d.org/implementation/properties.html. Table 18.8 lists the system properties that are referenced in the Java code of the Java 3D distribution. Many more system properties are available which are specific to the OpenGL or DirectX versions of Java 3D. Please refer to the J3D.ORG website for the latest information on these properties. Table 18.8 Thread Group: System Name Default Purpose java.version None Check to see whether Java 3D is running under SDK 1.3 j3d.sharedctx False Use shared display contexts when rendering j3d.renderLock True Disable the render lock j3d.g2ddrawpixel True j3d.threadLimit Processors + 1 Number of concurrent threads that Java 3D can use. 321
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

TransformStructure UPDATE_BEHAVIOR Appends the message to the VirtualUniverses (Web file server)

Saturday, November 24th, 2007

TransformStructure UPDATE_BEHAVIOR Appends the message to the VirtualUniverses BehaviorStructure UPDATE_SOUND Appends the message to the VirtualUniverses SoundStructure UPDATE_RENDERING_ENVIRONMENT Appends the message to the VirtualUniverses RenderingEnvironmentStructure SOUND_SCHEDULER Appends the message to the View s SoundScheduler (if a View is not specified, the message is added to the SoundScheduler for all registered Views) UPDATE_RENDER Appends the message to the View s RenderBin (if a View is not specified, the message is added to the RenderBin for all registered Views that are attached to the specified VirtualUniverse) 18.3.1 System properties read by Java 3D Java 3D reads a number of system properties, some documented and some internal. A list of these properties is also maintained on the J3D.ORG site at http://www.j3d.org/implementation/properties.html. Table 18.8 lists the system properties that are referenced in the Java code of the Java 3D distribution. Many more system properties are available which are specific to the OpenGL or DirectX versions of Java 3D. Please refer to the J3D.ORG website for the latest information on these properties. Table 18.8 Thread Group: System Name Default Purpose java.version None Check to see whether Java 3D is running under SDK 1.3 j3d.sharedctx False Use shared display contexts when rendering j3d.renderLock True Disable the render lock j3d.g2ddrawpixel True j3d.threadLimit Processors + 1 Number of concurrent threads that Java 3D can use. 321
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

RENDER_IMMEDIATE 44 SOUND_STATE_CHANGED 45 ORIENTEDSHAPE3D_CHANGED (Net web server) 46 TEXTURE_UNIT_STATE_CHANGED 47

Saturday, November 24th, 2007

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.

Web site builder - REMOVE_NODES RUN TRANSFORM_CHANGED UPDATE_VIEW STOP_THREAD COLORINGATTRIBUTES_CHANGED LINEATTRIBUTES_CHANGED POINTATTRIBUTES_CHANGED

Friday, November 23rd, 2007

REMOVE_NODES RUN TRANSFORM_CHANGED UPDATE_VIEW STOP_THREAD COLORINGATTRIBUTES_CHANGED LINEATTRIBUTES_CHANGED POINTATTRIBUTES_CHANGED POLYGONATTRIBUTES_CHANGED RENDERINGATTRIBUTES_CHANGED TEXTUREATTRIBUTES_CHANGED TRANSPARENCYATTRIBUTES_CHANGED MATERIAL_CHANGED TEXCOORDGENERATION_CHANGED TEXTURE_CHANGED MORPH_CHANGED GEOMETRY_CHANGED APPEARANCE_CHANGED LIGHT_CHANGED BACKGROUND_CHANGED CLIP_CHANGED FOG_CHANGED BOUNDINGLEAF_CHANGED SHAPE3D_CHANGED TEXT3D_TRANSFORM_CHANGED TEXT3D_DATA_CHANGED SWITCH_CHANGED COND_MET BEHAVIOR_ENABLE BEHAVIOR_DISABLE INSERT_RENDERATOMS ORDERED_GROUP_INSERTED ORDERED_GROUP_REMOVED COLLISION_BOUND_CHANGED REGION_BOUND_CHANGED MODELCLIP_CHANGED BOUNDS_AUTO_COMPUTE_CHANGED SOUND_ATTRIB_CHANGED AURALATTRIBUTES_CHANGED SOUNDSCAPE_CHANGED ALTERNATEAPPEARANCE_CHANGED RENDER_OFFSCREEN RENDER_RETAINED 319
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

notify on the MasterControl thread. The other arguments

Friday, November 23rd, 2007

notify on the MasterControl thread. The other arguments are (in order): the array of State Work Threads, the array of Render Work Threads, and the array of Request Render Work Threads. As you can see in the following pseudocode, Java 3D has the ability to call the doWorkmethod on each worker thread directly. This enables Java 3D to perform the work of multiple threads within a single thread. For all Render Work Threads If the Thread needs to be run (J3dThreadData member), Check whether the View should be rendered based on its Minimum Frame Cycle Time Update the OrientatedShape3Ds in each View If specified lock the geometry from updates, If the CPU limit is 1, call the doWork method of the J3dThreadData s J3dThread directly Otherwise call the runMonitor method (NOTIFY) to notify the thread If specified release the lock on the geometry, If specified, grab the current time and put it into the View s RenderBin Next Rendering Thread If specified, wait for all Rendering threads to complete For all State Work Threads If the CPU limit is 1, call the doWork method of the J3dThreadData s J3dThread directly Otherwise call the runMonitor method (NOTIFY) to notify the thread Next State Thread If specified, wait for all State threads to complete For all Request Render Work Threads If the CPU limit is 1, call the doWork method of the J3dThreadData s J3dThread directly Otherwise call the runMonitor method (NOTIFY) to notify the thread Next State Thread If specified, wait for all State threads to complete Update the View Frame Timing Values Update all the Mirror Objects registered with the MasterControl Wait for Request Rendering to complete Update the frame timestamps for each rendered View J3dMessage Java 3D communicates between its various worker threads using a message dispatch mechanism. Messages are instances of the J3dMessageclass. Each message contains an identifier and a target VirtualUniverseas well as up to five parameters for the message (generic Objects). Certainly not the most OO of designs in fact it reminds me of the WPARAM and LPARAM attributes on the MESSAGE structure used to propagate messages under Windows. The message identifiers are defined in table 18.5. Table 18.5 Message identifiers Message Identifier INSERT_NODES 0 318
Check Tomcat Web Hosting services for best quality webspace to host your web application.

Each UnorderListmember contains an array of J3dThreadDataobjects, containing (Free web servers)

Thursday, November 22nd, 2007

Each UnorderListmember contains an array of J3dThreadDataobjects, containing a J3dThread member and additional scheduling information. The MasterControl.doWorkmethod (invoked by the MasterControlThread.runmethod) runs in two phases. The first phase checks for any pending messages to be executed and returns if there is nothing to execute. The second phase runs the threads under the control of the MasterControlclass. void doWork() { runMonitor( CHECK_FOR_WORK, null, null, null, null); if(pendingRequest) handlePendingRequest(); if(!running) return; if(threadListsChanged) updateWorkThreads(); updateTimeValues(); View aview[] = (View[])views.toArray(false); for(int i = views.size() - 1; i >= 0; i–) if(aview[i].active) aview[i].updateViewCache(); runMonitor( RUN_THREADS, stateWorkThreads, renderWorkThreads, requestRenderWorkThreads, null); if(renderOnceList.size() > 0) clearRenderOnceList(); } The actual runMonitormethod is fairly complex, and it seems to perform the four functions shown in table 18.4, depending on the value of the first argument. Table 18.4 runMonitor Identifier Index Purpose CHECK_FOR_WORK 0 Evaluates each thread and set the MasterControlThread to wait if none of the threads needs to be processed. SET_WORK 1 Calls notify() on the MasterControlThread. RUN_THREADS 2 Iterates through all the J3dThreadData under the control of the MasterControl. The notify() method is called on each thread associated with each J3dThreadData object. SET_WORK_FOR_REQUEST_RENDERER 5 Sets the requestRenderWorkToDo member to true and calls 317
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

My web site - VirtualUniverse.mc.doWork(); Thread.yield(); } while(!VirtualUniverse.mc.mcThreadDone()); } } The constructor

Thursday, November 22nd, 2007

VirtualUniverse.mc.doWork(); Thread.yield(); } while(!VirtualUniverse.mc.mcThreadDone()); } } The constructor for the MasterControlclass loads the J3D.DLL native DLL and reads the Java 3D system properties (see table 18.4). Message processing and threading architecture The MasterControlclass is a message exchange mechanism between the various subsystems that compose the Java 3D runtime. The MasterControlthread maintains five UnorderListmembers, each containing Java 3D worker threads. stateWorkThreads: RenderingAttributesStructurecalls updateMirrorObjecton the NodeComponentRetainedpassed with the message. GeometryStructuremaintains a binary hash tree of GeometryAtomobjects and Groups. Maintains the wakeupOnCollisionEntry, Exit, and Movementlists. BehaviorStructuremaintains a list of behaviors and marks them for activation. RenderingEnvironmentStructuremaintains a list of the lights, fog, alternate appearances, clipping regions, and backgrounds to be used for each RenderAtom. SoundStructuremaintains a list of sounds and soundscapes and schedules them for activation with the View s SoundScheduler. BehaviorScheduler, for all VirtualUniverseinstances, maintains a list of BillBoardbehaviors and behaviors in the system and calls the processStimulusmethod on each if marked for activation. Inputdeviceschedulermaintains lists of nonblocking and blocking input devices and calls the pollAndProcessInputmethod on the nonblocking devices. A new thread is created to handle the input from each blocking InputDevice. RenderBin, for each View, maintains lists of RenderAtomsthat describe rendering operations to be performed. The RenderBinimplements methods such as renderOpaque, renderBackground, renderOrdered, and renderTransparent, which are called by the Renderclass. SoundScheduler, for each View, maintains a list of SoundSchedulerAtomsand marks each for activation. The rendermethod iterates the scheduled SoundSchedulerAtomsand calls the startmethod on each. renderWorkThreads: Rendererfor each Canvas3D s Screen3D. The Renderclass runs the main Java 3D rendering loop by calling methods on the Canvas3Dclass and processing the RenderBinfor the Canvas3D s View. requestRenderWorkThreads: Rendererfor each Screen3Din the device render map. renderThreadData: Rendererfor each Screen3Dfor each View, including offscreen Renderers. inputDeviceThreads: A single Inputdevicescheduler. 316
We recommend high quality webhost to host and run your jsp application: christian web host services.

Figure 18.1 Native (Windows) threads running (Web hosting control panel) a Java

Wednesday, November 21st, 2007

Figure 18.1 Native (Windows) threads running a Java 3D application Master Root Thread Group Name: Java3D Thread Name: J3D-MasterControl class MasterControlThread extends Thread { MasterControlThread(ThreadGroup threadgroup) { super(threadgroup, “J3D-MasterControl”); VirtualUniverse.mc.createMCThreads(); start(); } public void run() { do while(VirtualUniverse.mc.running) { 315
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.