com.hardcorepawn
Class SuperPoint

java.lang.Object
  extended by com.hardcorepawn.SuperPoint

public class SuperPoint
extends java.lang.Object

This class allows you to create a large number of points in OPENGL mode in processing.

Author:
JohnG

Constructor Summary
SuperPoint(processing.core.PApplet p)
          Create a new SuperPoint object like:
 
Method Summary
 void addPoint(float x, float y, float z, float r, float g, float b, float a)
          Add a new point to the list.
 void draw(float size)
          Draws the points.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SuperPoint

public SuperPoint(processing.core.PApplet p)
Create a new SuperPoint object like:
SuperPoint p;
 void setup()
 {
   //size etc...
   p=new SuperPoint(this);
 }

Parameters:
p -
Method Detail

addPoint

public void addPoint(float x,
                     float y,
                     float z,
                     float r,
                     float g,
                     float b,
                     float a)
Add a new point to the list. The red/green/blue/alpha values should be between 0 and 1, not 0 and 255.


draw

public void draw(float size)
Draws the points. Do not call beginGL() before calling this. You may want to use: ((PGraphicsOpenGL)g).gl.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE); and/or ((PGraphicsOpenGL)g).gl.glDisable(GL.GL_DEPTH_TEST); before calling this to get the points to blend properly.

Parameters:
size - - the size of the points. Note some OpenGL implementations don't support large sizes.