geponsrf.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. // class AcGePointOnSurface to keep information of a point belonging
  14. // to a surface.
  15. #ifndef AC_GEPONSRF_H
  16. #define AC_GEPONSRF_H
  17. #include "gepent3d.h"
  18. #pragma pack (push, 8)
  19. class AcGeSurface;
  20. class
  21. GE_DLLEXPIMPORT
  22. AcGePointOnSurface : public AcGePointEnt3d
  23. {
  24. public:
  25. AcGePointOnSurface();
  26. AcGePointOnSurface(const AcGeSurface& surf);
  27. AcGePointOnSurface(const AcGeSurface& surf, const AcGePoint2d& param);
  28. AcGePointOnSurface(const AcGePointOnSurface& src);
  29. // Assignment operator.
  30. //
  31. AcGePointOnSurface& operator = (const AcGePointOnSurface& src);
  32. // Query functions.
  33. //
  34. const AcGeSurface* surface () const;
  35. AcGePoint2d parameter () const;
  36. // Functions to evaluate a point.
  37. //
  38. AcGePoint3d point () const;
  39. AcGePoint3d point (const AcGePoint2d& param );
  40. AcGePoint3d point (const AcGeSurface& surf,
  41. const AcGePoint2d& param);
  42. // Functions to evaluate surface normal.
  43. //
  44. AcGeVector3d normal () const;
  45. AcGeVector3d normal (const AcGePoint2d& param );
  46. AcGeVector3d normal (const AcGeSurface& surf,
  47. const AcGePoint2d& param);
  48. // Functions to evaluate derivatives.
  49. //
  50. AcGeVector3d uDeriv (int order) const;
  51. AcGeVector3d uDeriv (int order, const AcGePoint2d& param);
  52. AcGeVector3d uDeriv (int order, const AcGeSurface& surf,
  53. const AcGePoint2d& param);
  54. AcGeVector3d vDeriv (int order) const;
  55. AcGeVector3d vDeriv (int order, const AcGePoint2d& param);
  56. AcGeVector3d vDeriv (int order, const AcGeSurface& surf,
  57. const AcGePoint2d& param);
  58. // Functions to evaluate the mixed partial.
  59. //
  60. AcGeVector3d mixedPartial () const;
  61. AcGeVector3d mixedPartial (const AcGePoint2d& param);
  62. AcGeVector3d mixedPartial (const AcGeSurface& surf,
  63. const AcGePoint2d& param);
  64. // Functions to compute the tangent vector in a given direction.
  65. //
  66. AcGeVector3d tangentVector (const AcGeVector2d& vec) const;
  67. AcGeVector3d tangentVector (const AcGeVector2d& vec,
  68. const AcGePoint2d& param);
  69. AcGeVector3d tangentVector (const AcGeVector2d& vec,
  70. const AcGeSurface& vecSurf,
  71. const AcGePoint2d& param);
  72. // Functions to invert a tangent vector to parameter space.
  73. //
  74. AcGeVector2d inverseTangentVector (const AcGeVector3d& vec) const;
  75. AcGeVector2d inverseTangentVector (const AcGeVector3d& vec,
  76. const AcGePoint2d& param);
  77. AcGeVector2d inverseTangentVector (const AcGeVector3d& vec,
  78. const AcGeSurface& surf,
  79. const AcGePoint2d& param);
  80. // Set functions.
  81. //
  82. AcGePointOnSurface& setSurface (const AcGeSurface& surf);
  83. AcGePointOnSurface& setParameter (const AcGePoint2d& param);
  84. };
  85. #pragma pack (pop)
  86. #endif