Advertisement
dcomicboy

hitbox.h

Mar 29th, 2012
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. //
  2. // PURPOSE : Client side reresentation of the CCharacterHitBox object
  3. //
  4. // CREATED : 8/26/02
  5. //
  6. // (c) 2002 Monolith Productions, Inc. All Rights Reserved
  7. //
  8. // ----------------------------------------------------------------------- //
  9.  
  10. #ifndef __HITBOX_H__
  11. #define __HITBOX_H__
  12.  
  13. //
  14. // Includes...
  15. //
  16.  
  17.  
  18. class CHitBox
  19. {
  20. public: // Methods...
  21.  
  22. CHitBox();
  23. ~CHitBox();
  24.  
  25. virtual bool Init( HOBJECT hModel, const LTVector &vDims, const LTVector &vOffset );
  26. virtual void Update();
  27.  
  28. virtual void SetDims( const LTVector &vDims );
  29. virtual void SetOffset( const LTVector &vOffset );
  30. virtual void SetCanBeSearched( bool bCanBeSearched );
  31.  
  32. const LTVector& GetDims() const { return m_vDims; }
  33. const LTVector& GetOffset() const { return m_vOffset; }
  34.  
  35. HOBJECT GetObject() const { return m_hObject; }
  36.  
  37. protected: // Methods...
  38.  
  39. void CreateBoundingBox(); // Testing puposes only!
  40. void UpdateBoundingBox(); // Testing puposes only!
  41.  
  42.  
  43. protected: // Members...
  44.  
  45. HOBJECT m_hObject;
  46. HOBJECT m_hModel; // Object we are associated with
  47.  
  48. LTVector m_vDims; // HitBox dimensions
  49. LTVector m_vOffset; // HitBox offset relative to the position and rotation of our model object
  50.  
  51. HOBJECT m_hBoundingBox; // Testing puposes only! The visual model of the hitbox.
  52. };
  53.  
  54. #endif // __HITBOX_H__
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement