Java Doc for Viewer.java in  » 6.0-JDK-Modules » java-3d » com » sun » j3d » utils » universe » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » com.sun.j3d.utils.universe 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.j3d.utils.universe.Viewer

Viewer
public class Viewer (Code)
The Viewer class holds all the information that describes the physical and virtual "presence" in the Java 3D universe. The Viewer object consists of:
  • Physical Objects
    • Canvas3D's - used to render with.
    • PhysicalEnvironment - holds characteristics of the hardware platform being used to render on.
    • PhysicalBody - holds the physical characteristics and personal preferences of the person who will be viewing the Java 3D universe.
  • Virtual Objects
    • View - the Java 3D View object.
    • ViewerAvatar - the geometry that is used by Java 3D to represent the person viewing the Java 3D universe.
If the Viewer object is created without any Canvas3D's, or indirectly through a configuration file, it will create the Canvas3D's as needed. The default Viewer creates one Canvas3D. If the Viewer object creates the Canvas3D's, it will also create a JPanel and JFrame for each Canvas3D. Dynamic video resize is a new feature in Java 3D 1.3.1. This feature provides a means for doing swap synchronous resizing of the area that is to be magnified (or passed through) to the output video resolution. This functionality allows an application to draw into a smaller viewport in the framebuffer in order to reduce the time spent doing pixel fill. The reduced size viewport is then magnified up to the video output resolution using the SUN_video_resize extension. This extension is only implemented in XVR-4000 and later hardware with back end video out resizing capability. If video size compensation is enable, the line widths, point sizes and pixel operations will be scaled internally with the resize factor to approximately compensate for video resizing. The location of the pixel ( x, y ) in the resized framebuffer = ( floor( x * factor + 0.5 ), floor( y * factor + 0.5 ) )


See Also:   Canvas3D
See Also:   PhysicalEnvironment
See Also:   PhysicalBody
See Also:   View
See Also:   ViewerAvatar



Field Summary
static  HashMapviewerMap
    

Constructor Summary
public  Viewer()
     Creates a default viewer object.
public  Viewer(Canvas3D userCanvas)
     Creates a default viewer object.
public  Viewer(Canvas3D[] userCanvases)
     Creates a default viewer object.
public  Viewer(Canvas3D[] userCanvases, PhysicalBody userBody, PhysicalEnvironment userEnvironment, boolean setVisible)
     Creates a viewer object.
public  Viewer(URL userConfig)
     Creates a default Viewer object.
public  Viewer(Canvas3D userCanvas, URL userConfig)
     Creates a default viewer object.
 Viewer(ConfigScreen[] cs, ConfigView cv, boolean setVisible)
     Package-scoped constructor to create a Viewer from the configuration objects provided by ConfiguredUniverse.

Method Summary
 voidaddWindowCloseListener(Window win)
    
public static  voidclearViewerMap()
     Removes all Viewer mappings from the Viewer map.
public  AudioDevicecreateAudioDevice()
     Used to create and initialize a default AudioDevice3D used for sound rendering.
public  ViewerAvatargetAvatar()
     Gets the geometry associated with the viewer's avatar.
public  Canvas3DgetCanvas3D()
    
public  Canvas3DgetCanvas3D(int canvasNum)
     Returns the Canvas3D object at the specified index associated with this Viewer object.
public  Canvas3D[]getCanvas3Ds()
     Returns all the Canvas3D objects associated with this Viewer object.
public  Canvas3DgetCanvases()
     Returns the canvas associated with this Viewer object.
public  floatgetDvrFactor()
     Retrieves the dynamic video resize factor of this viewer.
public  booleangetDvrResizeCompensationEnable()
     Returns a status flag indicating whether or not dynamic video resize compensation is enabled.
public  FramegetFrame()
     This method is no longer supported since Java 3D 1.3.
public  JFramegetJFrame(int frameNum)
     Returns the JFrame object created by this Viewer object at the specified index.
public  JFrame[]getJFrames()
     Returns all the JFrames created by this Viewer object.
public  JPanelgetJPanel(int panelNum)
     Returns the JPanel object created by this Viewer object at the specified index.
public  JPanel[]getJPanels()
     Returns all the JPanel objects created by this Viewer object.
public  PanelgetPanel()
     This method is no longer supported since Java 3D 1.3.
public  PhysicalBodygetPhysicalBody()
     Returns the PhysicalBody object associated with the Viewer object.
public  PhysicalEnvironmentgetPhysicalEnvironment()
     Returns the PhysicalEnvironment object associated with the Viewer object.
