Node.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // SuperTux Editor
  2. // Copyright (C) 2006 Matthias Braun <matze@braunis.de>
  3. //
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. namespace SceneGraph
  17. {
  18. /// <summary>
  19. /// This is the basic object of a scene graph: A single node with a Draw()
  20. /// command. The nodes form a graph (in our case it's a tree). Each node
  21. /// will trigger Draw() commands on it subnodes.
  22. /// </summary>
  23. /// <remarks>
  24. /// Some introduction to scenegraphs can be found in our wiki:
  25. /// http://supertux.lethargik.org/wiki/SceneGraph
  26. /// </remarks>
  27. public interface Node
  28. {
  29. /// <summary>
  30. /// When called should draw the node
  31. /// </summary>
  32. /// <param name="cliprect">
  33. /// The area that is visible in the <see cref="RenderView"/>
  34. /// we are drawing to. Check with this to see if you can skip
  35. /// drawing.
  36. /// </param>
  37. void Draw(Gdk.Rectangle cliprect);
  38. }
  39. }
  40. /* EOF */