home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / VPR_DATA / DOGA / SOURCES / MEDIT.LZH / DISPLAY.H < prev    next >
C/C++ Source or Header  |  1995-10-06  |  3KB  |  104 lines

  1. #if !defined(__display_h)              // 番兵。まだインクルードされていない場合にのみ,このファイルを使用
  2. #define __display_h
  3.  
  4. /*  Project medit
  5.     Project Team DoGA
  6.     Copyright (c) 1995. All Rights Reserved.
  7.  
  8.     サブシステム:    medit.apx Application
  9.     ファイル:        display.h
  10.     作成者:          Taka2
  11.  
  12.  
  13.     概要
  14.     ====
  15.     TWinDisplay (TWindow) 用のクラス定義
  16. */
  17.  
  18. #include <owl\owlpch.h>
  19. #pragma hdrstop
  20.  
  21. #include <owl\window.h>
  22.  
  23. #include "meditapp.rh"            // すべてのリソースの定義
  24. #include "matrix.h"
  25. #include "anim.h"
  26. const int MaxMarkers = 20;
  27. class AnimationData;
  28. class Bezier;
  29. class Motion;
  30. enum SelectType;
  31.  
  32.  
  33. //{{TWindow = TWinDisplay}}
  34. class TWinDisplay : public TWindow {
  35.  
  36.     AnimationData *anim;
  37.     SelectType type;
  38.     Matrix convmatrix;
  39.  
  40.     TPoint markerpoint[MaxMarkers];
  41.     SelectType markertype[MaxMarkers];
  42.     int markers;
  43. public:
  44.     TWinDisplay(TWindow* parent, AnimationData *a, SelectType sel, int x, int y, int w, int h);
  45.     virtual ~TWinDisplay();
  46.  
  47.     void ShowCube(Matrix& m, int flag, SelectType t);
  48.     void ShowCamera(Matrix& m, int flag);
  49.     void ShowLight(Vector& vec, int flag);
  50.     void DrawBezier(Bezier *bezier);
  51.  
  52.     void Redraw(void);
  53.     void ShowMotion(TDC& dc, Motion *m);
  54.     void ShowBezier(TDC& dc, Motion *m, int flag);
  55.     void ShowMarker(TDC& dc, Motion *m);
  56.     void ShowMesh(TDC& dc);
  57.  
  58.     Matrix GetMatrix(void);
  59.     Matrix GetInvMatrix(void);
  60.  
  61. private:
  62.     void Set4Marker(SelectType type, TPoint& pc, TPoint& p1, TPoint& p2);
  63.     void Set5Marker(SelectType t1, SelectType t2, SelectType t3, TPoint& pc, TPoint& p1, TPoint& p2, TPoint& p3);
  64.     void Set9Marker(SelectType t, TPoint& pc, TPoint& p1, TPoint& p2, TPoint& p3);
  65.     void DrawMarker(TDC& dc);
  66.  
  67.     void OpCubeBegin(UINT modKeys, TPoint& point);
  68.     void OpCubeDrag(UINT modKeys, TPoint& point, Vector& v);
  69.     void OpCubeEnd(UINT modKeys, TPoint& point, Vector& v);
  70.  
  71.     void OpBezierBegin(UINT modKeys, TPoint& point);
  72.     void OpBezierDrag(UINT modKeys, TPoint& point, Vector& v);
  73.     void OpBezierEnd(UINT modKeys, TPoint& point, Vector& v);
  74.  
  75.     void OpZoomBegin(UINT modKeys, TPoint& point);
  76.  
  77.     void OpLightBegin(UINT modKeys, TPoint& point);
  78.     void OpLightDrag(UINT modKeys, TPoint& point, Vector& v);
  79.     void OpLightEnd(UINT modKeys, TPoint& point, Vector& v);
  80.  
  81.     void OpSelectMotion(UINT modKeys, TPoint& point, Vector& v);
  82.     void OpSelectMotionAndDrag(UINT modKeys, TPoint& point, Vector& v);
  83.     int GetPositionDistance(Motion *motion, TPoint &point);
  84.     void DisplayCursorObject(UINT /*modKeys*/, TPoint& point);
  85.  
  86.  
  87. //{{TWinDisplayVIRTUAL_BEGIN}}
  88. public:
  89.     virtual void Paint (TDC& dc, BOOL erase, TRect& rect);
  90. //{{TWinDisplayVIRTUAL_END}}
  91.  
  92. //{{TWinDisplayRSP_TBL_BEGIN}}
  93. protected:
  94.     void EvLButtonDown (UINT modKeys, TPoint& point);
  95.     void EvMouseMove (UINT modKeys, TPoint& point);
  96.     void EvLButtonUp (UINT modKeys, TPoint& point);
  97.     void EvRButtonDown (UINT modKeys, TPoint& point);
  98. //{{TWinDisplayRSP_TBL_END}}
  99. DECLARE_RESPONSE_TABLE(TWinDisplay);
  100. };    //{{TWinDisplay}}
  101.  
  102. #endif                                      // __display_h の番兵
  103.  
  104.