geblok2d.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // DESCRIPTION:
  12. //
  13. // This file contains the class AcGeBoundBlock2d - An entity used to
  14. // represent a 2d bounding volume, a parallelogram.
  15. //
  16. #ifndef AC_GEBLOCK2D_H
  17. #define AC_GEBLOCK2D_H
  18. #include "geent2d.h"
  19. #pragma pack (push, 8)
  20. class AcGePoint2d;
  21. class AcGeVector2d;
  22. class
  23. GE_DLLEXPIMPORT
  24. AcGeBoundBlock2d : public AcGeEntity2d
  25. {
  26. public:
  27. AcGeBoundBlock2d ();
  28. AcGeBoundBlock2d (const AcGePoint2d& point1, const AcGePoint2d& point2);
  29. AcGeBoundBlock2d (const AcGePoint2d& base,
  30. const AcGeVector2d& dir1, const AcGeVector2d& dir2);
  31. AcGeBoundBlock2d (const AcGeBoundBlock2d& block);
  32. // Access methods.
  33. //
  34. void getMinMaxPoints (AcGePoint2d& point1,
  35. AcGePoint2d& point2) const;
  36. void get (AcGePoint2d& base,
  37. AcGeVector2d& dir1,
  38. AcGeVector2d& dir2) const;
  39. // Set methods.
  40. //
  41. AcGeBoundBlock2d& set (const AcGePoint2d& point1,
  42. const AcGePoint2d& point2);
  43. AcGeBoundBlock2d& set (const AcGePoint2d& base,
  44. const AcGeVector2d& dir1,
  45. const AcGeVector2d& dir2);
  46. // Expand to contain point.
  47. //
  48. AcGeBoundBlock2d& extend (const AcGePoint2d& point);
  49. // Expand by a specified distance.
  50. //
  51. AcGeBoundBlock2d& swell (double distance);
  52. // Containment and intersection tests
  53. //
  54. Adesk::Boolean contains (const AcGePoint2d& point) const;
  55. Adesk::Boolean isDisjoint (const AcGeBoundBlock2d& block)
  56. const;
  57. // Assignment operator
  58. //
  59. AcGeBoundBlock2d& operator = (const AcGeBoundBlock2d& block);
  60. Adesk::Boolean isBox () const;
  61. AcGeBoundBlock2d& setToBox (Adesk::Boolean);
  62. };
  63. #pragma pack (pop)
  64. #endif