xsi_nurbscurve.h Source File
 
 
 
xsi_nurbscurve.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 __XSINURBSCURVE_H__
00018 #define __XSINURBSCURVE_H__
00019 
00020 #include <xsi_siobject.h>
00021 #include <xsi_math.h>
00022 #include <xsi_nurbsdata.h>
00023 
00024 namespace XSI {
00025 
00026 class CKnotArray;
00027 class SubComponent;
00028 class CControlPointRefArray;
00029 class CNurbsSampleRefArray;
00030 
00031 
00032 //*****************************************************************************
00064 //*****************************************************************************
00065 
00066 class SICPPSDKDECL NurbsCurve : public SIObject
00067 {
00068 public:
00070         NurbsCurve();
00071 
00073         ~NurbsCurve();
00074 
00078         NurbsCurve(const CRef& in_ref);
00079 
00083         NurbsCurve(const NurbsCurve& in_obj);
00084 
00089         bool IsA( siClassID in_ClassID) const;
00090 
00094         siClassID GetClassID() const;
00095 
00101         NurbsCurve& operator=(const NurbsCurve& in_obj);
00102 
00108          NurbsCurve& operator=(const CRef& in_ref);
00109 
00113         CKnotArray GetKnots()const;
00114 
00118         CControlPointRefArray GetControlPoints()const;
00119 
00120 
00127         CStatus Get
00128         (
00129                 siNurbsFormat                   in_siNurbsFormat,
00130                 CNurbsCurveData&                out_curve
00131         )const;
00132 
00133 
00142         CStatus Set
00143         (
00144                 const CNurbsCurveData&  in_curve,
00145                 siNurbsFormat                   in_siNurbsFormat = siSINurbs
00146         );
00147 
00157         CStatus EvaluatePosition
00158         (
00159                 double                                  in_dUValue,
00160                 MATH::CVector3&                 out_vPosition,
00161                 MATH::CVector3&                 out_vTangent,
00162                 MATH::CVector3&                 out_vNormal,
00163                 MATH::CVector3&                 out_vBiNormal
00164         )const;
00165 
00175         CStatus EvaluateNormalizedPosition
00176         (
00177                 double                                  in_dUNormalizedValue,
00178                 MATH::CVector3&                 out_vPosition,
00179                 MATH::CVector3&                 out_vTangent,
00180                 MATH::CVector3&                 out_vNormal,
00181                 MATH::CVector3&                 out_vBiNormal
00182         )const;
00183 
00194         CStatus EvaluatePositionFromPercentage
00195         (
00196                 double                                  in_dPercentage,
00197                 MATH::CVector3&                 out_vPosition,
00198                 MATH::CVector3&                 out_vTangent,
00199                 MATH::CVector3&                 out_vNormal,
00200                 MATH::CVector3&                 out_vBiNormal
00201         )const;
00202 
00208         CStatus GetDegree(LONG& out_lDegree)const;
00209 
00215         CStatus GetLength(double& out_dLength)const;
00216 
00223         CStatus GetNormalizedUFromU
00224         (
00225                 double                                  in_dUValue,
00226                 double&                                 out_dNormalizedUValue
00227         )const;
00228 
00235         CStatus GetUFromNormalizedU
00236         (
00237                 double                                  in_dNormalizedUValue,
00238                 double&                                 out_dUValue
00239         )const;
00240 
00247         CStatus GetUFromPercentage
00248         (
00249                 double                                  in_dPercentage,
00250                 double&                                 out_dUValue
00251         )const;
00252 
00259         CStatus GetPercentageFromU
00260         (
00261                 double                                  in_dUValue,
00262                 double&                                 out_dPercentage
00263         )const;
00264 
00269         LONG GetIndex() const;
00270 
00274         SubComponent GetSubComponent() const;
00275 
00281         NurbsCurve Navigate(siNavigateComponentType in_siNavigate) const;
00282 
00283         private:
00284         NurbsCurve * operator&() const;
00285         NurbsCurve * operator&();
00286 };
00287 
00288 //*****************************************************************************
00313 //*****************************************************************************
00314 class SICPPSDKDECL CNurbsCurveRefArray : public CRefArray
00315 {
00316 public:
00318         CNurbsCurveRefArray();
00319 
00321         ~CNurbsCurveRefArray();
00322 
00326         CNurbsCurveRefArray( const CNurbsCurveRefArray& in_array );
00327 
00332         CRef GetItem( LONG in_index ) const;
00333 
00338         CRef GetItem( const CString& in_name ) const;
00339 
00343         LONG GetCount() const;
00344 
00348         bool IsValid() const;
00349 
00353         CLongArray GetIndexArray() const;
00354 
00358         SubComponent GetSubComponent() const;
00359 
00365         CNurbsCurveRefArray Navigate(siNavigateComponentType in_siNavigate) const;
00366 
00367         private:
00368         void* m_ptr;
00369 };
00370 
00371 };
00372 
00373 #endif // __XSINURBSCURVE_H__