Transform.cs 525 B

123456789101112131415161718192021222324252627282930
  1. // $Id$
  2. using System;
  3. using DataStructures;
  4. using OpenGl;
  5. namespace SceneGraph
  6. {
  7. /// <summary>
  8. /// A scene graph node which applies a transform to the current opengl
  9. /// transform (the matrix will be multiplied with the currently active
  10. /// tranform)
  11. /// </summary>
  12. public sealed class Transform : NodeWithChilds
  13. {
  14. public Matrix Matrix;
  15. public override unsafe void Draw(Gdk.Rectangle cliprect)
  16. {
  17. gl.PushMatrix();
  18. gl.MultMatrixf(Matrix.Elements);
  19. DrawChilds(cliprect);
  20. gl.PopMatrix();
  21. }
  22. }
  23. }