Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Declare and construct two objects (h1, h2) from the class HLine
- Vertex[] ob1 = new Vertex[1];
- ob1[0] = (100, 100, 0, 1);
- ob1[1] = (100, 100, 100, 1);
- Vertex h2 = new Vertex(100, 100, 100, 1);
- DotRender dr = new DotRender();
- void setup()
- {
- size(200, 200);//window size
- frameRate(30);//duh
- }
- void draw() //every frame
- {
- background(204);
- dr(
- }
- class Vertex
- {
- float xpos , ypos, zpos;
- int face;
- Vertex (float x, float y, float z, int f)
- {
- xpos = x;
- ypos = y;
- zpos = z;
- face = f;
- }
- //void update()
- //{
- //perspective?
- //}
- }
- class DotRender()
- {
- DotRender(Vertex[] v)
- {
- int a = v.length;
- }
- for(int i = 0; i < a; i++)
- {
- point(v[i].xpos,v[i].ypos);
- }
- }
- /*class Obj
- {
- Obj (Vertex[] v)
- {
- int a = v.length;
- int b;
- for(int i = 0; i > a; i++)
- {
- b = v.face;
- }
- }
- }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement