00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _NURBSSURFACE_H
00013 #define _NURBSSURFACE_H
00014
00015 #include "Geometry.h"
00016
00017
00018 #ifndef _SL_FLOAT_ARRAY_PROXY_EXPORT_
00019 #define _SL_FLOAT_ARRAY_PROXY_EXPORT_
00020
00021
00022
00023
00024 #endif // _SL_FLOAT_ARRAY_PROXY_EXPORT_
00025
00026 class CSLNurbsProjection;
00027 class CSLNurbsTrim;
00028
00029
00033 class XSIEXPORT CSLNurbsSurface
00034 : public CSLGeometry
00035 {
00036 public:
00040 typedef CSLArrayProxy<SI_Float, SI_Float, 1> CSLFloatArray;
00041
00045 typedef CSLArrayProxy<CSIBCVector4D, SI_Float, 4> CSLVector4DArray;
00046
00050 enum EParametrizationType
00051 {
00052 SI_UNIFORM,
00053 SI_NON_UNIFORM,
00054 SI_CHORD_LENGTH,
00055 SI_CENTRIPETAL,
00056 };
00057
00064 CSLNurbsSurface(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00065
00068 virtual ~CSLNurbsSurface();
00069
00073 virtual SI_Error Fix();
00074
00079 virtual SI_Error Synchronize();
00080
00084 virtual ETemplateType Type() { return SI_NURBS_SURFACE; }
00085
00089 SI_Int GetUDegree();
00090
00095 SI_Void SetUDegree(SI_Int in_nValue);
00096
00100 SI_Int GetVDegree();
00101
00106 SI_Void SetVDegree(SI_Int in_nValue);
00107
00111 SI_Bool GetUClosedFlag();
00112
00117 SI_Void SetUClosedFlag(SI_Bool in_nValue);
00118
00122 SI_Bool GetVClosedFlag();
00123
00128 SI_Void SetVClosedFlag(SI_Bool in_nValue);
00129
00133 EParametrizationType GetParametrization();
00134
00139 SI_Void SetParametrization(EParametrizationType in_Type);
00140
00144 SI_Int GetUKnotCount();
00145
00149 CSLFloatArray* GetUKnotList();
00150
00154 SI_Float* GetUKnotListPtr();
00155
00159 SI_Int GetVKnotCount();
00160
00164 CSLFloatArray* GetVKnotList();
00165
00169 SI_Float* GetVKnotListPtr();
00170
00174 SI_Int GetUControlPointCount();
00175
00180 SI_Void SetUControlPointCount(SI_Int in_nValue);
00181
00185 SI_Int GetVControlPointCount();
00186
00191 SI_Void SetVControlPointCount(SI_Int in_nValue);
00192
00196 SI_Int GetControlPointCount();
00197
00201 CSLVector4DArray* GetControlPointList();
00202
00206 CSIBCVector4D* GetControlPointListPtr();
00207
00209
00211
00216 CSLNurbsProjection* AddNurbsProjection();
00217
00222 SI_Error RemoveNurbsProjection( SI_Int in_nIndex );
00223
00228 SI_Error RemoveNurbsProjection( CSLNurbsProjection* in_pToRemove );
00229
00233 SI_Error ClearNurbsProjections();
00234
00239 CSLNurbsProjection* ConnectNurbsProjection( CSLNurbsProjection* in_pToConnect );
00240
00245 CSLNurbsProjection** GetNurbsProjections();
00246
00250 SI_Int GetNurbsProjectionCount();
00251
00256 CSLNurbsProjection* FindNurbsProjection( SI_Char* in_szNurbsProjectionName );
00257
00259
00261
00265 CSLNurbsTrim* AddNurbsTrim();
00266
00272 SI_Error RemoveNurbsTrim( SI_Int in_nIndex );
00273
00278 SI_Error RemoveNurbsTrim( CSLNurbsTrim* in_pToRemove );
00279
00283 SI_Error ClearNurbsTrims();
00284
00289 CSLNurbsTrim* ConnectNurbsTrim( CSLNurbsTrim* in_pToConnect );
00290
00295 CSLNurbsTrim** GetNurbsTrims();
00296
00300 SI_Int GetNurbsTrimCount();
00301
00306 CSLNurbsTrim* FindNurbsTrim( SI_Char* in_szNurbsTrimName );
00307
00308 private:
00309 CSLIntProxy m_UDegree;
00310 CSLIntProxy m_VDegree;
00311 CSLBoolProxy m_UClosed;
00312 CSLBoolProxy m_VClosed;
00313 CSLEnumProxy<EParametrizationType, SI_CENTRIPETAL> m_Parametrization;
00314 CSLIntProxy m_NbUControlPoints;
00315 CSLIntProxy m_NbVControlPoints;
00316 CSLFloatArray m_UKnots;
00317 CSLFloatArray m_VKnots;
00318 CSLVector4DArray m_ControlPoints;
00319 CSIBCArray<CSLNurbsProjection*> m_NurbsProjections;
00320 CSIBCArray<CSLNurbsTrim*> m_NurbsTrims;
00321
00322 void *m_pReserved;
00323 };
00324
00325 #endif