pslib
Class PSShapes

java.lang.Object
  extended by pslib.PSShapes

public class PSShapes
extends java.lang.Object

PSShapes Class

The PSShapes object allows a range of shapes to be rendered. All methods are static and require an OpenGL rendering context.

This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library. If not, see http://www.gnu.org/licenses/.


Constructor Summary
PSShapes()
           
 
Method Summary
static void axes(processing.opengl.PGraphicsOpenGL glc, float s)
          Render 3D axes to the specified OpenGL renderer
static void box(processing.opengl.PGraphicsOpenGL glc, float s)
          Render a 3D box to the specified OpenGL renderer
static void circle(processing.opengl.PGraphicsOpenGL glc, int seg, float rad)
          Render a circle as a 2D object to the specified rendering context
static void circle(processing.opengl.PGraphicsOpenGL glc, int seg, float rad, PSVector cpv, PSVector ctv, PSVector cuv)
          Render a circle as a 3D billboard to the specified rendering context
static void doughnut(processing.opengl.PGraphicsOpenGL glc, int seg, float rad_i, float rad_o)
          Render a doughnut as a 2D object to the specified rendering context
static void doughnut(processing.opengl.PGraphicsOpenGL glc, int seg, float rad_i, float rad_o, PSVector cpv, PSVector ctv, PSVector cuv)
          Render a doughnut as a 3D billboard to the specified rendering context
static void fan(processing.opengl.PGraphicsOpenGL glc, int seg, float rad, float spd)
          Render a fan as a 2D object to the specified rendering context
static void fan(processing.opengl.PGraphicsOpenGL glc, int seg, float rad, float spd, PSVector cpv, PSVector ctv, PSVector cuv)
          Render a fan as a 3D billboard to the specified rendering context
static void grid(processing.opengl.PGraphicsOpenGL glc, float w, float h, float xs, float ys)
          Render a grid as a 2D object to the specified OpenGL renderer
static void grid(processing.opengl.PGraphicsOpenGL glc, float w, float h, float xs, float ys, PSVector cpv, PSVector ctv, PSVector cuv)
          Render a grid as 3D billboard to the specified OpenGL renderer
static void star(processing.opengl.PGraphicsOpenGL glc, int seg, float rad_i, float rad_o)
          Render a star as a 2D object to the specified rendering context
static void star(processing.opengl.PGraphicsOpenGL glc, int seg, float rad_i, float rad_o, PSVector cpv, PSVector ctv, PSVector cuv)
          Render a star as a 3D billboard to the specified rendering context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PSShapes

public PSShapes()
Method Detail

circle

public static void circle(processing.opengl.PGraphicsOpenGL glc,
                          int seg,
                          float rad)
Render a circle as a 2D object to the specified rendering context

Parameters:
glc - OpenGL rendering context
seg - segments
rad - radius

circle

public static void circle(processing.opengl.PGraphicsOpenGL glc,
                          int seg,
                          float rad,
                          PSVector cpv,
                          PSVector ctv,
                          PSVector cuv)
Render a circle as a 3D billboard to the specified rendering context

Parameters:
glc - OpenGL rendering context
seg - segments
rad - radius
cpv - camera position vector
ctv - camera target vector
cuv - camera up vector

fan

public static void fan(processing.opengl.PGraphicsOpenGL glc,
                       int seg,
                       float rad,
                       float spd)
Render a fan as a 2D object to the specified rendering context

Parameters:
glc - OpenGL rendering context
seg - segments
rad - radius
spd - spread

fan

public static void fan(processing.opengl.PGraphicsOpenGL glc,
                       int seg,
                       float rad,
                       float spd,
                       PSVector cpv,
                       PSVector ctv,
                       PSVector cuv)
Render a fan as a 3D billboard to the specified rendering context

Parameters:
glc - OpenGL rendering context
seg - segments
rad - radius
spd - spread
cpv - camera position vector
ctv - camera target vector
cuv - camera up vector

doughnut

public static void doughnut(processing.opengl.PGraphicsOpenGL glc,
                            int seg,
                            float rad_i,
                            float rad_o)
Render a doughnut as a 2D object to the specified rendering context

Parameters:
glc - OpenGL rendering context
seg - segments
rad_i - inner radius
rad_o - outer radius

doughnut

public static void doughnut(processing.opengl.PGraphicsOpenGL glc,
                            int seg,
                            float rad_i,
                            float rad_o,
                            PSVector cpv,
                            PSVector ctv,
                            PSVector cuv)
Render a doughnut as a 3D billboard to the specified rendering context

Parameters:
glc - OpenGL rendering context
seg - segments
rad_i - inner radius
rad_o - outer radius
cpv - camera position vector
ctv - camera target vector
cuv - camera up vector

star

public static void star(processing.opengl.PGraphicsOpenGL glc,
                        int seg,
                        float rad_i,
                        float rad_o)
Render a star as a 2D object to the specified rendering context

Parameters:
glc - OpenGL rendering context
seg - segments
rad_i - inner radius
rad_o - outer radius

star

public static void star(processing.opengl.PGraphicsOpenGL glc,
                        int seg,
                        float rad_i,
                        float rad_o,
                        PSVector cpv,
                        PSVector ctv,
                        PSVector cuv)
Render a star as a 3D billboard to the specified rendering context

Parameters:
glc - OpenGL rendering context
seg - segments
rad_i - inner radius
rad_o - outer radius
cpv - camera position vector
ctv - camera target vector
cuv - camera up vector

grid

public static void grid(processing.opengl.PGraphicsOpenGL glc,
                        float w,
                        float h,
                        float xs,
                        float ys)
Render a grid as a 2D object to the specified OpenGL renderer

Parameters:
glc - OpenGL renderer
w - width
h - height
xs - horizontal spacing
ys - vertical spacing

grid

public static void grid(processing.opengl.PGraphicsOpenGL glc,
                        float w,
                        float h,
                        float xs,
                        float ys,
                        PSVector cpv,
                        PSVector ctv,
                        PSVector cuv)
Render a grid as 3D billboard to the specified OpenGL renderer

Parameters:
glc - OpenGL renderer
w - width
h - height
xs - horizontal spacing
ys - vertical spacing
cpv - camera position vector
ctv - camera target vector
cuv - camera up vector

axes

public static void axes(processing.opengl.PGraphicsOpenGL glc,
                        float s)
Render 3D axes to the specified OpenGL renderer

Parameters:
glc - OpenGL renderer
s - size

box

public static void box(processing.opengl.PGraphicsOpenGL glc,
                       float s)
Render a 3D box to the specified OpenGL renderer

Parameters:
glc - OpenGL renderer
s - size