particle_system/Point.pde

33 lines
477 B
Plaintext

public class Point
{
public int x;
public int y;
public int r;
public int g;
public int b;
public int col;
Point(int in_x, int in_y, int c)
{
x = in_x;
y = in_y;
r = (c >> 16) & 0xFF;
g = (c >> 8) & 0xFF;
b = (c >> 0) & 0xFF;
col = c;
}
Point(int in_x, int in_y, int col_r, int col_g, int col_b)
{
x = in_x;
y = in_y;
r = col_r & 0xFF;
g = col_g & 0xFF;
b = col_b & 0xFF;
col = (r & 0xFF) << 16| ((g & 0xFF) << 8) | ((b & 0xFF));
}
}