|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GraphicsOutputDevice
Interface representing the output of a render pipeline that specifically deals with graphical (visual) information.
Mouse Interaction
When working with any form of 2D input, such as a mouse, you need to transform it's device coordinates into the 3D space of the world, so that you may then do picking or other projections in world space.
Each of the mouse methods require that you pass in extra information to help with efficiency and specifically dealing with how a screen can be divided up into multiple viewports, yet still enable dragging operations to work correctly. The problem is that once you leave one viewport, you want to keep using the projection from that same viewport, not another one on the same layer. If you wish to keep the current viewport information the you can pass in a string that represents the identifier of your input device (in case you have multiple simultaneous input devices) and a flag to say whether the last found projection information for that device should still be used. If that flag is true, and the layer and sublayer IDs match, it will just project using the previously fetched information. If any of these conditions are not met, then a new set of projection information is fetched and cached for that ID.
Field Summary | |
---|---|
static int |
ALTERNATE_FRAME_STEREO
The stereo rendering type draws to alternate eyes on each frame. |
static int |
NO_STEREO
The surface will render only non-stereo projection (traditional monoscopic projection policy). |
static int |
QUAD_BUFFER_STEREO
The stereo rendering type to be used should use quad buffered, alternate frame rendering. |
static int |
TWO_CANVAS_STEREO
The stereo rendering uses two canvases - one for each eye. |
Method Summary | |
---|---|
void |
addGraphicsResizeListener(GraphicsResizeListener l)
Add a resize listener instance to this surface. |
void |
addSurfaceInfoListener(SurfaceInfoListener l)
Add a surface info listener instance to this surface. |
void |
enableTwoPassTransparentRendering(boolean state)
Enable or disable two pass rendering of transparent objects. |
float |
getAlphaTestCutoff()
Get the current value of the alpha test cutoff number. |
boolean |
getCenterEyeInSurface(int x,
int y,
int layer,
int subLayer,
javax.vecmath.Point3f position,
java.lang.String deviceId,
boolean useLastFound)
Get the Center Eye position in surface coordinates. |
boolean |
getPixelLocationInSurface(int x,
int y,
int layer,
int subLayer,
javax.vecmath.Point3f position,
java.lang.String deviceId,
boolean useLastFound)
Convert a pixel location to surface coordinates. |
float |
getStereoEyeSeparation()
Get the current eye separation value, defined as the distance from the center axis to one eye. |
int |
getStereoRenderingPolicy()
Get the current stereo rendering policy in use. |
boolean |
getSurfaceToVWorld(int x,
int y,
int layer,
int subLayer,
javax.vecmath.Matrix4f matrix,
java.lang.String deviceId,
boolean useLastFound)
Get the surface to VWorld transformation matrix. |
boolean |
isQuadStereoAvailable()
Check to see whether this surface supports Quad buffer stereo rendering. |
boolean |
isStereoAvailable()
Check to see whether this surface supports stereo rendering. |
boolean |
isTwoPassTransparentEnabled()
Check the state of the two pass transprent rendering flag. |
void |
removeGraphicsResizeListener(GraphicsResizeListener l)
Remove a resize listener from this surface. |
void |
removeSurfaceInfoListener(SurfaceInfoListener l)
Remove a surface info listener from this surface. |
void |
setAlphaTestCutoff(float cutoff)
If two pass rendering of transparent objects is enabled, this is the alpha test value used when deciding what to render. |
void |
setClearColor(float r,
float g,
float b,
float a)
Set the background colour that this surface should be cleared to before the drawing step. |
void |
setColorClearNeeded(boolean state)
Set whether we should always force a local colour clear before beginning any drawing. |
void |
setDrawableObjects(GraphicsRequestData otherData,
GraphicsInstructions[] commands,
int numValid)
Update the list of items to be rendered to the current list. |
void |
setStereoEyeSeparation(float sep)
Set the eye separation value when rendering stereo, defined as the distance from the center axis to one eye. |
void |
setStereoRenderingPolicy(int policy)
Set the rendering policy used when handling stereo. |
void |
swap()
Swap the buffers now if the surface supports multiple buffer drawing. |
Methods inherited from interface org.j3d.aviatrix3d.pipeline.OutputDevice |
---|
dispose, disposeSingleThreadResources, draw, enableSingleThreaded, getSurfaceObject, isDisposed, setErrorReporter |
Field Detail |
---|
static final int NO_STEREO
static final int QUAD_BUFFER_STEREO
static final int ALTERNATE_FRAME_STEREO
static final int TWO_CANVAS_STEREO
Method Detail |
---|
boolean isStereoAvailable()
boolean isQuadStereoAvailable()
As this is not known until after initialisation, this method will return false until it can determine whether or not stereo is available.
void setStereoRenderingPolicy(int policy)
policy
- The policy to currently use
java.lang.IllegalArgumentException
- The policy type is not one of the legal
selections.int getStereoRenderingPolicy()
NO_STEREO
.
void setStereoEyeSeparation(float sep)
sep
- The amount of eye separationfloat getStereoEyeSeparation()
void setClearColor(float r, float g, float b, float a)
r
- The red component of the background clear colourg
- The green component of the background clear colourb
- The blue component of the background clear coloura
- The alpha component of the background clear colourvoid setColorClearNeeded(boolean state)
state
- true if we should always locally clear firstvoid enableTwoPassTransparentRendering(boolean state)
state
- true if we should enable two pass renderingboolean isTwoPassTransparentEnabled()
void setAlphaTestCutoff(float cutoff)
This flag applies to this surface and any offscreen surfaces that are children of this surface (FBOs, PBuffers etc).
cutoff
- The alpha value at which to enable renderingfloat getAlphaTestCutoff()
void setDrawableObjects(GraphicsRequestData otherData, GraphicsInstructions[] commands, int numValid)
otherData
- data to be processed before the renderingcommands
- The list of drawable surfaces to rendernumValid
- The number of valid items in the arrayvoid swap()
boolean getSurfaceToVWorld(int x, int y, int layer, int subLayer, javax.vecmath.Matrix4f matrix, java.lang.String deviceId, boolean useLastFound)
x
- The X coordinate in the entire surfacey
- The Y coordinate in the entire surfacelayer
- The layer ID to fetch from. Layer 0 is the front-mostsubLayer
- The ID of the viewport-layer that is needed. If there
are no sub-layers, use 0.matrix
- The matrix to copy intodeviceId
- A user-defined identifier for the requesting device when
using the lastFound itemsuseLastFound
- Should we skip the search process and use the last
data found for this layer/sublayer combo.
boolean getPixelLocationInSurface(int x, int y, int layer, int subLayer, javax.vecmath.Point3f position, java.lang.String deviceId, boolean useLastFound)
x
- The X coordinate in the entire surfacey
- The Y coordinate in the entire surfacelayer
- The layer ID to fetch from. Layer 0 is the front-mostsubLayer
- The ID of the viewport-layer that is needed. If there
are no sub-layers, use 0.position
- The converted position. It must be preallocated.deviceId
- A user-defined identifier for the requesting device when
using the lastFound itemsuseLastFound
- Should we skip the search process and use the last
data found for this layer/sublayer combo.
boolean getCenterEyeInSurface(int x, int y, int layer, int subLayer, javax.vecmath.Point3f position, java.lang.String deviceId, boolean useLastFound)
x
- The X coordinate in the entire surfacey
- The Y coordinate in the entire surfacelayer
- The layer ID to fetch from. Layer 0 is the front-mostsubLayer
- The ID of the viewport-layer that is needed. If there
are no sub-layers, use 0.position
- The current eye position. It must be preallocated.deviceId
- A user-defined identifier for the requesting device when
using the lastFound itemsuseLastFound
- Should we skip the search process and use the last
data found for this layer/sublayer combo.
void addGraphicsResizeListener(GraphicsResizeListener l)
l
- The new listener instance to addvoid removeGraphicsResizeListener(GraphicsResizeListener l)
l
- The listener instance to removevoid addSurfaceInfoListener(SurfaceInfoListener l)
l
- The new listener instance to addvoid removeSurfaceInfoListener(SurfaceInfoListener l)
l
- The listener instance to remove
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |