home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / VPR_DATA / DOGA / SOURCES / MEDIT.LZH / POSE.H < prev    next >
C/C++ Source or Header  |  1995-08-01  |  707b  |  43 lines

  1. #ifndef _POSE_
  2. #define _POSE_
  3.  
  4. class Vector;
  5. class Matrix;
  6. class Bezier;
  7. class Motion;
  8.  
  9. enum DirType {
  10.     DirInit,       // 向きの初期化
  11.     DirNone,       // 無指定
  12.     DirForward,    // 進行方向
  13.     DirTarget,    //
  14.     DirLinear   // 直線補間
  15. };
  16.  
  17. enum ScaleType {
  18.     ScaleInit,
  19.     ScaleNone,
  20.     ScaleLinear
  21. };
  22.  
  23. class Pose {
  24. public:
  25.     Vector position;
  26.     Vector rotation;
  27.     Vector scale;
  28.     double posrate;
  29.     DirType dirtype;
  30.     ScaleType scaletype;
  31.     int rotationcount;
  32.     Motion *target;
  33.     Pose();
  34.     ~Pose();
  35.     void SetRotation(Matrix &m) {rotation=m.GetRotation();}
  36.     Matrix GetRotation(void) {return Matrix(1)
  37.                                         .rotz(rotation.z)
  38.                                         .roty(rotation.y)
  39.                                         .rotx(rotation.x);}
  40. };
  41.  
  42. #endif
  43.