Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
962 B

  1. #ifndef TELESCOPE_H
  2. #define TELESCOPE_H
  3. class Telescope {
  4. public:
  5. Telescope(GLfloat x = 0, GLfloat y = 0);
  6. ~Telescope();
  7. /* This draws the "outside" of the telescope - the fov and aspect are
  8. * needed since it is drawn in eye coordinates */
  9. void draw_setup(GLfloat fov, GLfloat aspect = 1.0, int perspective = 1);
  10. void draw_fake();
  11. void draw_body();
  12. void draw_takedown();
  13. /* This just draws the lens - usually it will be used to draw the lens
  14. * into the stencil buffer */
  15. void draw_lens();
  16. /* How finally to divide things as we're drawing */
  17. void set_divisions(int d);
  18. int get_divisions();
  19. /* This is the radius of the lens - the rest of the dimensions depend
  20. * upon it */
  21. void set_radius(GLfloat r);
  22. GLfloat get_radius();
  23. /* Positions are in eye coordinates and go from [0, 1] */
  24. GLfloat xpos, ypos;
  25. private:
  26. int divisions;
  27. GLfloat radius;
  28. GLUquadricObj *disk;
  29. GLUquadricObj *cylinder;
  30. };
  31. #endif