gelnsg3d.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 AcGeLineSeg3d - A mathematical entity
  14. // used to represent linear segment in 3d space.
  15. #ifndef AC_GELNSG3D_H
  16. #define AC_GELNSG3D_H
  17. #include "geline3d.h"
  18. #include "geplane.h"
  19. #pragma pack (push, 8)
  20. class AcGeLineSeg2d;
  21. class
  22. GE_DLLEXPIMPORT
  23. AcGeLineSeg3d : public AcGeLinearEnt3d
  24. {
  25. public:
  26. AcGeLineSeg3d();
  27. AcGeLineSeg3d(const AcGeLineSeg3d& line);
  28. AcGeLineSeg3d(const AcGePoint3d& pnt, const AcGeVector3d& vec);
  29. AcGeLineSeg3d(const AcGePoint3d& pnt1, const AcGePoint3d& pnt2);
  30. // Bisector.
  31. //
  32. void getBisector (AcGePlane& plane) const;
  33. // Barycentric combination of end points.
  34. //
  35. AcGePoint3d baryComb (double blendCoeff) const;
  36. // Definition of linear segment
  37. //
  38. AcGePoint3d startPoint () const;
  39. AcGePoint3d midPoint () const;
  40. AcGePoint3d endPoint () const;
  41. double length () const;
  42. double length (double fromParam, double toParam,
  43. double tol = AcGeContext::gTol.equalPoint()) const;
  44. // Set methods.
  45. //
  46. AcGeLineSeg3d& set (const AcGePoint3d& pnt, const AcGeVector3d& vec);
  47. AcGeLineSeg3d& set (const AcGePoint3d& pnt1, const AcGePoint3d& pnt2);
  48. AcGeLineSeg3d& set (const AcGeCurve3d& curve1,
  49. const AcGeCurve3d& curve2,
  50. double& param1, double& param2,
  51. Adesk::Boolean& success);
  52. AcGeLineSeg3d& set (const AcGeCurve3d& curve,
  53. const AcGePoint3d& point, double& param,
  54. Adesk::Boolean& success);
  55. // Assignment operator.
  56. //
  57. AcGeLineSeg3d& operator = (const AcGeLineSeg3d& line);
  58. };
  59. #pragma pack (pop)
  60. #endif