Class PanamaGLU
java.lang.Object
org.jzy3d.painters.PanamaGLU
The GLU functions emitting OpenGL commands, implemented in Java on top of the given
GL,
as JOGL does.
Native GLU libraries (glu32.dll, libGLU) issue their OpenGL commands through the OpenGL library
they are linked to, which is not always the one holding the current context : on Windows,
glu32.dll calls the system opengl32.dll even when another OpenGL implementation (e.g. Mesa) was
loaded, and then draws nothing. Implementing these functions with the GL instance of the painter
avoids this, and the need of a GLU library to render.
Quadrics are drawn as the default GLU quadric does : filled, with smooth normals pointing
outside, without texture coordinates.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static double[]cross(double[] a, double[] b) static voidcylinder(panamagl.opengl.GL gl, double base, double top, double height, int slices, int stacks) As gluCylinder : a cylinder along Z from 0 to height, with the base radius at Z=0 and the top radius at Z=height, without caps.static voiddisk(panamagl.opengl.GL gl, double inner, double outer, int slices, int loops) As gluDisk : a disk in the Z=0 plane, facing +Z, with a hole of the inner radius.static voidlookAt(panamagl.opengl.GL gl, double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) As gluLookAt : a viewing transformation from the eye to the center, with the up direction.protected static double[]normalize(double... v) static voidortho2D(panamagl.opengl.GL gl, double left, double right, double bottom, double top) As gluOrtho2D : an orthographic projection with near and far planes at -1 and 1.static voidperspective(panamagl.opengl.GL gl, double fovy, double aspect, double zNear, double zFar) As gluPerspective : a perspective projection with a vertical field of view in degrees.static voidpickMatrix(panamagl.opengl.GL gl, double x, double y, double deltaX, double deltaY, int[] viewport, int viewportOffset) As gluPickMatrix : restrict drawing to a region of the viewport, centered at x,y.static voidsphere(panamagl.opengl.GL gl, double radius, int slices, int stacks) As gluSphere : a sphere centered at the origin, its axis along Z.protected static voidsphereVertex(panamagl.opengl.GL gl, double radius, double rho, double theta)
-
Constructor Details
-
PanamaGLU
public PanamaGLU()
-
-
Method Details
-
ortho2D
public static void ortho2D(panamagl.opengl.GL gl, double left, double right, double bottom, double top) As gluOrtho2D : an orthographic projection with near and far planes at -1 and 1. -
perspective
public static void perspective(panamagl.opengl.GL gl, double fovy, double aspect, double zNear, double zFar) As gluPerspective : a perspective projection with a vertical field of view in degrees. -
lookAt
public static void lookAt(panamagl.opengl.GL gl, double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) As gluLookAt : a viewing transformation from the eye to the center, with the up direction. -
pickMatrix
public static void pickMatrix(panamagl.opengl.GL gl, double x, double y, double deltaX, double deltaY, int[] viewport, int viewportOffset) As gluPickMatrix : restrict drawing to a region of the viewport, centered at x,y. -
sphere
public static void sphere(panamagl.opengl.GL gl, double radius, int slices, int stacks) As gluSphere : a sphere centered at the origin, its axis along Z. -
sphereVertex
protected static void sphereVertex(panamagl.opengl.GL gl, double radius, double rho, double theta) -
disk
public static void disk(panamagl.opengl.GL gl, double inner, double outer, int slices, int loops) As gluDisk : a disk in the Z=0 plane, facing +Z, with a hole of the inner radius. -
cylinder
public static void cylinder(panamagl.opengl.GL gl, double base, double top, double height, int slices, int stacks) As gluCylinder : a cylinder along Z from 0 to height, with the base radius at Z=0 and the top radius at Z=height, without caps. -
cross
protected static double[] cross(double[] a, double[] b) -
normalize
protected static double[] normalize(double... v)
-