NurbsCurve.h

Go to the documentation of this file.
00001 //***************************************************************************************
00002 // File supervisor: Crosswalk team
00012 //***************************************************************************************
00013 
00014 #ifndef _NURBSCURVE_H
00015 #define _NURBSCURVE_H
00016 
00017 #include "Geometry.h"
00018 
00019 #ifndef _SL_FLOAT_ARRAY_PROXY_EXPORT_
00020 #define _SL_FLOAT_ARRAY_PROXY_EXPORT_
00021 
00022 //XSITEMPLATEEXP template class XSIEXPORT CSLArrayProxy<SI_Float, SI_Float, 1>;
00023 //XSITEMPLATEEXP template class XSIEXPORT CSLArrayProxy<CSIBCVector4D, SI_Float, 4>;
00024 
00025 #endif // _SL_FLOAT_ARRAY_PROXY_EXPORT_
00026 
00027 
00033 class XSIEXPORT CSLNurbsCurve
00034     : public CSLGeometry
00035 {
00036 public:
00039     typedef CSLArrayProxy<SI_Float, SI_Float, 1>        CSLFloatArray;
00040 
00043     typedef CSLArrayProxy<CSIBCVector4D, SI_Float, 4>   CSLVector4DArray;
00044 
00047     enum EParametrizationType
00048     {
00049         SI_UNIFORM,         
00050         SI_NON_UNIFORM,     
00051         SI_CHORD_LENGTH,    
00052         SI_CENTRIPETAL,     
00053     };
00054 
00061     CSLNurbsCurve(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00062 
00065     virtual ~CSLNurbsCurve();
00066 
00070     SI_Int                  GetDegree();
00071 
00075     SI_Void                 SetDegree(SI_Int in_nValue);
00076 
00080     SI_Bool                 GetClosedFlag();
00081 
00085     SI_Void                 SetClosedFlag(SI_Bool in_bValue);
00086 
00090     EParametrizationType    GetParametrization();
00091 
00095     SI_Void                 SetParametrization(EParametrizationType in_Type);
00096 
00100     SI_Int                  GetKnotCount();
00101 
00105     CSLFloatArray*          GetKnotList();
00106 
00110     SI_Float*               GetKnotListPtr();
00111 
00115     SI_Int                  GetControlPointCount();
00116 
00120     CSLVector4DArray*       GetControlPointList();
00121 
00125     CSIBCVector4D*          GetControlPointListPtr();
00126 
00130     virtual SI_Error Synchronize();
00131 
00135     virtual ETemplateType   Type() { return SI_NURBS_CURVE; }
00136 
00137 private:
00138     CSLIntProxy             m_Degree;
00139     CSLBoolProxy            m_Closed;
00140     CSLEnumProxy<EParametrizationType, SI_CENTRIPETAL>  m_Parametrization;
00141     CSLFloatArray           m_Knots;
00142     CSLVector4DArray        m_ControlPoints;
00143 
00144     void *m_pReserved;  // reserved for future extension
00145 };
00146 
00147 #endif
00148