public  SimpleUniversegetUniverse()
    
public  ViewgetView()
     Returns the View object associated with the Viewer object.
public static  ViewergetViewer(View view)
     Get the Viewer associated with the view object.
Parameters:
  view - The View object for inquiry.
public  ViewingPlatformgetViewingPlatform()
     Get the ViewingPlatform object used by this Viewer. The ViewingPlatform object used by thisViewer object.
public  booleanisDvrEnabled()
     Returns a status flag indicating whether or not dynamic video size is enabled.
public static  ViewerremoveViewerMapEntry(View view)
     Removes the entry associated with the view object.
Parameters:
  view - The View object to be removed.
public  voidsetAvatar(ViewerAvatar avatar)
     Sets the geometry to be associated with the viewer's avatar.
public  voidsetDvrEnable(boolean dvr)
     Turns on or off dynamic video size.
public  voidsetDvrFactor(float dvr)
     Set the dynamic video resize factor for this viewer.
public  voidsetDvrResizeCompensationEnable(boolean dvrRCE)
     Turns on or off dynamic video resize compensation.
public  voidsetViewingPlatform(ViewingPlatform platform)
     Set the ViewingPlatform object used by this Viewer.
Parameters:
  platform - The ViewingPlatform object to set for thisViewer object.
public  voidsetVisible(boolean visible)
     Call setVisible() on all Window components created by this Viewer.

Field Detail
viewerMap
static HashMap viewerMap(Code)




Constructor Detail
Viewer
public Viewer()(Code)
Creates a default viewer object. The default values are used to create the PhysicalBody and PhysicalEnvironment. A single RGB, double buffered and depth buffered Canvas3D object is created. The View is created with a front clip distance of 0.1f and a back clip distance of 10.0f.



Viewer
public Viewer(Canvas3D userCanvas)(Code)
Creates a default viewer object. The default values are used to create the PhysicalBody and PhysicalEnvironment. The View is created with a front clip distance of 0.1f and a back clip distance of 10.0f.
Parameters:
  userCanvas - the Canvas3D object to be used for rendering;if this is null then a single RGB, double buffered and depth bufferedCanvas3D object is created
since:
   Java3D 1.1



Viewer
public Viewer(Canvas3D[] userCanvases)(Code)
Creates a default viewer object. The default values are used to create the PhysicalBody and PhysicalEnvironment. The View is created with a front clip distance of 0.1f and a back clip distance of 10.0f.
Parameters:
  userCanvases - the Canvas3D objects to be used for rendering;if this is null then a single RGB, double buffered and depth bufferedCanvas3D object is created
since:
   Java3D 1.3



Viewer
public Viewer(Canvas3D[] userCanvases, PhysicalBody userBody, PhysicalEnvironment userEnvironment, boolean setVisible)(Code)
Creates a viewer object. The Canvas3D objects, PhysicalEnvironment, and PhysicalBody are taken from the arguments.
Parameters:
  userCanvases - the Canvas3D objects to be used for rendering;if this is null then a single RGB, double buffered and depth bufferedCanvas3D object is created
Parameters:
  userBody - the PhysicalBody to use for this Viewer; if it isnull, a default PhysicalBody object is created
Parameters:
  userEnvironment - the PhysicalEnvironment to use for this Viewer;if it is null, a default PhysicalEnvironment object is created
Parameters:
  setVisible - determines if the Frames should be set to visible once created
since:
   Java3D 1.3



Viewer
public Viewer(URL userConfig)(Code)
Creates a default Viewer object. The default values are used to create the PhysicalEnvironment and PhysicalBody. A single RGB, double buffered and depth buffered Canvas3D object is created. The View is created with a front clip distance of 0.1f and a back clip distance of 10.0f.
Parameters:
  userConfig - the URL of the user configuration file used toinitialize the PhysicalBody object; this is always ignored
since:
   Java3D 1.1



Viewer
public Viewer(Canvas3D userCanvas, URL userConfig)(Code)
Creates a default viewer object. The default values are used to create the PhysicalEnvironment and PhysicalBody. The View is created with a front clip distance of 0.1f and a back clip distance of 10.0f.
Parameters:
  userCanvas - the Canvas3D object to be used for rendering;if this is null then a single RGB, double buffered and depth bufferedCanvas3D object is created
Parameters:
  userConfig - the URL of the user configuration file used toinitialize the PhysicalBody object; this is always ignored
since:
   Java3D 1.1



