xsi_nurbssurface.h
Go to the documentation of this file.
00001 //*****************************************************************************
00011 //*****************************************************************************
00012 
00013 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
00014 #pragma once
00015 #endif
00016 
00017 #ifndef __XSINURBSSURFACE_H__
00018 #define __XSINURBSSURFACE_H__
00019 
00020 #include <xsi_facet.h>
00021 #include <xsi_nurbsdata.h>
00022 
00023 namespace XSI {
00024 
00025 class CKnotArray;
00026 class CControlPointRefArray;
00027 class CNurbsSampleRefArray;
00028 
00029 
00030 //*****************************************************************************
00063 //*****************************************************************************
00064 
00065 class SICPPSDKDECL NurbsSurface : public Facet
00066 {
00067 public:
00069     NurbsSurface();
00070 
00072     ~NurbsSurface();
00073 
00077     NurbsSurface(const CRef& in_ref);
00078 
00082     NurbsSurface(const NurbsSurface& in_obj);
00083 
00088     bool IsA( siClassID in_ClassID) const;
00089 
00093     siClassID GetClassID() const;
00094 
00100     NurbsSurface& operator=(const NurbsSurface& in_obj);
00101 
00107     NurbsSurface& operator=(const CRef& in_ref);
00108 
00113     CKnotArray GetKnots
00114     (
00115         siNurbsDirection    in_siNurbsDirection
00116     )const;
00117 
00121     CControlPointRefArray GetControlPoints()const;
00122 
00126     CNurbsSampleRefArray GetNurbsSamples()const;
00127 
00134     CStatus Get
00135     (
00136         siNurbsFormat           in_siNurbsFormat,
00137         CNurbsSurfaceData&      out_surface
00138     )const;
00139 
00140 
00165     CStatus Set
00166     (
00167         const CNurbsSurfaceData&    in_surface,
00168         siNurbsFormat               in_siNurbsFormat = siSINurbs
00169     );
00170 
00181     CStatus EvaluatePosition
00182     (
00183         double                  in_dUValue,
00184         double                  in_dVValue,
00185         MATH::CVector3&         out_vPosition,
00186         MATH::CVector3&         out_vUTangent,
00187         MATH::CVector3&         out_vVTangent,
00188         MATH::CVector3&         out_vNormal
00189     )const;
00190 
00201     CStatus EvaluateNormalizedPosition
00202     (
00203         double                  in_dUNormalizedValue,
00204         double                  in_dVNormalizedValue,
00205         MATH::CVector3&         out_vPosition,
00206         MATH::CVector3&         out_vUTangent,
00207         MATH::CVector3&         out_vVTangent,
00208         MATH::CVector3&         out_vNormal
00209     )const;
00210 
00219     CStatus GetNormalizedUVFromUV
00220     (
00221         double                  in_dUValue,
00222         double                  in_dVValue,
00223         double&                 out_dNormalizedUValue,
00224         double&                 out_dNormalizedVValue
00225     )const;
00226 
00235     CStatus GetUVFromNormalizedUV
00236     (
00237         double                  in_dNormalizedUValue,
00238         double                  in_dNormalizedVValue,
00239         double&                 out_dUValue,
00240         double&                 out_dVValue
00241     )const;
00242 
00246     LONG GetTrimCount()const;
00247 
00256     CStatus GetTrim
00257     (
00258         LONG                                    in_lTrimIndex,
00259         siNurbsFormat                           in_siNurbsFormat,
00260         CTrimCurveData&                         out_trimcurve
00261     )const;
00262 
00263     private:
00264     NurbsSurface * operator&() const;
00265     NurbsSurface * operator&();
00266 };
00267 
00268 //*****************************************************************************
00293 //*****************************************************************************
00294 class SICPPSDKDECL CNurbsSurfaceRefArray : public CFacetRefArray
00295 {
00296     public:
00297     /* Default constructor */
00298     CNurbsSurfaceRefArray();
00299 
00303     CNurbsSurfaceRefArray( const CNurbsSurfaceRefArray& in_array );
00304 
00309     CRef GetItem( LONG in_index ) const;
00310 
00315     CRef GetItem( const CString& in_name ) const;
00316 
00320     LONG GetCount() const;
00321 
00325     bool IsValid() const;
00326 
00327     private:
00328     void* m_ptr;
00329 };
00330 
00331 };
00332 
00333 #endif // __XSINURBSSURFACE_H__