genurbsf.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 implements the class AcGeNurbSurface, a representation
  15. // for a non-uniform, rational BSpline surface.
  16. //
  17. #ifndef AC_GENURBSF_H
  18. #define AC_GENURBSF_H
  19. #include "gegbl.h"
  20. #include "gesurf.h"
  21. #include "gept3dar.h"
  22. #include "gedblar.h"
  23. #pragma pack (push, 8)
  24. class AcGeKnotVector;
  25. class
  26. GX_DLLEXPIMPORT
  27. AcGeNurbSurface : public AcGeSurface
  28. {
  29. public:
  30. AcGeNurbSurface();
  31. AcGeNurbSurface(int degreeU, int degreeV, int propsInU, int propsInV,
  32. int numControlPointsInU, int numControlPointsInV,
  33. const AcGePoint3d controlPoints[],
  34. const double weights[],
  35. const AcGeKnotVector& uKnots,
  36. const AcGeKnotVector& vKnots,
  37. const AcGeTol& tol = AcGeContext::gTol);
  38. AcGeNurbSurface(const AcGeNurbSurface& nurb);
  39. // Assignment.
  40. //
  41. AcGeNurbSurface& operator = (const AcGeNurbSurface& nurb);
  42. // Geometric properties.
  43. //
  44. Adesk::Boolean isRationalInU () const;
  45. Adesk::Boolean isPeriodicInU (double&) const;
  46. Adesk::Boolean isRationalInV () const;
  47. Adesk::Boolean isPeriodicInV (double&) const;
  48. int singularityInU () const;
  49. int singularityInV () const;
  50. // Definition data.
  51. //
  52. int degreeInU () const;
  53. int numControlPointsInU () const;
  54. int degreeInV () const;
  55. int numControlPointsInV () const;
  56. void getControlPoints (AcGePoint3dArray& points) const;
  57. Adesk::Boolean getWeights (AcGeDoubleArray& weights) const;
  58. int numKnotsInU () const;
  59. void getUKnots (AcGeKnotVector& uKnots) const;
  60. int numKnotsInV () const;
  61. void getVKnots (AcGeKnotVector& vKnots) const;
  62. void getDefinition (int& degreeU, int& degreeV,
  63. int& propsInU, int& propsInV,
  64. int& numControlPointsInU,
  65. int& numControlPointsInV,
  66. AcGePoint3dArray& controlPoints,
  67. AcGeDoubleArray& weights,
  68. AcGeKnotVector& uKnots,
  69. AcGeKnotVector& vKnots) const;
  70. // Reset surface
  71. //
  72. AcGeNurbSurface& set (int degreeU, int degreeV,
  73. int propsInU, int propsInV,
  74. int numControlPointsInU,
  75. int numControlPointsInV,
  76. const AcGePoint3d controlPoints[],
  77. const double weights[],
  78. const AcGeKnotVector& uKnots,
  79. const AcGeKnotVector& vKnots,
  80. const AcGeTol& tol = AcGeContext::gTol);
  81. };
  82. #pragma pack (pop)
  83. #endif