|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object igeo.gui.IGraphicsGL2
public class IGraphicsGL2
A child class of Processing's PGraphic to draw on Processing version 2.0 using OpenGL. This class also manages the IServer to manage all the objects in iGeo.
Field Summary | |
---|---|
double[][][] |
bgColor
|
static float[] |
defaultGLAmbientLight
|
static float[] |
defaultGLDiffuseLight
|
static float[] |
defaultGLLightPosition
|
static float[] |
defaultGLSpecularLight
|
static boolean |
defaultGLTwoSidedLighting
|
boolean |
firstDraw
|
java.awt.Graphics2D |
g
|
javax.media.opengl.GL |
gl
|
javax.media.opengl.GL2 |
gl2
|
IView |
view
|
Constructor Summary | |
---|---|
IGraphicsGL2()
|
Method Summary | |
---|---|
void |
ambient(float[] rgba)
|
void |
ambient(float r,
float g,
float b)
|
void |
ambient(float r,
float g,
float b,
float a)
|
void |
ambient(IColor c)
|
void |
clr(float[] rgba)
fill color (array of 4 float in order of r, g, b, a) |
void |
clr(float red,
float green,
float blue)
fill color (float 0-255) |
void |
clr(float red,
float green,
float blue,
float alpha)
fill color (float 0-255) |
void |
clr(IColor c)
fill color |
void |
diffuse(float[] rgba)
|
void |
diffuse(float r,
float g,
float b)
|
void |
diffuse(float r,
float g,
float b,
float a)
diffuse color is same with color(Color c) |
void |
diffuse(IColor c)
|
void |
disableLight()
|
void |
draw(java.util.ArrayList<IGraphicI> objects,
IView v)
|
void |
drawBG(javax.media.opengl.GL gl,
IView v)
|
void |
drawLineLoop(IVec[] p)
|
void |
drawLines(IVec[] p)
|
void |
drawLineStrip(IVec[] p)
|
void |
drawPoint(IVec p)
|
void |
drawPoints(IVec[] p)
|
void |
drawPolygon(IVec[] pts)
|
void |
drawPolygon(IVec[] pts,
IVec[] nml)
|
void |
drawQuadMatrix(IVec[][] pts)
|
void |
drawQuadMatrix(IVec[][] pts,
IVec[][] nml)
|
void |
drawQuads(IVec[] pts)
|
void |
drawQuads(IVec[] pts,
IVec[] nml)
|
void |
drawQuadStrip(IVec[] pts)
|
void |
drawQuadStrip(IVec[] pts,
IVec[] nml)
|
void |
drawTriangleFan(IVec[] pts)
|
void |
drawTriangleFan(IVec[] pts,
IVec[] nml)
|
void |
drawTriangles(IVec[] pts)
|
void |
drawTriangles(IVec[] pts,
IVec[] nml)
|
void |
drawTriangleStrip(IVec[] pts)
|
void |
drawTriangleStrip(IVec[] pts,
IVec[] nml)
|
void |
drawView(IView view)
|
void |
emissive(float[] rgba)
|
void |
emissive(float r,
float g,
float b)
|
void |
emissive(float r,
float g,
float b,
float a)
|
void |
emissive(IColor c)
|
void |
enableLight()
|
boolean |
firstDraw()
check if this is the first time frame to draw |
void |
firstDraw(boolean f)
set the first draw flag |
javax.media.opengl.GL |
getGL()
|
javax.media.opengl.GL2 |
getGL2()
|
java.awt.Graphics2D |
getGraphics()
|
void |
pointSize(float sz)
|
void |
setGL(javax.media.opengl.GL gl)
|
void |
setGraphics(java.awt.Graphics2D g)
|
void |
shininess(float s)
|
void |
specular(float[] rgba)
|
void |
specular(float r,
float g,
float b)
|
void |
specular(float r,
float g,
float b,
float a)
|
void |
specular(IColor c)
|
void |
stroke(float[] rgba)
stroke color (array of 4 float in order of r, g, b, a) |
void |
stroke(float red,
float green,
float blue)
stroke color (float 0-255) |
void |
stroke(float red,
float green,
float blue,
float alpha)
stroke color (float 0-255) |
void |
stroke(IColor c)
in GL, stroke color and fill color use both same glColor |
IGraphicMode.GraphicType |
type()
|
IView |
view()
|
void |
weight(double w)
|
void |
weight(float w)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static float[] defaultGLLightPosition
public static float[] defaultGLAmbientLight
public static float[] defaultGLDiffuseLight
public static float[] defaultGLSpecularLight
public static boolean defaultGLTwoSidedLighting
public javax.media.opengl.GL gl
public javax.media.opengl.GL2 gl2
public java.awt.Graphics2D g
public IView view
public double[][][] bgColor
public boolean firstDraw
Constructor Detail |
---|
public IGraphicsGL2()
Method Detail |
---|
public IView view()
view
in interface IGraphics
public void setGL(javax.media.opengl.GL gl)
setGL
in interface IGraphicsGL
public void setGraphics(java.awt.Graphics2D g)
public javax.media.opengl.GL getGL()
getGL
in interface IGraphicsGL
public javax.media.opengl.GL2 getGL2()
public java.awt.Graphics2D getGraphics()
public IGraphicMode.GraphicType type()
type
in interface IGraphics
public void drawBG(javax.media.opengl.GL gl, IView v)
public void drawView(IView view)
public void draw(java.util.ArrayList<IGraphicI> objects, IView v)
draw
in interface IGraphics
public boolean firstDraw()
IGraphics
firstDraw
in interface IGraphics
public void firstDraw(boolean f)
IGraphics
firstDraw
in interface IGraphics
public void clr(IColor c)
IGraphics
clr
in interface IGraphics
public void clr(float[] rgba)
IGraphics
clr
in interface IGraphics
public void clr(float red, float green, float blue, float alpha)
IGraphics
clr
in interface IGraphics
public void clr(float red, float green, float blue)
IGraphics
clr
in interface IGraphics
public void stroke(IColor c)
stroke
in interface IGraphics
public void stroke(float[] rgba)
IGraphics
stroke
in interface IGraphics
public void stroke(float red, float green, float blue, float alpha)
IGraphics
stroke
in interface IGraphics
public void stroke(float red, float green, float blue)
IGraphics
stroke
in interface IGraphics
public void weight(double w)
public void weight(float w)
weight
in interface IGraphics
public void diffuse(float[] rgba)
diffuse
in interface IGraphics3D
public void diffuse(float r, float g, float b, float a)
IGraphics3D
diffuse
in interface IGraphics3D
public void diffuse(float r, float g, float b)
diffuse
in interface IGraphics3D
public void diffuse(IColor c)
diffuse
in interface IGraphics3D
public void ambient(float[] rgba)
ambient
in interface IGraphics3D
public void ambient(float r, float g, float b, float a)
ambient
in interface IGraphics3D
public void ambient(float r, float g, float b)
ambient
in interface IGraphics3D
public void ambient(IColor c)
ambient
in interface IGraphics3D
public void specular(float[] rgba)
specular
in interface IGraphics3D
public void specular(float r, float g, float b, float a)
specular
in interface IGraphics3D
public void specular(float r, float g, float b)
specular
in interface IGraphics3D
public void specular(IColor c)
specular
in interface IGraphics3D
public void emissive(float[] rgba)
emissive
in interface IGraphics3D
public void emissive(float r, float g, float b, float a)
emissive
in interface IGraphics3D
public void emissive(float r, float g, float b)
emissive
in interface IGraphics3D
public void emissive(IColor c)
emissive
in interface IGraphics3D
public void shininess(float s)
shininess
in interface IGraphics3D
public void enableLight()
enableLight
in interface IGraphics3D
public void disableLight()
disableLight
in interface IGraphics3D
public void pointSize(float sz)
pointSize
in interface IGraphics3D
public void drawPoint(IVec p)
drawPoint
in interface IGraphics3D
public void drawPoints(IVec[] p)
drawPoints
in interface IGraphics3D
public void drawLines(IVec[] p)
drawLines
in interface IGraphics3D
public void drawLineStrip(IVec[] p)
drawLineStrip
in interface IGraphics3D
public void drawLineLoop(IVec[] p)
drawLineLoop
in interface IGraphics3D
public void drawPolygon(IVec[] pts, IVec[] nml)
drawPolygon
in interface IGraphics3D
public void drawPolygon(IVec[] pts)
drawPolygon
in interface IGraphics3D
public void drawQuads(IVec[] pts)
drawQuads
in interface IGraphics3D
public void drawQuads(IVec[] pts, IVec[] nml)
drawQuads
in interface IGraphics3D
public void drawQuadStrip(IVec[] pts)
drawQuadStrip
in interface IGraphics3D
public void drawQuadStrip(IVec[] pts, IVec[] nml)
drawQuadStrip
in interface IGraphics3D
public void drawQuadMatrix(IVec[][] pts)
drawQuadMatrix
in interface IGraphics3D
public void drawQuadMatrix(IVec[][] pts, IVec[][] nml)
drawQuadMatrix
in interface IGraphics3D
public void drawTriangles(IVec[] pts, IVec[] nml)
drawTriangles
in interface IGraphics3D
public void drawTriangles(IVec[] pts)
drawTriangles
in interface IGraphics3D
public void drawTriangleStrip(IVec[] pts, IVec[] nml)
drawTriangleStrip
in interface IGraphics3D
public void drawTriangleStrip(IVec[] pts)
drawTriangleStrip
in interface IGraphics3D
public void drawTriangleFan(IVec[] pts, IVec[] nml)
drawTriangleFan
in interface IGraphics3D
public void drawTriangleFan(IVec[] pts)
drawTriangleFan
in interface IGraphics3D
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |