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.

76 lines
1.7 KiB

  1. //-----------------------------------------------------------------------------
  2. // File: nstate.h
  3. //
  4. // Desc: NORMAL_STATE
  5. //
  6. // Copyright (c) 1994-2000 Microsoft Corporation
  7. //-----------------------------------------------------------------------------
  8. #ifndef __nstate_h__
  9. #define __nstate_h__
  10. #define NORMAL_PIPE_COUNT 5
  11. #define NORMAL_TEX_PIPE_COUNT 3
  12. #define NUM_JOINT_STYLES 3
  13. // styles for pipe joints
  14. enum
  15. {
  16. ELBOWS = 0,
  17. BALLS,
  18. EITHER
  19. };
  20. // joint types
  21. enum
  22. {
  23. ELBOW_JOINT = 0,
  24. BALL_JOINT
  25. };
  26. // shchemes for choosing directions
  27. enum
  28. {
  29. NORMAL_SCHEME_CHOOSE_DIR_RANDOM,
  30. NORMAL_SCHEME_CHOOSE_DIR_TURN,
  31. NORMAL_SCHEME_CHOOSE_DIR_STRAIGHT
  32. };
  33. // this used for traditional pipe drawing
  34. class PIPE_OBJECT;
  35. class ELBOW_OBJECT;
  36. class SPHERE_OBJECT;
  37. class BALLJOINT_OBJECT;
  38. class STATE;
  39. //-----------------------------------------------------------------------------
  40. // Name:
  41. // Desc:
  42. //-----------------------------------------------------------------------------
  43. class NORMAL_STATE
  44. {
  45. public:
  46. int m_jointStyle;
  47. int m_bCycleJointStyles;
  48. IDirect3DDevice8* m_pd3dDevice;
  49. PIPE_OBJECT* m_pShortPipe;
  50. PIPE_OBJECT* m_pLongPipe;
  51. ELBOW_OBJECT* m_pElbows[4];
  52. SPHERE_OBJECT* m_pBallCap;
  53. SPHERE_OBJECT* m_pBigBall;
  54. BALLJOINT_OBJECT* m_pBallJoints[4];
  55. NORMAL_STATE( STATE *pState );
  56. ~NORMAL_STATE();
  57. void Reset();
  58. void BuildObjects( float radius, float divSize, int nSlices,
  59. BOOL bTexture, IPOINT2D *pTexRep );
  60. int ChooseJointType();
  61. };
  62. #endif // __nstate_h__