Viewer
Viewer(ConfigScreen[] cs, ConfigView cv, boolean setVisible)(Code)
Package-scoped constructor to create a Viewer from the configuration objects provided by ConfiguredUniverse.
Parameters:
  cs - array of ConfigScreen objects containing configurationinformation for the physical screens in the environment
Parameters:
  cv - ConfigView object containing configuration information aboutthe view to be created using the given screens
Parameters:
  setVisible - if true, call setVisible(true) on all created Windowcomponents; otherwise, they remain invisible




Method Detail
addWindowCloseListener
void addWindowCloseListener(Window win)(Code)



clearViewerMap
public static void clearViewerMap()(Code)
Removes all Viewer mappings from the Viewer map. Note: This method is targeted for SUN framebuffer XVR-4000 and later hardware that support video size extension.
since:
   Java 3D 1.3.1



createAudioDevice
public AudioDevice createAudioDevice()(Code)
Used to create and initialize a default AudioDevice3D used for sound rendering. reference to created AudioDevice, or null if error occurs.



getAvatar
public ViewerAvatar getAvatar()(Code)
Gets the geometry associated with the viewer's avatar. The avatar is the geometry used to represent the viewer in the virtual world. The root of the scene graph that is used to represent theviewer's avatar.



getCanvas3D
public Canvas3D getCanvas3D()(Code)
Returns the 0th Canvas3D object associated with this Viewer object a reference to the 0th Canvas3D object associated with thisViewer object
since:
   Java3D 1.3



getCanvas3D
public Canvas3D getCanvas3D(int canvasNum)(Code)
Returns the Canvas3D object at the specified index associated with this Viewer object.
Parameters:
  canvasNum - the index of the Canvas3D object to retrieve;if there is no Canvas3D object for the given index, null is returned a reference to a Canvas3D object associated with thisViewer object
since:
   Java3D 1.3



getCanvas3Ds
public Canvas3D[] getCanvas3Ds()(Code)
Returns all the Canvas3D objects associated with this Viewer object. an array of references to the Canvas3D objects associated withthis Viewer object
since:
   Java3D 1.3



getCanvases
public Canvas3D getCanvases()(Code)
Returns the canvas associated with this Viewer object.



getDvrFactor
public float getDvrFactor()(Code)
Retrieves the dynamic video resize factor of this viewer. Note: This method is targeted for SUN framebuffer XVR-4000 and later hardware that support video size extension.
since:
   Java 3D 1.3.1



getDvrResizeCompensationEnable
public boolean getDvrResizeCompensationEnable()(Code)
Returns a status flag indicating whether or not dynamic video resize compensation is enabled. Note: This method is targeted for SUN framebuffer XVR-4000 and later hardware that support video size extension.
since:
   Java 3D 1.3.1



getFrame
public Frame getFrame()(Code)
This method is no longer supported since Java 3D 1.3.
exception:
  UnsupportedOperationException - if called.



getJFrame
public JFrame getJFrame(int frameNum)(Code)
Returns the JFrame object created by this Viewer object at the specified index. If a Viewer is constructed without any Canvas3D objects then the Viewer object will create a Canva3D object, a JPanel containing the Canvas3D object, and a JFrame to place the JPanel in.

NOTE: When running under JDK 1.4 or newer, the JFrame always directly contains the JPanel which contains the Canvas3D. When running under JDK 1.3.1 and creating a borderless full screen through a configuration file, the JFrame will instead contain a JWindow which will contain the JPanel and Canvas3D.


Parameters:
  frameNum - the index of the JFrame object to retrieve;if there is no JFrame object for the given index, null is returned a reference to JFrame object created by this Viewer object
since:
   Java3D 1.3




getJFrames
public JFrame[] getJFrames()(Code)
Returns all the JFrames created by this Viewer object. If a Viewer is constructed without any Canvas3D objects then the Viewer object will create a Canva3D object, a JPanel containing the Canvas3D object, and a JFrame to place the JPanel in.

NOTE: When running under JDK 1.4 or newer, the JFrame always directly contains the JPanel which contains the Canvas3D. When running under JDK 1.3.1 and creating a borderless full screen through a configuration file, the JFrame will instead contain a JWindow which will contain the JPanel and Canvas3D.

an array of references to the JFrame objects created bythis Viewer object, or null if no JFrame objects were created
since:
   Java3D 1.3




