geplane.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 AcGePlane - A mathematical entity
  14. // used to represent a plane in 3-space.
  15. #ifndef AC_GEPLANE_H
  16. #define AC_GEPLANE_H
  17. #include "geplanar.h"
  18. #pragma pack (push, 8)
  19. class AcGeBoundedPlane;
  20. class AcGeLine3d;
  21. class
  22. GE_DLLEXPIMPORT
  23. AcGePlane : public AcGePlanarEnt
  24. {
  25. public:
  26. // Global plane objects.
  27. //
  28. static const AcGePlane kXYPlane;
  29. static const AcGePlane kYZPlane;
  30. static const AcGePlane kZXPlane;
  31. AcGePlane();
  32. AcGePlane(const AcGePlane& src);
  33. AcGePlane(const AcGePoint3d& origin, const AcGeVector3d& normal);
  34. AcGePlane(const AcGePoint3d& pntU, const AcGePoint3d& org, const AcGePoint3d& pntV);
  35. AcGePlane(const AcGePoint3d& org, const AcGeVector3d& uAxis,
  36. const AcGeVector3d& vAxis);
  37. AcGePlane(double a, double b, double c, double d);
  38. // Signed distance from a point to a plane.
  39. //
  40. double signedDistanceTo (const AcGePoint3d& pnt) const;
  41. // Intersection
  42. //
  43. Adesk::Boolean intersectWith (const AcGeLinearEnt3d& linEnt, AcGePoint3d& resultPnt,
  44. const AcGeTol& tol = AcGeContext::gTol) const;
  45. Adesk::Boolean intersectWith (const AcGePlane& otherPln, AcGeLine3d& resultLine,
  46. const AcGeTol& tol = AcGeContext::gTol) const;
  47. Adesk::Boolean intersectWith (const AcGeBoundedPlane& bndPln, AcGeLineSeg3d& resultLineSeg,
  48. const AcGeTol& tol = AcGeContext::gTol) const;
  49. // Geometry redefinition.
  50. //
  51. AcGePlane& set (const AcGePoint3d& pnt, const AcGeVector3d& normal);
  52. AcGePlane& set (const AcGePoint3d& pntU, const AcGePoint3d& org,
  53. const AcGePoint3d& pntV);
  54. AcGePlane& set (double a, double b, double c, double d);
  55. AcGePlane& set (const AcGePoint3d& org,
  56. const AcGeVector3d& uAxis,
  57. const AcGeVector3d& vAxis);
  58. // Assignment operator.
  59. //
  60. AcGePlane& operator = (const AcGePlane& src);
  61. };
  62. #pragma pack (pop)
  63. #endif