nstate.h
Upload User: caisha3
Upload Date: 2013-09-21
Package Size: 208739k
Code Size: 2k
Category:

Windows Develop

Development Platform:

Visual C++

  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.     
  56.     PIPE_OBJECT     *shortPipe;
  57.     PIPE_OBJECT     *longPipe;
  58.     ELBOW_OBJECT    *elbows[4];
  59.     SPHERE_OBJECT   *ballCap;
  60.     SPHERE_OBJECT   *bigBall;
  61.     BALLJOINT_OBJECT  *ballJoints[4];
  62.     NORMAL_STATE( STATE *pState );
  63.     ~NORMAL_STATE();
  64.     void            Reset();
  65. //    int             GetMaxPipesPerFrame();
  66.     void            BuildObjects( float radius, float divSize, int nSlices,
  67.                                   BOOL bTexture, IPOINT2D *pTexRep );  
  68.     int             ChooseJointType();
  69. };
  70. #endif // __nstate_h__