thinggeo.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (C) 1996, 1997 Microsoft Corporation. All Rights Reserved.
  4. //
  5. //////////////////////////////////////////////////////////////////////////////
  6. #ifndef __ThingGeo_H_
  7. #define __ThingGeo_H_
  8. //////////////////////////////////////////////////////////////////////////////
  9. //
  10. // ThingGeo
  11. //
  12. //////////////////////////////////////////////////////////////////////////////
  13. class ThingGeo : public IObject {
  14. protected:
  15. static float s_lodBias;
  16. static bool s_bShowLights;
  17. static bool s_bShowHullHits;
  18. static bool s_bShowTrails;
  19. static int s_iShowSmoke;
  20. static bool s_bShowBounds;
  21. static bool s_bTransparentObjects;
  22. static int s_crashCount;
  23. static int s_trashCount;
  24. public:
  25. static TRef<ThingGeo> Create(Modeler* pmodeler, Number* ptime);
  26. //
  27. // Static members
  28. //
  29. static void SetShowBounds(bool bBounds);
  30. static bool GetShowBounds();
  31. static void SetTransparentObjects(bool b);
  32. static bool GetTransparentObjects();
  33. static void SetShowTrails(bool bShowTrails);
  34. static bool GetShowTrails();
  35. static void SetShowSmoke(int iShowSmoke);
  36. static int GetShowSmoke();
  37. static void SetShowLights(bool bShowLights);
  38. static bool GetShowLights();
  39. static void SetShowHullHits(bool bShowHullHits);
  40. static bool GetShowHullHits();
  41. static void SetLODBias(float lodBias);
  42. static int GetCrashCount();
  43. static int GetTrashCount();
  44. //
  45. // ThingGeo members
  46. //
  47. virtual Geo* GetGeo() = 0;
  48. virtual Geo* GetTargetGeo() = 0;
  49. virtual float GetFlareCount(void) const = 0;
  50. virtual void AddFlare(Geo* pgeo, Number* ptime, const Vector& vecDirection, const Vector* ellipseEquation) = 0;
  51. virtual void AddHullHit(const Vector& vecPosition, const Vector& vecNormal) = 0;
  52. virtual void SetShowDamage (bool bShowDamage) = 0;
  53. virtual void AddDamage (const Vector& vecDamagePosition, float fDamageFraction) = 0;
  54. virtual void RemoveDamage (float fDamageFraction) = 0;
  55. virtual void SetTimeUntilRipcord (float fTimeUntilTeleport) = 0;
  56. virtual void SetTimeUntilAleph (float fTimeUntilTeleport) = 0;
  57. virtual void SetPosition(const Vector& vec) = 0;
  58. virtual void SetOrientation(const Orientation& o) = 0;
  59. virtual void SetVisible(bool bVisible) = 0;
  60. virtual void SetVisibleShip(bool bVisible) = 0;
  61. virtual void SetThrust(float size) = 0;
  62. virtual void SetParticleGeo (ParticleGeo* pParticleGeo) = 0;
  63. virtual void SetAfterburnerThrust (const Vector& vecThrustDirection, float power) = 0;
  64. virtual void SetAfterburnerSmokeSize (float fSize) = 0;
  65. virtual void SetAfterburnerFireDuration (float fDuration) = 0;
  66. virtual void SetAfterburnerSmokeDuration (float fDuration) = 0;
  67. virtual void SetBitsGeo(BitsGeo* pbitsGeo) = 0;
  68. virtual void SetTrailColor(const Color& color) = 0;
  69. virtual void SetTexture(Image* pimageTexture) = 0;
  70. virtual void SetShadeAlways(bool bShadeAlways) = 0;
  71. virtual float GetRadius() = 0;
  72. virtual float SetRadius(float radius) = 0;
  73. virtual bool GetChildModelOffset(const ZString& str, Vector& vec) = 0;
  74. virtual bool GetChildOffset(const ZString& str, Vector& vec) = 0;
  75. virtual HRESULT LoadMDL(short options, INameSpace* pns, Image* pimageTexture) = 0;
  76. virtual HRESULT Load(short options, Geo* pgeo, Image* pimageTexture) = 0;
  77. virtual void SetBoundsGeo(Geo* pgeo) = 0;
  78. };
  79. #endif