gesent2d.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. // This file contains the class AcGeSplineEnt2d - A mathematical entity
  15. // used to represent a different types of spline curves in 3-space.
  16. #ifndef AC_GESPNT2d_H
  17. #define AC_GESPNT2d_H
  18. #include "gecurv2d.h"
  19. #include "gekvec.h"
  20. #include "gept2dar.h"
  21. #include "gevec2d.h"
  22. #include "gepnt2d.h"
  23. #include "gept2dar.h"
  24. #pragma pack (push, 8)
  25. class AcGeKnotVector;
  26. class
  27. GE_DLLEXPIMPORT
  28. AcGeSplineEnt2d : public AcGeCurve2d
  29. {
  30. public:
  31. // Definition of spline
  32. //
  33. Adesk::Boolean isRational () const;
  34. int degree () const;
  35. int order () const;
  36. int numKnots () const;
  37. const
  38. AcGeKnotVector& knots () const;
  39. int numControlPoints () const;
  40. int continuityAtKnot (int idx, const AcGeTol& tol =
  41. AcGeContext::gTol) const;
  42. double startParam () const;
  43. double endParam () const;
  44. AcGePoint2d startPoint () const;
  45. AcGePoint2d endPoint () const;
  46. // Interpolation data
  47. //
  48. Adesk::Boolean hasFitData () const;
  49. // Editting
  50. //
  51. double knotAt (int idx) const;
  52. AcGeSplineEnt2d& setKnotAt (int idx, double val);
  53. AcGePoint2d controlPointAt (int idx) const;
  54. AcGeSplineEnt2d& setControlPointAt (int idx, const AcGePoint2d& pnt);
  55. // Assignment operator.
  56. //
  57. AcGeSplineEnt2d& operator = (const AcGeSplineEnt2d& spline);
  58. protected:
  59. AcGeSplineEnt2d ();
  60. AcGeSplineEnt2d (const AcGeSplineEnt2d&);
  61. };
  62. #pragma pack (pop)
  63. #endif