geblok3d.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 AcGeBoundBlock3d - An entity used to
  14. // represent a 3d bounding volume, a parallelepiped.
  15. //
  16. #ifndef AC_GEBLOCK3D_H
  17. #define AC_GEBLOCK3D_H
  18. #include "geent3d.h"
  19. #pragma pack (push, 8)
  20. class AcGePoint3d;
  21. class AcGeVector3d;
  22. class
  23. GE_DLLEXPIMPORT
  24. AcGeBoundBlock3d : public AcGeEntity3d
  25. {
  26. public:
  27. AcGeBoundBlock3d ();
  28. AcGeBoundBlock3d (const AcGePoint3d& base, const AcGeVector3d& dir1,
  29. const AcGeVector3d& dir2, const AcGeVector3d& dir3);
  30. AcGeBoundBlock3d (const AcGeBoundBlock3d& block);
  31. // Access methods.
  32. //
  33. void getMinMaxPoints (AcGePoint3d& point1,
  34. AcGePoint3d& point2) const;
  35. void get (AcGePoint3d& base,
  36. AcGeVector3d& dir1,
  37. AcGeVector3d& dir2,
  38. AcGeVector3d& dir3) const;
  39. // Set methods.
  40. //
  41. AcGeBoundBlock3d& set (const AcGePoint3d& point1,
  42. const AcGePoint3d& point2);
  43. AcGeBoundBlock3d& set (const AcGePoint3d& base,
  44. const AcGeVector3d& dir1,
  45. const AcGeVector3d& dir2,
  46. const AcGeVector3d& dir3);
  47. // Expand to contain point.
  48. //
  49. AcGeBoundBlock3d& extend (const AcGePoint3d& point);
  50. // Expand by a specified distance.
  51. //
  52. AcGeBoundBlock3d& swell (double distance);
  53. // Containment and intersection tests
  54. //
  55. Adesk::Boolean contains (const AcGePoint3d& point) const;
  56. Adesk::Boolean isDisjoint (const AcGeBoundBlock3d& block) const;
  57. // Assignment opearator
  58. //
  59. AcGeBoundBlock3d& operator = (const AcGeBoundBlock3d& block);
  60. Adesk::Boolean isBox () const;
  61. AcGeBoundBlock3d& setToBox (Adesk::Boolean);
  62. };
  63. #pragma pack (pop)
  64. #endif