gelent2d.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 AcGeLinearEnt2d - A mathematical entity
  14. // used to represent a line in 2-space.
  15. #ifndef AC_GELENT2D_H
  16. #define AC_GELENT2D_H
  17. #include "gecurv2d.h"
  18. #include "gepnt2d.h"
  19. #include "gevec2d.h"
  20. #pragma pack (push, 8)
  21. class AcGeCircArc2d;
  22. class
  23. GE_DLLEXPIMPORT
  24. AcGeLinearEnt2d : public AcGeCurve2d
  25. {
  26. public:
  27. // Intersection with other geometric objects.
  28. //
  29. Adesk::Boolean intersectWith (const AcGeLinearEnt2d& line, AcGePoint2d& intPnt,
  30. const AcGeTol& tol = AcGeContext::gTol) const;
  31. // Find the overlap with other AcGeLinearEnt object
  32. //
  33. Adesk::Boolean overlap (const AcGeLinearEnt2d& line,
  34. AcGeLinearEnt2d*& overlap,
  35. const AcGeTol& tol = AcGeContext::gTol) const;
  36. // Direction tests.
  37. //
  38. Adesk::Boolean isParallelTo (const AcGeLinearEnt2d& line,
  39. const AcGeTol& tol = AcGeContext::gTol) const;
  40. Adesk::Boolean isPerpendicularTo(const AcGeLinearEnt2d& line,
  41. const AcGeTol& tol = AcGeContext::gTol) const;
  42. // Test if two lines are colinear.
  43. //
  44. Adesk::Boolean isColinearTo (const AcGeLinearEnt2d& line,
  45. const AcGeTol& tol = AcGeContext::gTol) const;
  46. // Perpendicular through a given point
  47. //
  48. void getPerpLine (const AcGePoint2d& pnt, AcGeLine2d& perpLine) const;
  49. // Definition of line.
  50. //
  51. AcGePoint2d pointOnLine () const;
  52. AcGeVector2d direction () const;
  53. void getLine (AcGeLine2d& line) const;
  54. // Assignment operator.
  55. //
  56. AcGeLinearEnt2d& operator = (const AcGeLinearEnt2d& line);
  57. protected:
  58. AcGeLinearEnt2d ();
  59. AcGeLinearEnt2d (const AcGeLinearEnt2d&);
  60. };
  61. #pragma pack (pop)
  62. #endif