Package org.jzy3d.painters
Class PanamaGLPainter
java.lang.Object
org.jzy3d.painters.AbstractPainter
org.jzy3d.painters.PanamaGLPainter
- All Implemented Interfaces:
org.jzy3d.painters.IPainter
public class PanamaGLPainter
extends org.jzy3d.painters.AbstractPainter
PanamaGLPainter
relies on preview features of the Java platform:
PanamaGLPainter
refers to one or more preview APIs:MemorySegment
,MemorySession
,SegmentAllocator
.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
-
Field Summary
Modifier and TypeFieldDescriptionprotected SegmentAllocatorPREVIEW
protected GLContext
protected GL
static final int
static final int
protected MemorySessionPREVIEW
Fields inherited from class org.jzy3d.painters.AbstractPainter
camera, canvas, os, view
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionalloc
(double[] value) alloc
(float[] value) alloc
(int[] value) alloc
(DoubleBuffer value) alloc
(FloatBuffer value) int
clipPlaneId
(int id) Return the GL clip plane ID according to an ID in [0;5]void
configureGL
(org.jzy3d.plot3d.rendering.canvas.Quality quality) protected double[]
dbl
(float[] values) void
drawImage
(ByteBuffer imageBuffer, int imageWidth, int imageHeight, org.jzy3d.maths.Coord2d pixelZoom, org.jzy3d.maths.Coord3d imagePosition) A very failing implementation.void
drawText
(org.jzy3d.painters.Font font, String label, org.jzy3d.maths.Coord3d position, org.jzy3d.colors.Color color, float rotation) getGL()
double[]
float[]
double[]
float[]
getScope()
int
getTextLengthInPixels
(int font, String string) int
getTextLengthInPixels
(org.jzy3d.painters.Font font, String string) Text length processing based on AWTFontMetrics
obtained by retrieving the graphic context of the GLCanvas.int[]
void
glBegin
(int type) void
void
void
void
void
void
void
void
glBitmap
(int width, int height, float xorig, float yorig, float xmove, float ymove, byte[] bitmap, int bitmap_offset) void
glBlendFunc
(int sfactor, int dfactor) void
glCallList
(int list) void
glClear
(int mask) void
glClearColor
(float red, float green, float blue, float alpha) void
void
glClearDepth
(double d) void
glClearStencil
(int s) void
glClipPlane
(int plane, double[] equation) void
glColor3f
(float r, float g, float b) void
glColor4f
(float r, float g, float b, float a) void
glCullFace
(int mode) void
void
glDeleteLists
(int list, int range) void
glDepthFunc
(int func) void
glDepthFunc
(org.jzy3d.painters.DepthFunc func) void
glDepthRangef
(float near, float far) void
glDisable
(int type) void
void
glDisable_ClipPlane
(int plane) void
void
void
glDisable_Light
(int light) void
void
void
void
void
void
glDrawPixels
(int width, int height, int format, int type, Buffer pixels) Warning, duplicate pixel buffer!!void
glEnable
(int type) void
void
glEnable_ClipPlane
(int plane) void
void
void
void
glEnable_Light
(int light) void
void
void
void
void
void
void
glEnd()
void
void
glEvalCoord2f
(float u, float v) void
glFeedbackBuffer
(int size, int type, FloatBuffer buffer) void
glFlush()
void
glFrontFace
(int mode) void
void
glFrustum
(double left, double right, double bottom, double top, double zNear, double zFar) int
glGenLists
(int range) void
glGetDoublev
(int pname, double[] params, int params_offset) void
glGetFloatv
(int pname, float[] data, int data_offset) void
glGetIntegerv
(int pname, int[] data, int data_offset) glGetString
(int stringID) void
glHint
(int target, int mode) void
void
boolean
glIsList
(int list) void
glLight_Ambiant
(int lightId, org.jzy3d.colors.Color ambiantColor) void
glLight_Diffuse
(int lightId, org.jzy3d.colors.Color diffuseColor) void
glLight_Position
(int lightId, float[] positionZero) void
glLight_Shininess
(int lightId, float value) void
glLight_Specular
(int lightId, org.jzy3d.colors.Color specularColor) void
glLightf
(int light, int pname, float value) void
glLightf
(int light, org.jzy3d.plot3d.rendering.lights.Attenuation.Type attenuationType, float value) void
glLightfv
(int light, int pname, float[] params, int params_offset) void
glLightModel
(org.jzy3d.plot3d.rendering.lights.LightModel model, boolean value) void
glLightModel
(org.jzy3d.plot3d.rendering.lights.LightModel model, org.jzy3d.colors.Color color) void
glLightModelfv
(int mode, float[] value) void
glLightModeli
(int mode, int value) void
glLineStipple
(int factor, short pattern) void
glLineWidth
(float width) void
void
glLoadName
(int name) void
glMap2f
(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points) void
glMaterial
(org.jzy3d.plot3d.rendering.lights.MaterialProperty material, float[] color, boolean isFront) void
glMaterial
(org.jzy3d.plot3d.rendering.lights.MaterialProperty material, org.jzy3d.colors.Color color, boolean isFront) void
glMaterialfv
(int face, int pname, float[] params, int params_offset) void
glMatrixMode
(int mode) void
void
void
glNewList
(int list, int mode) void
glNewList
(int list, org.jzy3d.painters.ListMode mode) void
glNormal3f
(float nx, float ny, float nz) void
glOrtho
(double left, double right, double bottom, double top, double near_val, double far_val) void
glPassThrough
(float token) void
glPixelStore
(org.jzy3d.painters.PixelStore store, int param) void
glPixelStorei
(int pname, int param) void
glPixelZoom
(float xfactor, float yfactor) glPixelZoom is not implemented by GL.void
glPointSize
(float width) void
glPolygonMode
(int frontOrBack, int fill) void
glPolygonMode
(org.jzy3d.plot3d.primitives.PolygonMode mode, org.jzy3d.plot3d.primitives.PolygonFill fill) void
glPolygonOffset
(float factor, float units) void
void
void
OPEN GL Interfacevoid
glPushName
(int name) void
glRasterPos3f
(float x, float y, float z) int
glRenderMode
(int mode) int
glRenderMode
(org.jzy3d.painters.RenderMode mode) void
glRotatef
(float angle, float x, float y, float z) void
glScalef
(float x, float y, float z) void
glSelectBuffer
(int size, IntBuffer buffer) void
glShadeModel
(int mode) void
glShadeModel
(org.jzy3d.painters.ColorModel colorModel) void
void
void
glStencilFunc
(org.jzy3d.painters.StencilFunc func, int ref, int mask) void
glStencilMask
(int mask) void
void
void
glStencilOp
(org.jzy3d.painters.StencilOp fail, org.jzy3d.painters.StencilOp zfail, org.jzy3d.painters.StencilOp zpass) void
glTexCoord2f
(float s, float t) void
glTexEnvf
(int target, int pname, float param) void
glTexEnvi
(int target, int pname, int param) void
glTranslatef
(float x, float y, float z) void
gluCylinder
(double base, double top, double height, int slices, int stacks) void
gluDisk
(double inner, double outer, int slices, int loops) void
gluLookAt
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) void
gluOrtho2D
(double left, double right, double bottom, double top) void
gluPerspective
(double fovy, double aspect, double zNear, double zFar) void
gluPickMatrix
(double x, double y, double delX, double delY, int[] viewport, int viewport_offset) boolean
gluProject
(float objX, float objY, float objZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] winPos, int winPos_offset) void
gluSphere
(double radius, int slices, int stacks) int
glutBitmapLength
(int font, String string) Process the given font length to further process alignement.void
glutBitmapString
(int font, String string) void
glutBitmapString
(org.jzy3d.painters.Font axisFont, String label, org.jzy3d.maths.Coord3d p, org.jzy3d.colors.Color c) void
glutSolidCube
(float size) void
glutSolidSphere
(double radius, int slices, int stacks) void
glutSolidTeapot
(float scale) void
glutWireTeapot
(float scale) boolean
gluUnProject
(float winX, float winY, float winZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] objPos, int objPos_offset) void
glVertex3d
(double x, double y, double z) void
glVertex3f
(float x, float y, float z) void
glViewport
(int x, int y, int width, int height) protected int
lightId
(int id) protected int
materialProperty
(org.jzy3d.plot3d.rendering.lights.MaterialProperty material) protected int
polygonFillValue
(org.jzy3d.plot3d.primitives.PolygonFill mode) protected int
polygonModeValue
(org.jzy3d.plot3d.primitives.PolygonMode mode) void
void
void
setContext
(GLContext context) void
protected int
toInt
(org.jzy3d.painters.StencilOp fail) protected StringBuffer
version()
protected StringBuffer
version
(boolean showExtensions) Methods inherited from class org.jzy3d.painters.AbstractPainter
box, clearCache, clearColor, clip, clip, clipOff, clipOn, clipStatus, color, colorAlphaFactor, colorAlphaOverride, equation, getCamera, getCanvas, getOS, getQuality, getView, getWindowingToolkit, gluProject, gluUnProject, isJVMScaleLargerThanNativeScale, isJVMScaleLargerThanNativeScale, material, modelToScreen, modelToScreen, modelToScreen, modelToScreen, modelToScreen, modelToScreen, modelToScreen, modelToScreen, normal, raster, screenToModel, screenToModel, setCamera, setCanvas, setView, transform, vertex, vertex, vertex
-
Field Details
-
gl
-
context
-
scope
-
allocator
-
GL_RGBA
public static final int GL_RGBA- See Also:
-
GL_UNSIGNED_BYTE
public static final int GL_UNSIGNED_BYTE- See Also:
-
-
Constructor Details
-
PanamaGLPainter
public PanamaGLPainter()
-
-
Method Details
-
getGL
-
setGL
-
getContext
-
setContext
-
getScope
-
getAllocator
-
alloc
-
alloc
-
alloc
-
alloc
-
alloc
-
alloc
-
alloc
-
dbl
protected double[] dbl(float[] values) -
glGetString
-
glGetIntegerv
public void glGetIntegerv(int pname, int[] data, int data_offset) -
glGetDoublev
public void glGetDoublev(int pname, double[] params, int params_offset) -
glGetFloatv
public void glGetFloatv(int pname, float[] data, int data_offset) -
version
-
version
-
acquireGL
-
releaseGL
public void releaseGL() -
configureGL
public void configureGL(org.jzy3d.plot3d.rendering.canvas.Quality quality) -
getViewPortAsInt
public int[] getViewPortAsInt() -
getProjectionAsDouble
public double[] getProjectionAsDouble() -
getProjectionAsFloat
public float[] getProjectionAsFloat() -
getModelViewAsDouble
public double[] getModelViewAsDouble() -
getModelViewAsFloat
public float[] getModelViewAsFloat() -
glPushMatrix
public void glPushMatrix()OPEN GL Interface -
glPopMatrix
public void glPopMatrix() -
glMatrixMode
public void glMatrixMode(int mode) -
glLoadIdentity
public void glLoadIdentity() -
glScalef
public void glScalef(float x, float y, float z) -
glTranslatef
public void glTranslatef(float x, float y, float z) -
glRotatef
public void glRotatef(float angle, float x, float y, float z) -
glEnable
public void glEnable(int type) -
glDisable
public void glDisable(int type) -
glPointSize
public void glPointSize(float width) -
glLineWidth
public void glLineWidth(float width) -
glBegin
public void glBegin(int type) -
glColor3f
public void glColor3f(float r, float g, float b) -
glColor4f
public void glColor4f(float r, float g, float b, float a) -
glVertex3f
public void glVertex3f(float x, float y, float z) -
glVertex3d
public void glVertex3d(double x, double y, double z) -
glEnd
public void glEnd() -
glFrontFace
public void glFrontFace(int mode) -
glCullFace
public void glCullFace(int mode) -
glPolygonMode
public void glPolygonMode(org.jzy3d.plot3d.primitives.PolygonMode mode, org.jzy3d.plot3d.primitives.PolygonFill fill) -
polygonModeValue
protected int polygonModeValue(org.jzy3d.plot3d.primitives.PolygonMode mode) -
polygonFillValue
protected int polygonFillValue(org.jzy3d.plot3d.primitives.PolygonFill mode) -
glPolygonMode
public void glPolygonMode(int frontOrBack, int fill) -
glPolygonOffset
public void glPolygonOffset(float factor, float units) -
glLineStipple
public void glLineStipple(int factor, short pattern) -
glTexCoord2f
public void glTexCoord2f(float s, float t) -
glTexEnvf
public void glTexEnvf(int target, int pname, float param) -
glTexEnvi
public void glTexEnvi(int target, int pname, int param) -
glRasterPos3f
public void glRasterPos3f(float x, float y, float z) -
glDrawPixels
Warning, duplicate pixel buffer!! -
glPixelZoom
public void glPixelZoom(float xfactor, float yfactor) glPixelZoom is not implemented by GL. This method will do nothing but triggering aNotImplementedException
in case x and y zoom factor are not both equal to 1 (i.e. in case a zoom is needed). -
glPixelStorei
public void glPixelStorei(int pname, int param) -
glPixelStore
public void glPixelStore(org.jzy3d.painters.PixelStore store, int param) -
glBitmap
public void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, byte[] bitmap, int bitmap_offset) -
drawImage
public void drawImage(ByteBuffer imageBuffer, int imageWidth, int imageHeight, org.jzy3d.maths.Coord2d pixelZoom, org.jzy3d.maths.Coord3d imagePosition) A very failing implementation. SHOULD SUPPORT AWT BufferedImage in EmulGL - or reverse converse -
glutBitmapLength
Process the given font length to further process alignement. Will only return a valid width for knownFont
(Helevetica and Times Roman). Getting text width of any string can be donegetTextLengthInPixels(Font, String)
. -
getTextLengthInPixels
-
getTextLengthInPixels
Text length processing based on AWTFontMetrics
obtained by retrieving the graphic context of the GLCanvas. In case no graphics is available -
glutBitmapString
-
drawText
public void drawText(org.jzy3d.painters.Font font, String label, org.jzy3d.maths.Coord3d position, org.jzy3d.colors.Color color, float rotation) -
glutBitmapString
public void glutBitmapString(org.jzy3d.painters.Font axisFont, String label, org.jzy3d.maths.Coord3d p, org.jzy3d.colors.Color c) -
glGenLists
public int glGenLists(int range) -
glNewList
public void glNewList(int list, int mode) -
glNewList
public void glNewList(int list, org.jzy3d.painters.ListMode mode) -
glEndList
public void glEndList() -
glCallList
public void glCallList(int list) -
glIsList
public boolean glIsList(int list) -
glDeleteLists
public void glDeleteLists(int list, int range) -
gluDisk
public void gluDisk(double inner, double outer, int slices, int loops) -
glutSolidSphere
public void glutSolidSphere(double radius, int slices, int stacks) -
glutSolidTeapot
public void glutSolidTeapot(float scale) -
glutWireTeapot
public void glutWireTeapot(float scale) -
gluSphere
public void gluSphere(double radius, int slices, int stacks) -
gluCylinder
public void gluCylinder(double base, double top, double height, int slices, int stacks) -
glutSolidCube
public void glutSolidCube(float size) -
glFeedbackBuffer
-
glRenderMode
public int glRenderMode(int mode) -
glRenderMode
public int glRenderMode(org.jzy3d.painters.RenderMode mode) -
glPassThrough
public void glPassThrough(float token) -
glStencilFunc
public void glStencilFunc(org.jzy3d.painters.StencilFunc func, int ref, int mask) -
glStencilMask
public void glStencilMask(int mask) -
glStencilMask_True
public void glStencilMask_True() -
glStencilMask_False
public void glStencilMask_False() -
glStencilOp
public void glStencilOp(org.jzy3d.painters.StencilOp fail, org.jzy3d.painters.StencilOp zfail, org.jzy3d.painters.StencilOp zpass) -
glClearStencil
public void glClearStencil(int s) -
toInt
protected int toInt(org.jzy3d.painters.StencilOp fail) -
glOrtho
public void glOrtho(double left, double right, double bottom, double top, double near_val, double far_val) -
gluOrtho2D
public void gluOrtho2D(double left, double right, double bottom, double top) -
gluPerspective
public void gluPerspective(double fovy, double aspect, double zNear, double zFar) -
glFrustum
public void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar) -
gluLookAt
public void gluLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) -
glViewport
public void glViewport(int x, int y, int width, int height) -
glClipPlane
public void glClipPlane(int plane, double[] equation) -
glEnable_ClipPlane
public void glEnable_ClipPlane(int plane) -
glDisable_ClipPlane
public void glDisable_ClipPlane(int plane) -
clipPlaneId
public int clipPlaneId(int id) Return the GL clip plane ID according to an ID in [0;5] -
gluUnProject
public boolean gluUnProject(float winX, float winY, float winZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] objPos, int objPos_offset) -
gluProject
public boolean gluProject(float objX, float objY, float objZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] winPos, int winPos_offset) -
glDepthFunc
public void glDepthFunc(int func) -
glDepthRangef
public void glDepthRangef(float near, float far) -
printGLDepthRange
public void printGLDepthRange() -
glBlendFunc
public void glBlendFunc(int sfactor, int dfactor) -
glHint
public void glHint(int target, int mode) -
glShadeModel
public void glShadeModel(org.jzy3d.painters.ColorModel colorModel) -
glShadeModel
public void glShadeModel(int mode) -
glShadeModel_Smooth
public void glShadeModel_Smooth() -
glShadeModel_Flat
public void glShadeModel_Flat() -
glMaterialfv
public void glMaterialfv(int face, int pname, float[] params, int params_offset) -
glNormal3f
public void glNormal3f(float nx, float ny, float nz) -
glLightf
public void glLightf(int light, org.jzy3d.plot3d.rendering.lights.Attenuation.Type attenuationType, float value) -
glLightf
public void glLightf(int light, int pname, float value) -
glLightfv
public void glLightfv(int light, int pname, float[] params, int params_offset) -
glLight_Position
public void glLight_Position(int lightId, float[] positionZero) -
glLight_Ambiant
public void glLight_Ambiant(int lightId, org.jzy3d.colors.Color ambiantColor) -
glLight_Diffuse
public void glLight_Diffuse(int lightId, org.jzy3d.colors.Color diffuseColor) -
glLight_Specular
public void glLight_Specular(int lightId, org.jzy3d.colors.Color specularColor) -
glLight_Shininess
public void glLight_Shininess(int lightId, float value) -
glEnable_Light
public void glEnable_Light(int light) -
glDisable_Light
public void glDisable_Light(int light) -
lightId
protected int lightId(int id) -
glLightModeli
public void glLightModeli(int mode, int value) -
glLightModelfv
public void glLightModelfv(int mode, float[] value) -
glLightModel
public void glLightModel(org.jzy3d.plot3d.rendering.lights.LightModel model, boolean value) -
glLightModel
public void glLightModel(org.jzy3d.plot3d.rendering.lights.LightModel model, org.jzy3d.colors.Color color) -
glClearColor
public void glClearColor(float red, float green, float blue, float alpha) -
glClearDepth
public void glClearDepth(double d) -
glClear
public void glClear(int mask) -
glClearColorAndDepthBuffers
public void glClearColorAndDepthBuffers() -
glInitNames
public void glInitNames() -
glLoadName
public void glLoadName(int name) -
glPushName
public void glPushName(int name) -
glPopName
public void glPopName() -
glSelectBuffer
-
gluPickMatrix
public void gluPickMatrix(double x, double y, double delX, double delY, int[] viewport, int viewport_offset) -
glFlush
public void glFlush() -
glEvalCoord2f
public void glEvalCoord2f(float u, float v) -
glMap2f
public void glMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points) -
glEnable_PolygonOffsetFill
public void glEnable_PolygonOffsetFill() -
glDisable_PolygonOffsetFill
public void glDisable_PolygonOffsetFill() -
glEnable_PolygonOffsetLine
public void glEnable_PolygonOffsetLine() -
glDisable_PolygonOffsetLine
public void glDisable_PolygonOffsetLine() -
glDisable_Lighting
public void glDisable_Lighting() -
glEnable_Lighting
public void glEnable_Lighting() -
glEnable_LineStipple
public void glEnable_LineStipple() -
glDisable_LineStipple
public void glDisable_LineStipple() -
glEnable_Blend
public void glEnable_Blend() -
glDisable_Blend
public void glDisable_Blend() -
glMatrixMode_ModelView
public void glMatrixMode_ModelView() -
glMatrixMode_Projection
public void glMatrixMode_Projection() -
glBegin_Polygon
public void glBegin_Polygon() -
glBegin_Quad
public void glBegin_Quad() -
glBegin_Triangle
public void glBegin_Triangle() -
glBegin_Point
public void glBegin_Point() -
glBegin_LineStrip
public void glBegin_LineStrip() -
glBegin_LineLoop
public void glBegin_LineLoop() -
glBegin_Line
public void glBegin_Line() -
glEnable_CullFace
public void glEnable_CullFace() -
glDisable_CullFace
public void glDisable_CullFace() -
glFrontFace_ClockWise
public void glFrontFace_ClockWise() -
glCullFace_Front
public void glCullFace_Front() -
glEnable_ColorMaterial
public void glEnable_ColorMaterial() -
glMaterial
public void glMaterial(org.jzy3d.plot3d.rendering.lights.MaterialProperty material, org.jzy3d.colors.Color color, boolean isFront) -
glMaterial
public void glMaterial(org.jzy3d.plot3d.rendering.lights.MaterialProperty material, float[] color, boolean isFront) -
materialProperty
protected int materialProperty(org.jzy3d.plot3d.rendering.lights.MaterialProperty material) -
glEnable_PointSmooth
public void glEnable_PointSmooth() -
glHint_PointSmooth_Nicest
public void glHint_PointSmooth_Nicest() -
glDepthFunc
public void glDepthFunc(org.jzy3d.painters.DepthFunc func) -
glEnable_DepthTest
public void glEnable_DepthTest() -
glDisable_DepthTest
public void glDisable_DepthTest() -
glEnable_Stencil
public void glEnable_Stencil() -
glDisable_Stencil
public void glDisable_Stencil()
-
PanamaGLPainter
when preview features are enabled.