Java Doc for GraphicsContext3D.java in  » 6.0-JDK-Modules » java-3d » javax » media » j3d » 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 » javax.media.j3d 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.j3d.GraphicsContext3D

GraphicsContext3D
public class GraphicsContext3D extends Object (Code)
A GraphicsContext3D object is used for immediate mode rendering into a 3D canvas. It is created by, and associated with, a specific Canvas3D object. A GraphicsContext3D defines methods to set 3D graphics state and draw 3D geometric primitives. There are no public constructors of GraphicsContext3D. An application obtains a 3D graphics context object from the Canvas3D object that the application wishes to render into by using the getGraphicsContext3D method. A new graphics context is created if one does not already exist. A new GraphicsContext3D initializes its state variables to the following defaults:
  • Background object: null
  • Fog object: null
  • ModelClip object: null
  • Appearance object: null
  • List of Light objects: empty
  • high-res coordinate: (0, 0, 0)
  • modelTransform: identity
  • AuralAttributes object: null
  • List of Sound objects: empty
  • buffer override: false
  • front buffer rendering: false
  • stereo mode: STEREO_BOTH

Note that the drawing methods in this class are not necessarily executed immediately. They may be buffered up for future execution. Applications must call the flush(boolean) method to ensure that the rendering actually happens. The flush method is implicitly called in the following cases:

  • The readRaster method calls flush(true)
  • The Canvas3D.swap method calls flush(true)
  • The Java 3D renderer calls flush(true) prior to swapping the buffer for a double buffered on-screen Canvas3D
  • The Java 3D renderer calls flush(true) prior to copying into the off-screen buffer of an off-screen Canvas3D
  • The Java 3D renderer calls flush(false) after calling the preRender, renderField, postRender, and postSwap Canvas3D callback methods.

A single-buffered, pure-immediate mode application must explicitly call flush to ensure that the graphics will be rendered to the Canvas3D.
See Also:   Canvas3D.getGraphicsContext3D



Field Summary
final static  intADD_LIGHT
    
final static  intADD_SOUND
    
final static  intCLEAR
    
final static  intDISPOSE2D
    
final static  intDRAW
    
final static  intDRAWANDFLUSH2D
    
final static  intFLUSH
    
final static  intFLUSH2D
    
final static  intINSERT_LIGHT
    
final static  intINSERT_SOUND
    
final static  intMULTIPLY_MODEL_TRANSFORM
    
final static  intNCOMMANDS
    
final static  intREAD_RASTER
    
final static  intREMOVE_LIGHT
    
final static  intREMOVE_SOUND
    
final static  intSET_APPEARANCE
    
final static  intSET_AURAL_ATTRIBUTES
    
final static  intSET_BACKGROUND
    
final static  intSET_BUFFER_OVERRIDE
    
final static  intSET_FOG
    
final static  intSET_FRONT_BUFFER_RENDERING
    
final static  intSET_HI_RES
    
final static  intSET_LIGHT
    
final static  intSET_MODELCLIP
    
final static  intSET_MODEL_TRANSFORM
    
final static  intSET_SOUND
    
final static  intSET_STEREO_MODE
    
final public static  intSTEREO_BOTH
     Specifies that rendering is done to both eyes.
final public static  intSTEREO_LEFT
     Specifies that rendering is done to the left eye.
final public static  intSTEREO_RIGHT
     Specifies that rendering is done to the right eye.
