Class dnx.ice.Graphics3D
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dnx.ice.Graphics3D

java.lang.Object
   |
   +----dnx.ice.Graphics3D

public class Graphics3D
extends Object
A Graphics3D object encapsulates a framebuffer and state used in 3D rendering. It is a fairly low-level interface to whatever native 3D graphics system a platform provides.

Variable Index

 o ACCUMULATION_BUFFER
 o ACCURATE_FOG
 o ACCURATE_SPECULAR
 o ALPHA_BLENDING
Renderer features
 o AMBIENT_COLOR
 o ANTIALIASING
 o BUFFER_OFF
Depth buffer access modes
 o BUFFER_READ_ONLY
 o BUFFER_READ_WRITE
 o BUFFER_WRITE_ONLY
 o COLOR_BUFFER
Graphics3D buffers
 o COPY_BLEND
Texture blending modes
 o DECAL_ALPHA_BLEND
 o DECAL_BLEND
 o DEPTH_BUFFER
 o DIFFUSE_COLOR
 o DITHERING
 o EMISSIVE_COLOR
 o FLAT_SHADE
Shading modes
 o GOURAUD_SHADE
 o LINEAR
 o LINEAR_MIPMAP_LINEAR
 o LINEAR_MIPMAP_NEAREST
 o MIPMAP_LINEAR
 o MIPMAP_NEAREST
 o MODULATED_ALPHA_BLEND
 o MODULATED_BLEND
 o NEAREST
Texture filtering modes
 o PHONG_SHADE
 o platform
 o SCREENDOOR_ALPHA
 o SPECULAR_COLOR
 o TEXTURE_PERSPECTIVE
 o TEXTURES

Constructor Index

 o Graphics3D(Graphics3DDevice)
Create a new 3D graphics context from a Graphics object.

Method Index

 o accumLoad(float)
Similar to accumulate, except that the values in the accumulation buffer are replaced with the contents of the color buffer multiplied by value.
 o accumMult(float)
Multiply the contents of the accumulation buffer by value.
 o accumReturn(float)
Multiply the contents of the accumulation buffer by value and load them into the color buffer.
 o accumulate(float)
Multiply the contents of the color buffer by value and add to the accumulation buffer.
 o beginRendering()
beginRendering must be called before rendering models.
 o clear(int)
Clear one or more buffers; the buffers parameter specifies which buffers will be cleared.
 o concatModelMatrix(Matrix4)
Push the product of a matrix and the current model matrix onto the stack
 o copyBuffers(Graphics3D, int)
Copy buffers from one viewport to another.
 o copyRect(Rectangle, int, int)
 o disableBackfaceCulling()
Disable back face culling.
 o disableFeature(int)
 o disableTwoSidedLighting()
Disable two-sided lighting.
 o drawImage()
 o drawRect(Rectangle, Color)
 o drawRect(Rectangle, Color, float)
 o enableBackfaceCulling()
Enable back face culling.
 o enableFeature(int)
 o enableTwoSidedLighting()
Enable two-sided lighting calculations.
 o endRendering()
endRendering must be called after all models have been rendered and before paint is called.
 o getDevice()
 o getModelMatrix(Matrix4)
Load the current model matrix into m.
 o getPixelAspectRatio()
 o getTextureMatrix(Matrix4)
Load the current texture matrix into m.
 o loadModelMatrix(Matrix4)
Push a transformation onto the model matrix stack.
 o loadTextureMatrix(Matrix4)
Push a transformation onto the texture transformation stack.
 o location()
 o paint(Graphics, int, int)
 o popLight()
Remove the top light off the light stack.
 o popModelMatrix()
Pop a transformation off the model transformation stack.
 o pushLight(Light)
Push a light onto the light stack.
 o rayPick(Model, Ray3, PickResult)
 o render(Model)
Render a model
 o resetLights()
Remove all lights from the stack.
 o resetModelMatrix()
Pop all model transformations off the stack and set the current model transformation to the identity.
 o resize(Dimension)
Resize to the specified dimension
 o resize(int, int)
Resize to the specified height and width
 o rotateModel(float, float, float, float)
Rotate the model by angle radians about the axis [ ax, ay, az]
 o rotateModel(Quaternion)
 o scaleModel(float)
Scale the model uniformly on all axes
 o scaleModel(float, float, float)
Scale the model
 o setClearColor(Color)
Set the color to which the color buffer will be cleared when the clear method is invoked.
 o setClearDepth(float)
Set the depth to which the depth buffer will be cleared when the clear method is invoked.
 o setColorBufferMask(int)
 o setDepthBufferMask(int)
Enable or disable reading from or writing to the depth buffer.
 o setFog(Fog)
