geell2d.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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 AcGeEllipArc2d - A mathematical entity
  14. // used to represent an ellipse in 2-space.
  15. #ifndef AC_GEELL2D_H
  16. #define AC_GEELL2D_H
  17. #include "gecurv2d.h"
  18. #include "gevec2d.h"
  19. #include "gepnt2d.h"
  20. #include "geponc2d.h"
  21. #include "geintrvl.h"
  22. #pragma pack (push, 8)
  23. class AcGeCircArc2d;
  24. class AcGePlanarEnt;
  25. class AcGeEllipArc2d;
  26. class AcGeLinearEnt2d;
  27. class
  28. GE_DLLEXPIMPORT
  29. AcGeEllipArc2d : public AcGeCurve2d
  30. {
  31. public:
  32. AcGeEllipArc2d();
  33. AcGeEllipArc2d(const AcGeEllipArc2d& ell);
  34. AcGeEllipArc2d(const AcGeCircArc2d& arc);
  35. AcGeEllipArc2d(const AcGePoint2d& cent, const AcGeVector2d& majorAxis,
  36. const AcGeVector2d& minorAxis, double majorRadius,
  37. double minorRadius);
  38. AcGeEllipArc2d(const AcGePoint2d& cent, const AcGeVector2d& majorAxis,
  39. const AcGeVector2d& minorAxis, double majorRadius,
  40. double minorRadius, double startAngle, double endAngle);
  41. // Intersection with other geometric objects.
  42. //
  43. Adesk::Boolean intersectWith (const AcGeLinearEnt2d& line, int& intn,
  44. AcGePoint2d& p1, AcGePoint2d& p2,
  45. const AcGeTol& tol = AcGeContext::gTol) const;
  46. // Inquiry Methods
  47. //
  48. Adesk::Boolean isCircular (const AcGeTol& tol = AcGeContext::gTol) const;
  49. // Test if point is inside full ellipse
  50. //
  51. Adesk::Boolean isInside (const AcGePoint2d& pnt,
  52. const AcGeTol& tol = AcGeContext::gTol) const;
  53. // Definition of ellipse
  54. //
  55. AcGePoint2d center () const;
  56. double minorRadius () const;
  57. double majorRadius () const;
  58. AcGeVector2d minorAxis () const;
  59. AcGeVector2d majorAxis () const;
  60. double startAng () const;
  61. double endAng () const;
  62. AcGePoint2d startPoint () const;
  63. AcGePoint2d endPoint () const;
  64. Adesk::Boolean isClockWise () const;
  65. AcGeEllipArc2d& setCenter (const AcGePoint2d& cent);
  66. AcGeEllipArc2d& setMinorRadius(double rad);
  67. AcGeEllipArc2d& setMajorRadius(double rad);
  68. AcGeEllipArc2d& setAxes (const AcGeVector2d& majorAxis, const AcGeVector2d& minorAxis);
  69. AcGeEllipArc2d& setAngles (double startAngle, double endAngle);
  70. AcGeEllipArc2d& set (const AcGePoint2d& cent,
  71. const AcGeVector2d& majorAxis,
  72. const AcGeVector2d& minorAxis,
  73. double majorRadius, double minorRadius);
  74. AcGeEllipArc2d& set (const AcGePoint2d& cent,
  75. const AcGeVector2d& majorAxis,
  76. const AcGeVector2d& minorAxis,
  77. double majorRadius, double minorRadius,
  78. double startAngle, double endAngle);
  79. AcGeEllipArc2d& set (const AcGeCircArc2d& arc);
  80. // Assignment operator.
  81. //
  82. AcGeEllipArc2d& operator = (const AcGeEllipArc2d& ell);
  83. };
  84. #pragma pack (pop)
  85. #endif