home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / VPR_DATA / DOGA / SOURCES / WIREVIEW.LZH / ANIM.H < prev    next >
C/C++ Source or Header  |  1995-12-20  |  2KB  |  81 lines

  1. #ifndef _ANIM_
  2. #define _ANIM_
  3. #include "matrix.h"
  4.  
  5. static const int markersize = 4;
  6.  
  7. static const int filenamedirlength = 128;
  8. static const int filenamebodylength = 32;
  9.  
  10. static const int buttons = 4;
  11.  
  12. enum OperationStatus { OpPlay, OpPause};
  13. enum PlayMode {PmTimer, PmLoop, PmLoad};
  14. class TWinFrame;
  15. class TWinView;
  16. class TBmpButton;
  17. class THSlider;
  18. class Motion;
  19. class CameraMotion;
  20. class Mechanic;
  21. class Bezier;
  22. class PolyData;
  23.  
  24. struct LineSegment {
  25.     short x1, y1;
  26.     short x2, y2;
  27. };
  28.  
  29. struct WireFrame {
  30.     LineSegment *line;
  31.     int lines;
  32. };
  33.  
  34.  
  35. class AnimationData {
  36. public:
  37.     TWinFrame *Frame;
  38.     TWinView *PersView;
  39.     TBmpButton *button[4];
  40.     THSlider *frameCounter;
  41.  
  42.     char filedir[filenamedirlength];
  43.     char filename[filenamebodylength];
  44.  
  45.     OperationStatus opstat;
  46.     PlayMode playmode;
  47.     WireFrame *wireframe;
  48.  
  49.     Motion *motion;
  50.     CameraMotion *camera;
  51.  
  52.     int maxframe;
  53.     int selectframe;
  54.     Matrix viewmat;
  55.  
  56.     int animateflag;
  57.  
  58.     AnimationData();
  59.  
  60.     void CalcViewMatrix(void);
  61.     void CalcView(Motion *mot);
  62.     void CalcViewAll(void);
  63.  
  64.     void ReadFile(char *filename);
  65.     void InitMotion(void);
  66.     void NewFile(void);
  67.     int GetMotionName(char *filename);
  68.  
  69.     void SetCaption(void);
  70.     void SelectFrame(int frame);
  71.  
  72.     int GetLines(int frame, LineSegment *line);
  73.     int GetLinesNoBackFace(int frame, LineSegment **line, PolyData *polydata);
  74.  
  75.     void BuildWireFrame(int frame);
  76.     void FreeWireFrame(void);
  77.     void Resize(int x, int y, int ox, int oy);
  78. };
  79.  
  80. #endif
  81.