Set the type of fog (i.e.
 o setMaterial(Material)
Set the surface material for a model.
 o setModelRenderMode(int)
 o setModifiedMaterialColor(int)
Set the material component which will be modified by per-vertex and per-face colors in models.
 o setPixelAspectRatio(float)
 o setProjection(Projection)
Set the camera projection
 o setShadeMode(int)
Set the shade mode.
 o setTextureBlendMode(int)
 o setTextureCoordinateGeneration(TextureCoordinateGenerator)
Set the method used to generate texture coordinates
 o setTextureFilter(int)
 o setTextureWrapping(boolean, boolean)
 o size()
Return the dimensions
 o translateModel(float, float, float)
Translate the model
 o useTexture(Texture)
Set the texture that will be applied to models; if the texture is null, no textures will be applied.

Variables

 o COLOR_BUFFER
  public final static int COLOR_BUFFER
Graphics3D buffers
 o DEPTH_BUFFER
  public final static int DEPTH_BUFFER
 o ACCUMULATION_BUFFER
  public final static int ACCUMULATION_BUFFER
 o BUFFER_OFF
  public final static int BUFFER_OFF
Depth buffer access modes
 o BUFFER_READ_ONLY
  public final static int BUFFER_READ_ONLY
 o BUFFER_WRITE_ONLY
  public final static int BUFFER_WRITE_ONLY
 o BUFFER_READ_WRITE
  public final static int BUFFER_READ_WRITE
 o FLAT_SHADE
  public final static int FLAT_SHADE
Shading modes
 o GOURAUD_SHADE
  public final static int GOURAUD_SHADE
 o PHONG_SHADE
  public final static int PHONG_SHADE
 o ALPHA_BLENDING
  public final static int ALPHA_BLENDING
Renderer features
 o TEXTURES
  public final static int TEXTURES
 o TEXTURE_PERSPECTIVE
  public final static int TEXTURE_PERSPECTIVE
 o ANTIALIASING
  public final static int ANTIALIASING
 o DITHERING
  public final static int DITHERING
 o SCREENDOOR_ALPHA
  public final static int SCREENDOOR_ALPHA
 o ACCURATE_FOG
  public final static int ACCURATE_FOG
 o ACCURATE_SPECULAR
  public final static int ACCURATE_SPECULAR
 o NEAREST
  public final static int NEAREST
Texture filtering modes
 o LINEAR
  public final static int LINEAR
 o MIPMAP_NEAREST
  public final static int MIPMAP_NEAREST
 o MIPMAP_LINEAR
  public final static int MIPMAP_LINEAR
 o LINEAR_MIPMAP_NEAREST
  public final static int LINEAR_MIPMAP_NEAREST
 o LINEAR_MIPMAP_LINEAR
  public final static int LINEAR_MIPMAP_LINEAR
 o COPY_BLEND
  public final static int COPY_BLEND
Texture blending modes
 o DECAL_BLEND
  public final static int DECAL_BLEND
 o MODULATED_BLEND
  public final static int MODULATED_BLEND
 o DECAL_ALPHA_BLEND
  public final static int DECAL_ALPHA_BLEND
 o MODULATED_ALPHA_BLEND
  public final static int MODULATED_ALPHA_BLEND
 o EMISSIVE_COLOR
  public final static int EMISSIVE_COLOR
 o AMBIENT_COLOR
  public final static int AMBIENT_COLOR
 o DIFFUSE_COLOR
  public final static int DIFFUSE_COLOR
 o SPECULAR_COLOR
  public final static int SPECULAR_COLOR
 o platform
  protected PlatformSpecific platform

Constructors

 o Graphics3D
  public Graphics3D(Graphics3DDevice device)
Create a new 3D graphics context from a Graphics object. The color model is the 'natural' color model of the window server.

Methods

 o getDevice
  public Graphics3DDevice getDevice()
 o paint
  public abstract void paint(Graphics g,
                             int x,
                             int y)
 o beginRendering
  public abstract void beginRendering()
beginRendering must be called before rendering models.
 o endRendering
  public abstract void endRendering()
endRendering must be called after all models have been rendered and before paint is called.
 o render
  public abstract void render(Model m)
Render a model
 o rayPick
  public abstract boolean rayPick(Model m,
                                  Ray3 ray,
                                  PickResult result)
 o size
  public abstract Dimension size()
Return the dimensions
 o location
  public abstract Point location()
 o resize
  public abstract void resize(Dimension d)
Resize to the specified dimension
 o resize
  public abstract void resize(int width,
                              int height)
Resize to the specified height and width
 o concatModelMatrix
  public abstract void concatModelMatrix(Matrix4 m)
Push the product of a matrix and the current model matrix onto the stack
 o loadModelMatrix
  public abstract void loadModelMatrix(Matrix4 m)
Push a transformation onto the model matrix stack.
 o popModelMatrix
  public abstract void popModelMatrix()
Pop a transformation off the model transformation stack.
 o translateModel
  public abstract void translateModel(float tx,
                                      float ty,
                                      float tz)
Translate the model
 o scaleModel
  public abstract void scaleModel(float sx,
                                  float sy,
                                  float sz)
Scale the model
 o scaleModel
  public abstract void scaleModel(float s)
Scale the model uniformly on all axes
 o rotateModel
  public abstract void rotateModel(float ax,
                                   float ay,
                                   float az,
                                   float angle)
Rotate the model by angle radians about the axis [ ax, ay, az]
 o rotateModel
  public abstract void rotateModel(Quaternion q)
 o resetModelMatrix
  public abstract void resetModelMatrix()
Pop all model transformations off the stack and set the current model transformation to the identity.
 o loadTextureMatrix
  public abstract void loadTextureMatrix(Matrix4 m)
Push a transformation onto the texture transformation stack.
 o getModelMatrix
  public abstract void getModelMatrix(Matrix4 m)
Load the current model matrix into m.
 o getTextureMatrix
  public abstract void getTextureMatrix(Matrix4 m)
Load the current texture matrix into m.
 o getPixelAspectRatio
  public float getPixelAspectRatio()
 o setPixelAspectRatio
  public void setPixelAspectRatio(float ratio)
 o setModelRenderMode
  public abstract void setModelRenderMode(int renderMode)
 o setProjection
  public abstract void setProjection(Projection p)
Set the camera projection
 o setMaterial
  public abstract void setMaterial(Material m)
Set the surface material for a model.
 o setModifiedMaterialColor
  public abstract void setModifiedMaterialColor(int color)
Set the material component which will be modified by per-vertex and per-face colors in models.
 o pushLight
  public abstract void pushLight(Light l)
Push a light onto the light stack.
See Also:
DirectionalLight, PointLight, SpotLight
 o popLight
  public abstract void popLight()
Remove the top light off the light stack.
 o resetLights
  public abstract void resetLights()
Remove all lights from the stack.
 o setFog
  public abstract void setFog(Fog f)
Set the type of fog (i.e. how colors are attenuated as distance from the viewer increases.) If the argument is null, fog is turned off.
 o setShadeMode
  public abstract void setShadeMode(int shadeMode)
Set the shade mode.
 o enableFeature
  public abstract void enableFeature(int feature)
 o disableFeature
  public abstract void disableFeature(int feature)
 o setTextureBlendMode
  public abstract void setTextureBlendMode(int blendMode)
 o setTextureWrapping
  public abstract void setTextureWrapping(boolean wrapU,
                                          boolean wrapV)
 o setTextureFilter
  public abstract void setTextureFilter(int filter)
 o setTextureCoordinateGeneration
  public abstract void setTextureCoordinateGeneration(TextureCoordinateGenerator gen)
Set the method used to generate texture coordinates
 o useTexture
  public abstract void useTexture(Texture t)
Set the texture that will be applied to models; if the texture is null, no textures will be applied.
 o setDepthBufferMask
  public abstract void setDepthBufferMask(int mask)
Enable or disable reading from or writing to the depth buffer. This has no effect if a graphics context has no depth buffer.
 o setColorBufferMask
  public abstract void setColorBufferMask(int mask)
 o drawRect
  public abstract void drawRect(Rectangle r,
                                Color c)
 o drawRect
  public abstract void drawRect(Rectangle r,
                                Color c,
                                float opacity)
 o copyRect
  public abstract void copyRect(Rectangle src,
                                int x,
                                int y)
 o drawImage
  public abstract void drawImage()
 o copyBuffers
  public abstract void copyBuffers(Graphics3D g,
                                   int buffers)
Copy buffers from one viewport to another.
 o setClearColor
  public abstract void setClearColor(Color c)
Set the color to which the color buffer will be cleared when the clear method is invoked.
 o setClearDepth
  public abstract void setClearDepth(float depth)
Set the depth to which the depth buffer will be cleared when the clear method is invoked.
 o clear
  public abstract void clear(int buffers)
Clear one or more buffers; the buffers parameter specifies which buffers will be cleared.
 o enableTwoSidedLighting
  public abstract void enableTwoSidedLighting()
Enable two-sided lighting calculations. Surface normals of back facing polygons will be inverted for lighting calculations.
 o disableTwoSidedLighting
  public abstract void disableTwoSidedLighting()
Disable two-sided lighting.
 o enableBackfaceCulling
  public abstract void enableBackfaceCulling()
Enable back face culling. Back facing polygons will not be rendered. Turning on back face culling can speed up rendering significantly, although models which aren't 'solid' or which have inconsistently ordered polygons will not be rendered correctly.
 o disableBackfaceCulling
  public abstract void disableBackfaceCulling()
Disable back face culling.
 o accumulate
  public abstract void accumulate(float value)
Multiply the contents of the color buffer by value and add to the accumulation buffer. For this and all other accumulation buffer operations, float is clamped to [0, 1]. Accumulation has no effect if the Graphics3D has no accumulation buffer.
 o accumLoad
  public abstract void accumLoad(float value)
Similar to accumulate, except that the values in the accumulation buffer are replaced with the contents of the color buffer multiplied by value.
 o accumReturn
  public abstract void accumReturn(float value)
Multiply the contents of the accumulation buffer by value and load them into the color buffer.
 o accumMult
  public abstract void accumMult(float value)
Multiply the contents of the accumulation buffer by value.

All Packages  Class Hierarchy  This Package  Previous  Next  Index