topical media & game development
graphic-processing-algorithm-Ch03-p70-MyPoint.pde / pde
class MyPoint {
float x, y; // members of class
// Constructor
public MyPoint(float xin, float yin){
x = xin;
y = yin;
}
//Method1
public void plot(){
rect(x,y,5,5);
}
// Method2
void move(float xoff, float yoff){
x = x + xoff;
y = y + yoff;
}
}
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.