dbregion.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. //
  12. // DESCRIPTION:
  13. //
  14. // The AcDbRegion class is the interface class for representing
  15. // regions inside AutoCAD. All the functionality supported by
  16. // this class is implemented in the class AcDbImpRegion and its
  17. // base classes.
  18. #ifndef GEOMENT_DBREGION_H
  19. #define GEOMENT_DBREGION_H
  20. #include "dbmain.h"
  21. #include "dbsubeid.h"
  22. #include "gepnt3d.h"
  23. #include "gevec3d.h"
  24. #pragma pack(push, 8)
  25. class AcDbRegion: public AcDbEntity
  26. {
  27. public:
  28. AcDbRegion();
  29. virtual ~AcDbRegion();
  30. ACDB_DECLARE_MEMBERS(AcDbRegion);
  31. static
  32. Acad::ErrorStatus createFromCurves(const AcDbVoidPtrArray& curveSegments,
  33. AcDbVoidPtrArray& regions);
  34. virtual Acad::ErrorStatus getPerimeter(double&) const;
  35. virtual Acad::ErrorStatus getArea(double& regionArea) const;
  36. virtual void* ASMBodyCopy(bool bDeepCopy = false) const; // INTERNAL USE ONLY
  37. virtual void const * getLockedASMBody(); // INTERNAL USE ONLY
  38. virtual void unlockASMBody(); // INTERNAL USE ONLY
  39. virtual void* getLockedWritableASMBody(); // INTERNAL USE ONLY
  40. virtual void commitWritableASMBody(); // INTERNAL USE ONLY
  41. virtual Acad::ErrorStatus setASMBody(const void* modelerBody); // INTERNAL USE ONLY
  42. virtual Acad::ErrorStatus getAreaProp(
  43. const AcGePoint3d& origin,
  44. const AcGeVector3d& xAxis,
  45. const AcGeVector3d& yAxis,
  46. double& perimeter,
  47. double& area,
  48. AcGePoint2d& centroid,
  49. double momInertia[2],
  50. double& prodInertia,
  51. double prinMoments[2],
  52. AcGeVector2d prinAxes[2],
  53. double radiiGyration[2],
  54. AcGePoint2d& extentsLow,
  55. AcGePoint2d& extentsHigh)const;
  56. virtual Acad::ErrorStatus getPlane(AcGePlane& regionPlane) const;
  57. ACDB_PORT virtual void dragStatus(const AcDb::DragStat);
  58. virtual Adesk::Boolean isNull () const;
  59. virtual Acad::ErrorStatus getNormal(AcGeVector3d&) const;
  60. virtual AcDbSubentId internalSubentId (void* ent) const; // INTERNAL USE ONLY
  61. virtual void* internalSubentPtr (const AcDbSubentId& id) const; // INTERNAL USE ONLY
  62. virtual Acad::ErrorStatus booleanOper(AcDb::BoolOperType operation, AcDbRegion* otherRegion);
  63. virtual Adesk::UInt32 numChanges() const;
  64. ACDB_PORT virtual bool usesGraphicsCache();
  65. protected:
  66. virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
  67. };
  68. #pragma pack(pop)
  69. #endif