Advertisement
Guest User

Untitled

a guest
Nov 26th, 2012
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. package com.example.dipl_stickman_dirt_jumping;
  2.  
  3. import java.util.Vector;
  4.  
  5. import javax.microedition.khronos.opengles.GL10;
  6.  
  7. public class Group extends Mesh{
  8. private Vector<Mesh> children = new Vector<Mesh>();
  9.  
  10. @Override
  11. public void draw(GL10 gl)
  12. {
  13. for(int i = 0;i < children.size();i++)
  14. {
  15. children.get(i).draw(gl);
  16. }
  17. }
  18.  
  19. public void add(int location,Mesh object)
  20. {
  21. children.add(location, object);
  22. }
  23.  
  24. public boolean add(Mesh object)
  25. {
  26. return children.add(object);
  27. }
  28.  
  29. public void clear()
  30. {
  31. children.clear();
  32. }
  33.  
  34. public Mesh get(int location)
  35. {
  36. return children.get(location);
  37. }
  38.  
  39. public Mesh remove(int location)
  40. {
  41. return children.remove(location);
  42. }
  43.  
  44. public boolean remove(Object object)
  45. {
  46. return children.remove(object);
  47. }
  48.  
  49. public int soze()
  50. {
  51. return children.size();
  52. }
  53.  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement