Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. // Declare and construct two objects (h1, h2) from the class HLine
  2. Vertex[] ob1 = new Vertex[1];
  3. ob1[0] = (100, 100, 0, 1);
  4. ob1[1] = (100, 100, 100, 1);
  5.  
  6. Vertex h2 = new Vertex(100, 100, 100, 1);
  7. DotRender dr = new DotRender();
  8.  
  9. void setup()
  10. {
  11. size(200, 200);//window size
  12. frameRate(30);//duh
  13. }
  14.  
  15. void draw() //every frame
  16. {
  17. background(204);
  18. dr(
  19. }
  20.  
  21.  
  22.  
  23.  
  24.  
  25. class Vertex
  26. {
  27. float xpos , ypos, zpos;
  28. int face;
  29. Vertex (float x, float y, float z, int f)
  30. {
  31. xpos = x;
  32. ypos = y;
  33. zpos = z;
  34. face = f;
  35. }
  36.  
  37. //void update()
  38. //{
  39. //perspective?
  40. //}
  41. }
  42.  
  43. class DotRender()
  44. {
  45. DotRender(Vertex[] v)
  46. {
  47. int a = v.length;
  48. }
  49. for(int i = 0; i < a; i++)
  50. {
  51. point(v[i].xpos,v[i].ypos);
  52. }
  53. }
  54.  
  55.  
  56. /*class Obj
  57. {
  58. Obj (Vertex[] v)
  59. {
  60. int a = v.length;
  61. int b;
  62. for(int i = 0; i > a; i++)
  63. {
  64. b = v.face;
  65. }
  66. }
  67. }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement