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.

85 lines
1.7 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: nstate.h
  3. *
  4. * NORMAL_STATE
  5. *
  6. * Copyright (c) 1995 Microsoft Corporation
  7. *
  8. \**************************************************************************/
  9. #ifndef __nstate_h__
  10. #define __nstate_h__
  11. #include "sscommon.h"
  12. #include "objects.h"
  13. #include "state.h"
  14. #define NORMAL_PIPE_COUNT 5
  15. #define NORMAL_TEX_PIPE_COUNT 3
  16. #define NUM_JOINT_STYLES 3
  17. // styles for pipe joints
  18. enum {
  19. ELBOWS = 0,
  20. BALLS,
  21. EITHER
  22. };
  23. // joint types
  24. enum {
  25. ELBOW_JOINT = 0,
  26. BALL_JOINT
  27. };
  28. // shchemes for choosing directions
  29. enum {
  30. NORMAL_SCHEME_CHOOSE_DIR_RANDOM,
  31. NORMAL_SCHEME_CHOOSE_DIR_TURN,
  32. NORMAL_SCHEME_CHOOSE_DIR_STRAIGHT
  33. };
  34. // this used for traditional pipe drawing
  35. class PIPE_OBJECT;
  36. class ELBOW_OBJECT;
  37. class SPHERE_OBJECT;
  38. class BALLJOINT_OBJECT;
  39. class STATE;
  40. #if 0
  41. struct _OBJECT_SET {
  42. public:
  43. PIPE_OBJECT *shortPipe;
  44. PIPE_OBJECT *longPipe;
  45. ELBOW_OBJECT *elbows[4];
  46. SPHERE_OBJECT *ballCap;
  47. SPHERE_OBJECT *bigBall;
  48. BALLJOINT_OBJECT *ballJoints[4];
  49. } OBJECT_SET;
  50. #endif
  51. class NORMAL_STATE {
  52. public:
  53. int jointStyle;
  54. int bCycleJointStyles;
  55. PIPE_OBJECT *shortPipe;
  56. PIPE_OBJECT *longPipe;
  57. ELBOW_OBJECT *elbows[4];
  58. SPHERE_OBJECT *ballCap;
  59. SPHERE_OBJECT *bigBall;
  60. BALLJOINT_OBJECT *ballJoints[4];
  61. NORMAL_STATE( STATE *pState );
  62. ~NORMAL_STATE();
  63. void Reset();
  64. // int GetMaxPipesPerFrame();
  65. void BuildObjects( float radius, float divSize, int nSlices,
  66. BOOL bTexture, IPOINT2D *pTexRep );
  67. int ChooseJointType();
  68. };
  69. #endif // __nstate_h__