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.

116 lines
3.2 KiB

  1. //-----------------------------------------------------------------------------
  2. // File: objects.h
  3. //
  4. // Desc:
  5. //
  6. // Copyright (c) 1994-2000 Microsoft Corporation
  7. //-----------------------------------------------------------------------------
  8. #ifndef __objects_h__
  9. #define __objects_h__
  10. //-----------------------------------------------------------------------------
  11. // Name:
  12. // Desc:
  13. //-----------------------------------------------------------------------------
  14. class OBJECT_BUILD_INFO
  15. {
  16. public:
  17. float m_radius;
  18. float m_divSize;
  19. int m_nSlices;
  20. BOOL m_bTexture;
  21. IPOINT2D* m_texRep;
  22. };
  23. //-----------------------------------------------------------------------------
  24. // Name: OBJECT classes
  25. // Desc: - Display list objects
  26. //-----------------------------------------------------------------------------
  27. class OBJECT
  28. {
  29. protected:
  30. int m_listNum;
  31. int m_nSlices;
  32. IDirect3DDevice8* m_pd3dDevice;
  33. LPDIRECT3DVERTEXBUFFER8 m_pVB;
  34. DWORD m_dwNumTriangles;
  35. public:
  36. void Draw( D3DXMATRIX* pWorldMat );
  37. OBJECT( IDirect3DDevice8* pd3dDevice );
  38. ~OBJECT();
  39. };
  40. //-----------------------------------------------------------------------------
  41. // Name:
  42. // Desc:
  43. //-----------------------------------------------------------------------------
  44. class PIPE_OBJECT : public OBJECT
  45. {
  46. private:
  47. void Build( OBJECT_BUILD_INFO *state, float length, float start_s, float s_end );
  48. public:
  49. PIPE_OBJECT( IDirect3DDevice8* pd3dDevice, OBJECT_BUILD_INFO *state, float length );
  50. PIPE_OBJECT( IDirect3DDevice8* pd3dDevice, OBJECT_BUILD_INFO *state, float length, float start_s, float end_s );
  51. };
  52. //-----------------------------------------------------------------------------
  53. // Name:
  54. // Desc:
  55. //-----------------------------------------------------------------------------
  56. class ELBOW_OBJECT : public OBJECT
  57. {
  58. private:
  59. void Build( OBJECT_BUILD_INFO *state, int notch, float start_s, float end_s );
  60. public:
  61. ELBOW_OBJECT( IDirect3DDevice8* pd3dDevice, OBJECT_BUILD_INFO *state, int notch );
  62. ELBOW_OBJECT( IDirect3DDevice8* pd3dDevice, OBJECT_BUILD_INFO *state, int notch, float start_s, float end_s );
  63. };
  64. //-----------------------------------------------------------------------------
  65. // Name:
  66. // Desc:
  67. //-----------------------------------------------------------------------------
  68. class BALLJOINT_OBJECT : public OBJECT
  69. {
  70. private:
  71. void Build( OBJECT_BUILD_INFO *state, int notch, float start_s, float end_s );
  72. public:
  73. // texturing version only
  74. BALLJOINT_OBJECT( IDirect3DDevice8* pd3dDevice, OBJECT_BUILD_INFO *state, int notch, float start_s, float end_s );
  75. };
  76. //-----------------------------------------------------------------------------
  77. // Name:
  78. // Desc:
  79. //-----------------------------------------------------------------------------
  80. class SPHERE_OBJECT : public OBJECT
  81. {
  82. private:
  83. void Build( OBJECT_BUILD_INFO *state, float radius, float start_s, float end_s );
  84. public:
  85. SPHERE_OBJECT( IDirect3DDevice8* pd3dDevice, OBJECT_BUILD_INFO *state, float radius, float start_s, float end_s );
  86. SPHERE_OBJECT( IDirect3DDevice8* pd3dDevice, OBJECT_BUILD_INFO *state, float radius );
  87. };
  88. #endif // __objects_h__