Wm4ParametricSurface.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef WM4PARAMETRICSURFACE_H
00018 #define WM4PARAMETRICSURFACE_H
00019
00020 #include "Wm4FoundationLIB.h"
00021 #include "Wm4Surface.h"
00022 #include "Wm4Vector3.h"
00023
00024 namespace Wm4
00025 {
00026
00027 template <class Real>
00028 class WM4_FOUNDATION_ITEM ParametricSurface : public Surface<Real>
00029 {
00030 public:
00031
00032 virtual ~ParametricSurface ();
00033
00034
00035
00036
00037
00038
00039
00040 Real GetUMin () const;
00041 Real GetUMax () const;
00042 Real GetVMin () const;
00043 Real GetVMax () const;
00044 bool IsRectangular () const;
00045
00046
00047 virtual Vector3<Real> P (Real fU, Real fV) const = 0;
00048 virtual Vector3<Real> PU (Real fU, Real fV) const = 0;
00049 virtual Vector3<Real> PV (Real fU, Real fV) const = 0;
00050 virtual Vector3<Real> PUU (Real fU, Real fV) const = 0;
00051 virtual Vector3<Real> PUV (Real fU, Real fV) const = 0;
00052 virtual Vector3<Real> PVV (Real fU, Real fV) const = 0;
00053
00054
00055
00056 void GetFrame (Real fU, Real fV, Vector3<Real>& rkPosition,
00057 Vector3<Real>& rkTangent0, Vector3<Real>& rkTangent1,
00058 Vector3<Real>& rkNormal) const;
00059
00060
00061
00062
00063 void ComputePrincipalCurvatureInfo (Real fU, Real fV, Real& rfCurv0,
00064 Real& rfCurv1, Vector3<Real>& rkDir0, Vector3<Real>& rkDir1);
00065
00066 protected:
00067 ParametricSurface (Real fUMin, Real fUMax, Real fVMin, Real fVMax,
00068 bool bRectangular);
00069
00070 Real m_fUMin, m_fUMax, m_fVMin, m_fVMax;
00071 bool m_bRectangular;
00072 };
00073
00074 typedef ParametricSurface<float> ParametricSurfacef;
00075 typedef ParametricSurface<double> ParametricSurfaced;
00076
00077 }
00078
00079 #endif