getJPanel
public JPanel getJPanel(int panelNum)(Code)
Returns the JPanel object created by this Viewer object at the specified index. If a Viewer is constructed without any Canvas3D objects then the Viewer object will create a Canva3D object and a JPanel into which to place the Canvas3D object.
Parameters:
  panelNum - the index of the JPanel object to retrieve;if there is no JPanel object for the given index, null is returned a reference to a JPanel object created by this Viewer object
since:
   Java3D 1.3



getJPanels
public JPanel[] getJPanels()(Code)
Returns all the JPanel objects created by this Viewer object. If a Viewer is constructed without any Canvas3D objects then the Viewer object will create a Canva3D object and a JPanel into which to place the Canvas3D object. an array of references to the JPanel objects created bythis Viewer object, or null or no JPanel objects were created
since:
   Java3D 1.3



getPanel
public Panel getPanel()(Code)
This method is no longer supported since Java 3D 1.3.
exception:
  UnsupportedOperationException - if called.



getPhysicalBody
public PhysicalBody getPhysicalBody()(Code)
Returns the PhysicalBody object associated with the Viewer object. A reference to the PhysicalBody object.



getPhysicalEnvironment
public PhysicalEnvironment getPhysicalEnvironment()(Code)
Returns the PhysicalEnvironment object associated with the Viewer object. A reference to the PhysicalEnvironment object.



getUniverse
public SimpleUniverse getUniverse()(Code)
Returns the Universe to which this Viewer is attached the Universe to which this Viewer is attached
since:
   Java 3D 1.3



getView
public View getView()(Code)
Returns the View object associated with the Viewer object. The View object of this Viewer.



getViewer
public static Viewer getViewer(View view)(Code)
Get the Viewer associated with the view object.
Parameters:
  view - The View object for inquiry. The Viewer object associated with this View object. Note: This method is targeted for SUN framebuffer XVR-4000 and later hardware that support video size extension.
since:
   Java 3D 1.3.1



getViewingPlatform
public ViewingPlatform getViewingPlatform()(Code)
Get the ViewingPlatform object used by this Viewer. The ViewingPlatform object used by thisViewer object.



isDvrEnabled
public boolean isDvrEnabled()(Code)
Returns a status flag indicating whether or not dynamic video size is enabled. Note: This method is targeted for SUN framebuffer XVR-4000 and later hardware that support video size extension.
since:
   Java 3D 1.3.1



removeViewerMapEntry
public static Viewer removeViewerMapEntry(View view)(Code)
Removes the entry associated with the view object.
Parameters:
  view - The View object to be removed. The Viewer object associated with this View object. Note: This method is targeted for SUN framebuffer XVR-4000 and later hardware that support video size extension.
since:
   Java 3D 1.3.1



setAvatar
public void setAvatar(ViewerAvatar avatar)(Code)
Sets the geometry to be associated with the viewer's avatar. The avatar is the geometry used to represent the viewer in the virtual world.
Parameters:
  avatar - The geometry to associate with this Viewer object.Passing in null will cause any geometry associated with the Viewerto be removed from the scen graph.



setDvrEnable
public void setDvrEnable(boolean dvr)(Code)
Turns on or off dynamic video size. Note: This method is targeted for SUN framebuffer XVR-4000 and later hardware that support video size extension.
Parameters:
  dvr - enables or disables dynamic video size.
since:
   Java 3D 1.3.1



setDvrFactor
public void setDvrFactor(float dvr)(Code)
Set the dynamic video resize factor for this viewer. Note: This method is targeted for SUN framebuffer XVR-4000 and later hardware that support video size extension.
Parameters:
  dvr - set the dynamic video resize factor for this viewer.
since:
   Java 3D 1.3.1



setDvrResizeCompensationEnable
public void setDvrResizeCompensationEnable(boolean dvrRCE)(Code)
Turns on or off dynamic video resize compensation. Note: This method is targeted for SUN framebuffer XVR-4000 and later hardware that support video size extension.
Parameters:
  dvrRCE - enables or disables dynamic video resize compensation.
since:
   Java 3D 1.3.1



setViewingPlatform
public void setViewingPlatform(ViewingPlatform platform)(Code)
Set the ViewingPlatform object used by this Viewer.
Parameters:
  platform - The ViewingPlatform object to set for thisViewer object. Use null to unset the current value andnot assign assign a new ViewingPlatform object.



setVisible
public void setVisible(boolean visible)(Code)
Call setVisible() on all Window components created by this Viewer.
Parameters:
  visible - boolean to be passed to the setVisible() calls on theWindow components created by this Viewer
since:
   Java3D 1.3



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.