final static  intSWAP
    
 floatalpha
     The cached TransparencyAttributes transparency value.
 Appearanceappearance
    
 AuralAttributesauralAttributes
    
 Backgroundbackground
    
 BackgroundRetainedblack
    
 floatblue
    
 booleanbufferOverride
    
 byte[]byteBuffer
    
 Canvas3Dcanvas3d
     Canvas3D in which this GraphicsContext3D will render.
 Transform3DcompTransform
    
 floatdBlue
    
 floatdGreen
    
 floatdRed
    
 AppearanceRetaineddefaultAppearanceRetained
    
 Transform3DdrawTransform
    
 booleanenableLighting
     /** A boolean indicating whether or not lighting should be on.
 float[]floatBuffer
    
 Fogfog
    
 booleanfrontBufferRendering
    
 floatgreen
    
 HiResCoordhiRes
    
 Transform3DidentityTransform
    
 int[]intBuffer
    
 LightRetained[]lightlist
    
 Vectorlights
    
 booleanlightsChanged
    
 booleanlineAA
    
 LightSetls
    
 ModelClipmodelClip
    
 Transform3DmodelClipTransform
    
 Transform3DmodelTransform
    
 Transform3DnormalTransform
    
 booleannormalTransformNeedToUpdate
    
 intnumLights
    
 booleanpointAA
    
 intpolygonMode
    
 floatred
     The cached ColoringAttributes color value.
 Color3fsceneAmbient
    
 Vectorsounds
    
 booleansoundsChanged
    
 intstereoMode
    
 booleanvisible
     The cached visible flag for geometry.
 Transform3DvpcToEc
    

Constructor Summary
 GraphicsContext3D(Canvas3D canvas3d)
     Constructs and creates a GraphicsContext3D object with default values.

Method Summary
public  voidaddLight(Light light)
     Appends the specified light to this graphics context's list of lights. Adding a null Light object to the list will result in a NullPointerException.
public  voidaddSound(Sound sound)
     Appends the specified sound to this graphics context's list of sounds. Adding a sound to the list of sounds implicitly starts the sound playing.
public  voidclear()
     Clear the Canvas3D to the color or image specified by the current background node.
 voiddoAddLight(Light light)
    
 voiddoAddSound(Sound sound)
    
 voiddoClear()
    
 voiddoDraw(Geometry geometry)
    
 voiddoFlush(boolean wait)
    
 voiddoInsertLight(Light light, int index)
    
 voiddoInsertSound(Sound sound, int index)
    
 voiddoMultiplyModelTransform(Transform3D t)
    
 voiddoReadRaster(Raster raster)
    
 voiddoRemoveLight(int index)
    
 voiddoRemoveSound(int index)
    
 voiddoSetAppearance(Appearance appearance)
    
 voiddoSetAuralAttributes(AuralAttributes attributes)
    
 voiddoSetBackground(Background background)
    
 voiddoSetBufferOverride(boolean bufferOverride)
    
 voiddoSetFog(Fog fog)
    
 voiddoSetFrontBufferRendering(boolean frontBufferRendering)
    
 voiddoSetHiRes(HiResCoord hiRes)
    
 voiddoSetLight(Light light, int index)
    
 voiddoSetModelClip(ModelClip modelClip)
    
 voiddoSetModelTransform(Transform3D t)
    
 voiddoSetSound(Sound sound, int index)
    
 voiddoSetStereoMode(int stereoMode)
    
public  voiddraw(Geometry geometry)
     Draw the specified Geometry component object.
public  voiddraw(Shape3D shape)
     Draw the specified Shape3D leaf node object.
public  voidflush(boolean wait)
     Flushes all previously executed rendering operations to the drawing buffer for this 3D graphics context.
public  EnumerationgetAllLights()
     Retrieves the enumeration object of all the lights.
public  EnumerationgetAllSounds()
     Retrieves the enumeration object of all the sounds.
public  AppearancegetAppearance()
     Retrieves the current Appearance component object.
public  AuralAttributesgetAuralAttributes()
     Retrieves the current AuralAttributes component object.
public  BackgroundgetBackground()
     Retrieves the current Background leaf node object.
public  booleangetBufferOverride()
     Returns the current buffer override flag.
public  Canvas3DgetCanvas3D()
     Gets the Canvas3D that created this GraphicsContext3D.
public  FoggetFog()
     Retrieves the current Fog leaf node object.
public  booleangetFrontBufferRendering()
     Returns the current front buffer rendering flag.
public  voidgetHiRes(HiResCoord hiRes)
     Retrieves the current HiRes coordinate of this context.
static  IntegergetImmCommand(int command)
    
public  LightgetLight(int index)
     Retrieves the index selected light.
public  ModelClipgetModelClip()
     Retrieves the current ModelClip leaf node object.
public  voidgetModelTransform(Transform3D t)
     Retrieves the current model transform.
public  SoundgetSound(int index)
     Retrieves the index selected sound.
 SoundSchedulergetSoundScheduler()
    
public  intgetStereoMode()
     Returns the current stereo mode.
 voidinitializeState()
    
public  voidinsertLight(Light light, int index)
     Inserts the specified light at the specified index location.
public  voidinsertSound(Sound sound, int index)
     Inserts the specified sound at the specified index location. Inserting a sound to the list of sounds implicitly starts the sound playing.
public  booleanisSoundPlaying(int index)
     Retrieves the sound playing flag.
public  voidmultiplyModelTransform(Transform3D t)
     Multiplies the current model transform by the specified transform and stores the result back into the current transform.
public  intnumLights()
     Retrieves the current number of lights in this graphics context.
public  intnumSounds()
     Retrieves the current number of sounds in this graphics context.
public  voidreadRaster(Raster raster)
     Read an image from the frame buffer and copy it into the ImageComponent and/or DepthComponent objects referenced by the specified Raster object. All parameters of the Raster object and the component ImageComponent and/or DepthComponentImage objects must be set to the desired values prior to calling this method.
public  voidremoveLight(int index)
     Removes the light at the specified index location.
public  voidremoveSound(int index)
     Removes the sound at the specified index location.
 voidresetAppearance()
    
synchronized  voidrunMonitor(int action)
    
 voidsendRenderMessage(boolean renderRun, int command, Object arg1, Object arg2)
    
 voidsendSoundMessage(int command, Object arg1, Object arg2)
    
public  voidsetAppearance(Appearance appearance)
     Sets the current Appearance object to the specified Appearance component object. The graphics context stores a reference to the specified Appearance object.
public  voidsetAuralAttributes(AuralAttributes attributes)
     Sets the current AuralAttributes object to the specified AuralAttributes component object.
public  voidsetBackground(Background background)
     Sets the current Background to the specified Background leaf node object. The graphics context stores a reference to the specified Background node.
public  voidsetBufferOverride(boolean bufferOverride)
     Sets a flag that specifies whether the double buffering and stereo mode from the Canvas3D are overridden.
public  voidsetFog(Fog fog)
     Sets the current Fog to the specified Fog leaf node object. The graphics context stores a reference to the specified Fog node.
public  voidsetFrontBufferRendering(boolean frontBufferRendering)
     Sets a flag that enables or disables immediate mode rendering into the front buffer of a double buffered Canvas3D.
public  voidsetHiRes(int[] x, int[] y, int[] z)
     Sets the HiRes coordinate of this context to the location specified by the parameters provided.
public  voidsetHiRes(HiResCoord hiRes)
     Sets the HiRes coordinate of this context to the location specified by the HiRes argument.
public  voidsetLight(Light light, int index)
     Replaces the specified light with the light provided. The graphics context stores a reference to each light object in the list of lights.
public  voidsetModelClip(ModelClip modelClip)
     Sets the current ModelClip leaf node to the specified object. The graphics context stores a reference to the specified ModelClip node.
public  voidsetModelTransform(Transform3D t)
     Sets the current model transform to a copy of the specified transform.
public  voidsetSound(Sound sound, int index)
     Replaces the specified sound with the sound provided. The graphics context stores a reference to each sound object in the list of sounds.
public  voidsetStereoMode(int stereoMode)
     Sets the stereo mode for immediate mode rendering.
 voidupdateFogState(FogRetained fogRet)
    
 voidupdateLightAndFog()
    
 voidupdateLightState(LightRetained light)
    
 voidupdateModelClip(Transform3D vworldToVpc)
    
 voidupdateSoundState(SoundRetained sound)
    
 booleanupdateState(RenderBin rb, int geometryType)
    

Field Detail
ADD_LIGHT
final static int ADD_LIGHT(Code)



ADD_SOUND
final static int ADD_SOUND(Code)



CLEAR
final static int CLEAR(Code)



DISPOSE2D
final static int DISPOSE2D(Code)



DRAW
final static int DRAW(Code)



DRAWANDFLUSH2D
final static int DRAWANDFLUSH2D(Code)



FLUSH
final static int FLUSH(Code)



FLUSH2D
final static int FLUSH2D(Code)



INSERT_LIGHT
final static int INSERT_LIGHT(Code)



INSERT_SOUND
final static int INSERT_SOUND(Code)



MULTIPLY_MODEL_TRANSFORM
final static int MULTIPLY_MODEL_TRANSFORM(Code)



NCOMMANDS
final static int NCOMMANDS(Code)



READ_RASTER
final static int READ_RASTER(Code)



REMOVE_LIGHT
final static int REMOVE_LIGHT(Code)



REMOVE_SOUND
final static int REMOVE_SOUND(Code)



SET_APPEARANCE
final static int SET_APPEARANCE(Code)



SET_AURAL_ATTRIBUTES
final static int SET_AURAL_ATTRIBUTES(Code)



SET_BACKGROUND
final static int SET_BACKGROUND(Code)



SET_BUFFER_OVERRIDE
final static int SET_BUFFER_OVERRIDE(Code)



SET_FOG
final static int SET_FOG(Code)



SET_FRONT_BUFFER_RENDERING
final static int SET_FRONT_BUFFER_RENDERING(Code)



SET_HI_RES
final static int SET_HI_RES(Code)



SET_LIGHT
final static int SET_LIGHT(Code)



SET_MODELCLIP
final static int SET_MODELCLIP(Code)



SET_MODEL_TRANSFORM
final static int SET_MODEL_TRANSFORM(Code)



SET_SOUND
final static int SET_SOUND(Code)



SET_STEREO_MODE
final static int SET_STEREO_MODE(Code)



STEREO_BOTH
final public static int STEREO_BOTH(Code)
Specifies that rendering is done to both eyes. This is the default.
See Also:   GraphicsContext3D.setStereoMode
since:
   Java 3D 1.2



STEREO_LEFT
final public static int STEREO_LEFT(Code)
Specifies that rendering is done to the left eye.
See Also:   GraphicsContext3D.setStereoMode
since:
   Java 3D 1.2



STEREO_RIGHT
final public static int STEREO_RIGHT(Code)
Specifies that rendering is done to the right eye.
See Also:   GraphicsContext3D.setStereoMode
since:
   Java 3D 1.2



SWAP
final static int SWAP(Code)



alpha
float alpha(Code)
The cached TransparencyAttributes transparency value. It is 0.0 if there is no TransparencyAttributes.



appearance
Appearance appearance(Code)



auralAttributes
AuralAttributes auralAttributes(Code)



background
Background background(Code)



black
BackgroundRetained black(Code)



blue
float blue(Code)



bufferOverride
boolean bufferOverride(Code)



byteBuffer
byte[] byteBuffer(Code)



canvas3d
Canvas3D canvas3d(Code)
Canvas3D in which this GraphicsContext3D will render.



compTransform
Transform3D compTransform(Code)



dBlue
float dBlue(Code)



dGreen
float dGreen(Code)



dRed
float dRed(Code)
Cached diffuse color value



defaultAppearanceRetained
AppearanceRetained defaultAppearanceRetained(Code)



drawTransform
Transform3D drawTransform(Code)



enableLighting
boolean enableLighting(Code)
/** A boolean indicating whether or not lighting should be on.



floatBuffer
float[] floatBuffer(Code)



fog
Fog fog(Code)



frontBufferRendering
boolean frontBufferRendering(Code)



green
float green(Code)



hiRes
HiResCoord hiRes(Code)



identityTransform
Transform3D identityTransform(Code)



intBuffer
int[] intBuffer(Code)



lightlist
LightRetained[] lightlist(Code)



lights
Vector lights(Code)



lightsChanged
boolean lightsChanged(Code)



lineAA
boolean lineAA(Code)



ls
LightSet ls(Code)



modelClip
ModelClip modelClip(Code)



modelClipTransform
Transform3D modelClipTransform(Code)



modelTransform
Transform3D modelTransform(Code)



normalTransform
Transform3D normalTransform(Code)



normalTransformNeedToUpdate
boolean normalTransformNeedToUpdate(Code)



numLights
int numLights(Code)



pointAA
boolean pointAA(Code)



polygonMode
int polygonMode(Code)
Cached values for polygonMode, line antialiasing, and point antialiasing



red
float red(Code)
The cached ColoringAttributes color value. It is 1.0, 1.0, 1.0 if there is no ColoringAttributes.



sceneAmbient
Color3f sceneAmbient(Code)



sounds
Vector sounds(Code)



soundsChanged
boolean soundsChanged(Code)



stereoMode
int stereoMode(Code)



visible
boolean visible(Code)
The cached visible flag for geometry.



vpcToEc
Transform3D vpcToEc(Code)




Constructor Detail
GraphicsContext3D
GraphicsContext3D(Canvas3D canvas3d)(Code)
Constructs and creates a GraphicsContext3D object with default values. Users do not call this directly, rather they get a graphics context from a Canvas3D.




Method Detail
addLight
public void addLight(Light light)(Code)
Appends the specified light to this graphics context's list of lights. Adding a null Light object to the list will result in a NullPointerException. Both the region of influence and the hierarchical scope of all lights in the list are ignored for immediate-mode rendering.
Parameters:
  light - the light to add
exception:
  IllegalSharingException - if the Light nodeis part of or is subsequently made part of a live scene graph.
exception:
  NullPointerException - if the Light object is null.



addSound
public void addSound(Sound sound)(Code)
Appends the specified sound to this graphics context's list of sounds. Adding a sound to the list of sounds implicitly starts the sound playing. Once a sound is finished playing, it can be restarted by setting the sound's enable flag to true. The scheduling region of all sounds in the list is ignored for immediate-mode rendering.
Parameters:
  sound - the sound to add
exception:
  IllegalSharingException - if the Sound nodeis part of or is subsequently made part of a live scene graph.
exception:
  NullPointerException - if the Sound object is null.



clear
public void clear()(Code)
Clear the Canvas3D to the color or image specified by the current background node.



doAddLight
void doAddLight(Light light)(Code)



doAddSound
void doAddSound(Sound sound)(Code)



doClear
void doClear()(Code)



doDraw
void doDraw(Geometry geometry)(Code)



doFlush
void doFlush(boolean wait)(Code)



doInsertLight
void doInsertLight(Light light, int index)(Code)



doInsertSound
void doInsertSound(Sound sound, int index)(Code)



doMultiplyModelTransform
void doMultiplyModelTransform(Transform3D t)(Code)



doReadRaster
void doReadRaster(Raster raster)(Code)



doRemoveLight
void doRemoveLight(int index)(Code)



doRemoveSound
void doRemoveSound(int index)(Code)



doSetAppearance
void doSetAppearance(Appearance appearance)(Code)



doSetAuralAttributes
void doSetAuralAttributes(AuralAttributes attributes)(Code)



doSetBackground
void doSetBackground(Background background)(Code)



doSetBufferOverride
void doSetBufferOverride(boolean bufferOverride)(Code)



doSetFog
void doSetFog(Fog fog)(Code)



doSetFrontBufferRendering
void doSetFrontBufferRendering(boolean frontBufferRendering)(Code)



doSetHiRes
void doSetHiRes(HiResCoord hiRes)(Code)



doSetLight
void doSetLight(Light light, int index)(Code)



doSetModelClip
void doSetModelClip(ModelClip modelClip)(Code)



doSetModelTransform
void doSetModelTransform(Transform3D t)(Code)



doSetSound
void doSetSound(Sound sound, int index)(Code)



doSetStereoMode
void doSetStereoMode(int stereoMode)(Code)



draw
public void draw(Geometry geometry)(Code)
Draw the specified Geometry component object.
Parameters:
  geometry - the Geometry object to draw.
exception:
  IllegalSharingException - if the specified geometry is a Raster that refers to an ImageComponent2D that is being used by a Canvas3D as an off-screen buffer.



draw
public void draw(Shape3D shape)(Code)
Draw the specified Shape3D leaf node object. This is a convenience method that is identical to calling the setAppearance(Appearance) and draw(Geometry) methods passing the appearance and geometry component objects of the specified shape node as arguments.
Parameters:
  shape - the Shape3D node containing the Appearance componentobject to set and Geometry component object to draw
exception:
  IllegalSharingException - if the Shape3D nodeis part of or is subsequently made part of a live scene graph.
exception:
  IllegalSharingException - if the Shape3D node's Appearancerefers to an ImageComponent2D that is being used by aCanvas3D as an off-screen buffer.



flush
public void flush(boolean wait)(Code)
Flushes all previously executed rendering operations to the drawing buffer for this 3D graphics context.
Parameters:
  wait - flag indicating whether or not to wait for therendering to be complete before returning from this call.
since:
   Java 3D 1.2



getAllLights
public Enumeration getAllLights()(Code)
Retrieves the enumeration object of all the lights. the enumeration object of all the lights



getAllSounds
public Enumeration getAllSounds()(Code)
Retrieves the enumeration object of all the sounds. the enumeration object of all the sounds



getAppearance
public Appearance getAppearance()(Code)
Retrieves the current Appearance component object. the current Appearance object



getAuralAttributes
public AuralAttributes getAuralAttributes()(Code)
Retrieves the current AuralAttributes component object. the current AuralAttributes object



getBackground
public Background getBackground()(Code)
Retrieves the current Background leaf node object. the current Background object



getBufferOverride
public boolean getBufferOverride()(Code)
Returns the current buffer override flag. true if buffer override is enabled; otherwise,false is returned
since:
   Java 3D 1.2



getCanvas3D
public Canvas3D getCanvas3D()(Code)
Gets the Canvas3D that created this GraphicsContext3D. the Canvas3D that created this GraphicsContext3D



getFog
public Fog getFog()(Code)
Retrieves the current Fog leaf node object. the current Fog object



getFrontBufferRendering
public boolean getFrontBufferRendering()(Code)
Returns the current front buffer rendering flag. true if front buffer rendering is enabled; otherwise,false is returned
since:
   Java 3D 1.2



getHiRes
public void getHiRes(HiResCoord hiRes)(Code)
Retrieves the current HiRes coordinate of this context.
Parameters:
  hiRes - a HiResCoord object that will receive theHiRes coordinate of this context



getImmCommand
static Integer getImmCommand(int command)(Code)



getLight
public Light getLight(int index)(Code)
Retrieves the index selected light.
Parameters:
  index - which light to return the light at location index



getModelClip
public ModelClip getModelClip()(Code)
Retrieves the current ModelClip leaf node object. the current ModelClip object
since:
   Java 3D 1.2



getModelTransform
public void getModelTransform(Transform3D t)(Code)
Retrieves the current model transform.
Parameters:
  t - the model transform that will receive the currentmodel transform



getSound
public Sound getSound(int index)(Code)
Retrieves the index selected sound.
Parameters:
  index - which sound to return the sound at location index



getSoundScheduler
SoundScheduler getSoundScheduler()(Code)



getStereoMode
public int getStereoMode()(Code)
Returns the current stereo mode. the stereo mode, one of STEREO_LEFT,STEREO_RIGHT, or STEREO_BOTH.
since:
   Java 3D 1.2



initializeState
void initializeState()(Code)



insertLight
public void insertLight(Light light, int index)(Code)
Inserts the specified light at the specified index location.
Parameters:
  light - the new light
Parameters:
  index - at which location to insert
exception:
  IllegalSharingException - if the Light nodeis part of or is subsequently made part of a live scene graph.
exception:
  NullPointerException - if the Light object is null.



insertSound
public void insertSound(Sound sound, int index)(Code)
Inserts the specified sound at the specified index location. Inserting a sound to the list of sounds implicitly starts the sound playing. Once a sound is finished playing, it can be restarted by setting the sound's enable flag to true. The scheduling region of all sounds in the list is ignored for immediate-mode rendering.
Parameters:
  sound - the new sound
Parameters:
  index - at which location to insert
exception:
  IllegalSharingException - if the Sound nodeis part or is subsequently made part of a live scene graph.
exception:
  NullPointerException - if the Sound object is null.



isSoundPlaying
public boolean isSoundPlaying(int index)(Code)
Retrieves the sound playing flag.
Parameters:
  index - which sound flag denoting if sound is currently playing



multiplyModelTransform
public void multiplyModelTransform(Transform3D t)(Code)
Multiplies the current model transform by the specified transform and stores the result back into the current transform. The specified transformation must be affine.
Parameters:
  t - the model transform to be concatenated with thecurrent model transform
exception:
  BadTransformException - if the transform is not affine.



numLights
public int numLights()(Code)
Retrieves the current number of lights in this graphics context. the current number of lights



numSounds
public int numSounds()(Code)
Retrieves the current number of sounds in this graphics context. the current number of sounds



readRaster
public void readRaster(Raster raster)(Code)
Read an image from the frame buffer and copy it into the ImageComponent and/or DepthComponent objects referenced by the specified Raster object. All parameters of the Raster object and the component ImageComponent and/or DepthComponentImage objects must be set to the desired values prior to calling this method. These values determine the location, size, and format of the pixel data that is read. This method calls flush(true) prior to reading the frame buffer.
Parameters:
  raster - the Raster object used to read thecontents of the frame buffer
exception:
  IllegalArgumentException - if the image class of the specifiedRaster's ImageComponent2D is not ImageClass.BUFFERED_IMAGE.
exception:
  IllegalArgumentException - if the specified Raster'sImageComponent2D is in by-reference mode and itsRenderedImage is null.
exception:
  IllegalArgumentException - if the the Raster'sImageComponent2D formatis not a 3-component format (e.g., FORMAT_RGB)or a 4-component format (e.g., FORMAT_RGBA).
exception:
  IllegalSharingException - if the Raster object ispart of a live scene graph, or if the Raster's ImageComponent2D ispart of a live scene graph.
exception:
  IllegalSharingException - if the Raster's ImageComponent2D isbeing used by an immediate mode context, or by a Canvas3D asan off-screen buffer.
See Also:   GraphicsContext3D.flush
See Also:   ImageComponent
See Also:   DepthComponent



removeLight
public void removeLight(int index)(Code)
Removes the light at the specified index location.
Parameters:
  index - which light to remove



removeSound
public void removeSound(int index)(Code)
Removes the sound at the specified index location.
Parameters:
  index - which sound to remove



resetAppearance
void resetAppearance()(Code)



runMonitor
synchronized void runMonitor(int action)(Code)



sendRenderMessage
void sendRenderMessage(boolean renderRun, int command, Object arg1, Object arg2)(Code)



sendSoundMessage
void sendSoundMessage(int command, Object arg1, Object arg2)(Code)



setAppearance
public void setAppearance(Appearance appearance)(Code)
Sets the current Appearance object to the specified Appearance component object. The graphics context stores a reference to the specified Appearance object. This means that the application may modify individual appearance attributes by using the appropriate methods on the Appearance object. If the Appearance object is null, default values will be used for all appearance attributes - it is as if an Appearance node were created using the default constructor.
Parameters:
  appearance - the new Appearance object
exception:
  IllegalSharingException - if the specified appearance refersto an ImageComponent2D that is being used by a Canvas3D asan off-screen buffer.



setAuralAttributes
public void setAuralAttributes(AuralAttributes attributes)(Code)
Sets the current AuralAttributes object to the specified AuralAttributes component object. This means that the application may modify individual audio attributes by using the appropriate methods in the Aural-Attributes object.
Parameters:
  attributes - the new AuralAttributes object



setBackground
public void setBackground(Background background)(Code)
Sets the current Background to the specified Background leaf node object. The graphics context stores a reference to the specified Background node. This means that the application may modify the background color or image by using the appropriate methods on the Background node. The Background node must not be part of a live scene graph, nor may it subsequently be made part of a live scene graph-an IllegalSharingException is thrown in such cases. If the Background object is null, the default background color of black (0,0,0) is used to clear the canvas prior to rendering a new frame. The Background node's application region is ignored for immediate-mode rendering.
Parameters:
  background - the new Background object
exception:
  IllegalSharingException - if the Background nodeis part of or is subsequently made part of a live scene graph.
exception:
  IllegalSharingException - if the specified background noderefers to an ImageComponent2D that is being used by a Canvas3D asan off-screen buffer.



setBufferOverride
public void setBufferOverride(boolean bufferOverride)(Code)
Sets a flag that specifies whether the double buffering and stereo mode from the Canvas3D are overridden. When set to true, this attribute enables the frontBufferRendering and stereoMode attributes.
Parameters:
  bufferOverride - the new buffer override flag
See Also:   GraphicsContext3D.setFrontBufferRendering
See Also:   GraphicsContext3D.setStereoMode
since:
   Java 3D 1.2



setFog
public void setFog(Fog fog)(Code)
Sets the current Fog to the specified Fog leaf node object. The graphics context stores a reference to the specified Fog node. This means that the application may modify the fog attributes using the appropriate methods on the Fog node object. The Fog node must not be part of a live scene graph, nor may it subsequently be made part of a live scene graph-an IllegalSharingException is thrown in such cases. If the Fog object is null, fog is disabled. Both the region of influence and the hierarchical scope of the Fog node are ignored for immediate-mode rendering.
Parameters:
  fog - the new Fog object
exception:
  IllegalSharingException - if the Fog nodeis part of or is subsequently made part of a live scene graph.



setFrontBufferRendering
public void setFrontBufferRendering(boolean frontBufferRendering)(Code)
Sets a flag that enables or disables immediate mode rendering into the front buffer of a double buffered Canvas3D. This attribute is only used when the bufferOverride flag is enabled.

Note that this attribute has no effect if double buffering is disabled or is not available on the Canvas3D.
Parameters:
  frontBufferRendering - the new front buffer rendering flag
See Also:   GraphicsContext3D.setBufferOverride
since:
   Java 3D 1.2




setHiRes
public void setHiRes(int[] x, int[] y, int[] z)(Code)
Sets the HiRes coordinate of this context to the location specified by the parameters provided. The parameters x, y, and z are arrays of eight 32-bit integers that specify the high-resolution coordinates point.
Parameters:
  x - an eight element array specifying the x position
Parameters:
  y - an eight element array specifying the y position
Parameters:
  z - an eight element array specifying the z position
See Also:   HiResCoord



setHiRes
public void setHiRes(HiResCoord hiRes)(Code)
Sets the HiRes coordinate of this context to the location specified by the HiRes argument.
Parameters:
  hiRes - the HiRes coordinate specifying the a new location



setLight
public void setLight(Light light, int index)(Code)
Replaces the specified light with the light provided. The graphics context stores a reference to each light object in the list of lights. This means that the application may modify the light attributes for any of the lights using the appropriate methods on that Light node object. None of the Light nodes in the list of lights may be part of a live scene graph, nor may they subsequently be made part of a live scene graph - an IllegalSharingException is thrown in such cases.
Parameters:
  light - the new light
Parameters:
  index - which light to replace
exception:
  IllegalSharingException - if the Light nodeis part of or is subsequently made part of a live scene graph.
exception:
  NullPointerException - if the Light object is null.



setModelClip
public void setModelClip(ModelClip modelClip)(Code)
Sets the current ModelClip leaf node to the specified object. The graphics context stores a reference to the specified ModelClip node. This means that the application may modify the model clipping attributes using the appropriate methods on the ModelClip node object. The ModelClip node must not be part of a live scene graph, nor may it subsequently be made part of a live scene graph-an IllegalSharingException is thrown in such cases. If the ModelClip object is null, model clipping is disabled. Both the region of influence and the hierarchical scope of the ModelClip node are ignored for immediate-mode rendering.
Parameters:
  modelClip - the new ModelClip node
exception:
  IllegalSharingException - if the ModelClip nodeis part of or is subsequently made part of a live scene graph.
since:
   Java 3D 1.2



setModelTransform
public void setModelTransform(Transform3D t)(Code)
Sets the current model transform to a copy of the specified transform. A BadTransformException is thrown if an attempt is made to specify an illegal Transform3D.
Parameters:
  t - the new model transform
exception:
  BadTransformException - if the transform is not affine.



setSound
public void setSound(Sound sound, int index)(Code)
Replaces the specified sound with the sound provided. The graphics context stores a reference to each sound object in the list of sounds. This means that the application may modify the sound attributes for any of the sounds by using the appropriate methods on that Sound node object.
Parameters:
  sound - the new sound
Parameters:
  index - which sound to replace
exception:
  IllegalSharingException - if the Sound nodeis part of or is subsequently made part of a live scene graph.
exception:
  NullPointerException - if the Sound object is null.



setStereoMode
public void setStereoMode(int stereoMode)(Code)
Sets the stereo mode for immediate mode rendering. The parameter specifies which stereo buffer or buffers is rendered into. This attribute is only used when the bufferOverride flag is enabled.
  • STEREO_LEFT specifies that rendering is done into the left eye.
  • STEREO_RIGHT specifies that rendering is done into the right eye.
  • STEREO_BOTH specifies that rendering is done into both eyes. This is the default.

Note that this attribute has no effect if stereo is disabled or is not available on the Canvas3D.
Parameters:
  stereoMode - the new stereo mode
See Also:   GraphicsContext3D.setBufferOverride
since:
   Java 3D 1.2




updateFogState
void updateFogState(FogRetained fogRet)(Code)



updateLightAndFog
void updateLightAndFog()(Code)



updateLightState
void updateLightState(LightRetained light)(Code)



updateModelClip
void updateModelClip(Transform3D vworldToVpc)(Code)



updateSoundState
void updateSoundState(SoundRetained sound)(Code)



updateState
boolean updateState(RenderBin rb, int geometryType)(Code)



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.