home *** CD-ROM | disk | FTP | other *** search
/ Gambler 19 / GAMBLERCD19.BIN / UTILS / RIVA128 / Uzytki / ssystem-1.2 / SOURCE / PLANETS.H < prev    next >
C/C++ Source or Header  |  1998-05-01  |  2KB  |  82 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4. #include <GL/glut.h>
  5.  
  6.  
  7. #define NUMSTARS 3141 /* 3141 for full star catalog, decrease number for better
  8.             performance, first N brighter stars are used */
  9.  
  10. #define NUMBODIES 22
  11.  
  12. #ifndef PI
  13. #define PI 3.14159265358979323846
  14. #endif
  15.  
  16. #define DATEOFELEMENTS 2450680.5 /* In Julian days */
  17.  
  18. #define RADIUSSCALE(x) ((x)*0.001)
  19. #define DEG2RAD(x) ((x)*PI/180.0)
  20. #define RAD2DEG(x) ((x)*180.0/PI)
  21. #define DISTCORRECTION(x) ((x)*1.490)
  22. #define DISTANCE(x,y,z) sqrt(x*x+y*y+z*z)
  23.  
  24.  
  25. extern GLfloat LightPos[4];
  26. extern GLfloat ambient[4];
  27. extern GLfloat White[4];
  28. extern GLfloat Black[4];
  29. extern GLuint texName[NUMBODIES],texture,smodel,lighting,drawstars;
  30. extern GLuint Stars,red,polaris;
  31. extern int ImgWidth, ImgHeight;
  32. extern GLenum ImgFormat;
  33. extern GLfloat stars[NUMSTARS][4];
  34. extern double days,timefactor;
  35. extern char texturepath[100];
  36. extern int SLICES,STACKS;
  37.  
  38. #define    SUN    0
  39. #define    MERCURY    1
  40. #define    VENUS    2
  41. #define    EARTH    3
  42. #define    MARS    4
  43. #define    JUPITER    5
  44. #define    SATURN    6
  45. #define    URANUS    7
  46. #define    NEPTUNE    8
  47. #define    PLUTO    9
  48. #define MOON    10
  49. #define IO    11
  50. #define EUROPA    12
  51. #define GANYMEDE 13
  52. #define CALLISTO 14
  53. #define TETHYS    15
  54. #define DIONE    16
  55. #define RHEA    17
  56. #define TITAN     18
  57. #define TRITON  19
  58. #define CHARON  20
  59. #define RINGS    21
  60.  
  61.  
  62. typedef struct {
  63.     char Name[20];
  64.     GLUquadricObj *Object;
  65.     GLuint Sphere;
  66.     GLubyte *Image;
  67.     int Sat;
  68.     float DeltaRotation,Radius,Rotation,Degrees;
  69.     float Inclination,AscendingNode,Perihelion,MeanDistance,DailyMotion;
  70.     float Eccentricity,MeanLongitude;
  71.     double posx,posy,posz;
  72. } planetdata;
  73.  
  74.  
  75. extern planetdata planets[NUMBODIES];
  76.     
  77.     
  78.  
  79. void Init(void);
  80. void UpdatePositions(void);
  81.  
  82.