Go to the
documentation of this file.
00001
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXGEOMETRYBASE_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXGEOMETRYBASE_H
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <fbxfilesdk/fbxfilesdk_def.h>
00042
00043 #include <fbxfilesdk/components/kbaselib/klib/karrayul.h>
00044
00045 #include <fbxfilesdk/kfbxmath/kfbxvector4.h>
00046
00047 #include <fbxfilesdk/kfbxplugins/kfbxlayercontainer.h>
00048
00049 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00050
00051 class KFbxSdkManager;
00052
00070 class KFBX_DLL KFbxGeometryBase : public KFbxLayerContainer
00071 {
00072 KFBXOBJECT_DECLARE(KFbxGeometryBase,KFbxLayerContainer);
00073 public:
00074
00079
00084 virtual void InitControlPoints(int pCount);
00085
00093 void InitNormals(int pCount = 0 );
00094
00100 void InitNormals(KFbxGeometryBase* pSrc);
00101
00110 void InitTangents(int pCount = 0, const int pLayerIndex = 0, const char* pName = "" );
00111
00117 void InitTangents(KFbxGeometryBase* pSrc, const int pLayerIndex = 0);
00118
00127 void InitBinormals(int pCount = 0, const int pLayerIndex = 0, const char* pName = "" );
00128
00134 void InitBinormals(KFbxGeometryBase* pSrc, const int pLayerIndex = 0);
00135
00147 virtual void SetControlPointAt(const KFbxVector4 &pCtrlPoint , const KFbxVector4 &pNormal , int pIndex, bool pI2DSearch = false);
00148
00149
00157 virtual void SetControlPointAt(const KFbxVector4 &pCtrlPoint , int pIndex);
00158
00165 virtual KFbxVector4 GetControlPointAt(int pIndex) const;
00166
00177 virtual void SetControlPointNormalAt(const KFbxVector4 &pNormal, int pIndex, bool pI2DSearch=false);
00178
00182 virtual int GetControlPointsCount() const;
00183
00184
00189 virtual KFbxVector4* GetControlPoints() const;
00190
00195 virtual void SetControlPointCount(int pCount);
00196
00198
00199
00204
00205 KFbxTypedProperty<fbxDouble3> BBoxMin;
00206
00208 KFbxTypedProperty<fbxDouble3> BBoxMax;
00209
00212 void ComputeBBox();
00214
00215
00224
00229 KFbxGeometryElementNormal* CreateElementNormal();
00230
00235 bool RemoveElementNormal(KFbxGeometryElementNormal* pElementNormal);
00236
00241 KFbxGeometryElementNormal* GetElementNormal(int pIndex = 0);
00242
00247 const KFbxGeometryElementNormal* GetElementNormal(int pIndex = 0) const;
00248
00252 int GetElementNormalCount() const;
00253
00258 KFbxGeometryElementBinormal* CreateElementBinormal();
00259
00264 bool RemoveElementBinormal(KFbxGeometryElementBinormal* pElementBinormal);
00265
00270 KFbxGeometryElementBinormal* GetElementBinormal(int pIndex = 0);
00271
00276 const KFbxGeometryElementBinormal* GetElementBinormal(int pIndex = 0) const;
00277
00281 int GetElementBinormalCount() const;
00282
00287 KFbxGeometryElementTangent* CreateElementTangent();
00288
00293 bool RemoveElementTangent(KFbxGeometryElementTangent* pElementTangent);
00294
00299 KFbxGeometryElementTangent* GetElementTangent(int pIndex = 0);
00300
00305 const KFbxGeometryElementTangent* GetElementTangent(int pIndex = 0) const;
00306
00310 int GetElementTangentCount() const;
00311
00316 KFbxGeometryElementMaterial* CreateElementMaterial();
00317
00322 bool RemoveElementMaterial(KFbxGeometryElementMaterial* pElementMaterial);
00323
00328 KFbxGeometryElementMaterial* GetElementMaterial(int pIndex = 0);
00329
00334 const KFbxGeometryElementMaterial* GetElementMaterial(int pIndex = 0) const;
00335
00339 int GetElementMaterialCount() const;
00340
00345 KFbxGeometryElementPolygonGroup* CreateElementPolygonGroup();
00346
00351 bool RemoveElementPolygonGroup(KFbxGeometryElementPolygonGroup* pElementPolygonGroup);
00352
00357 KFbxGeometryElementPolygonGroup* GetElementPolygonGroup(int pIndex = 0);
00358
00363 const KFbxGeometryElementPolygonGroup* GetElementPolygonGroup(int pIndex = 0) const;
00364
00368 int GetElementPolygonGroupCount() const;
00369
00374 KFbxGeometryElementVertexColor* CreateElementVertexColor();
00375
00380 bool RemoveElementVertexColor(KFbxGeometryElementVertexColor* pElementVertexColor);
00381
00386 KFbxGeometryElementVertexColor* GetElementVertexColor(int pIndex = 0);
00387
00392 const KFbxGeometryElementVertexColor* GetElementVertexColor(int pIndex = 0) const;
00393
00397 int GetElementVertexColorCount() const;
00398
00403 KFbxGeometryElementSmoothing* CreateElementSmoothing();
00404
00409 bool RemoveElementSmoothing(KFbxGeometryElementSmoothing* pElementSmoothing);
00410
00415 KFbxGeometryElementSmoothing* GetElementSmoothing(int pIndex = 0);
00416
00421 const KFbxGeometryElementSmoothing* GetElementSmoothing(int pIndex = 0) const;
00422
00426 int GetElementSmoothingCount() const;
00427
00432 KFbxGeometryElementCrease* CreateElementVertexCrease();
00433
00438 bool RemoveElementVertexCrease(KFbxGeometryElementCrease* pElementCrease);
00439
00444 KFbxGeometryElementCrease* GetElementVertexCrease(int pIndex = 0);
00445
00450 const KFbxGeometryElementCrease* GetElementVertexCrease(int pIndex = 0) const;
00451
00455 int GetElementVertexCreaseCount() const;
00456
00461 KFbxGeometryElementCrease* CreateElementEdgeCrease();
00462
00467 bool RemoveElementEdgeCrease(KFbxGeometryElementCrease* pElementCrease);
00468
00473 KFbxGeometryElementCrease* GetElementEdgeCrease(int pIndex = 0);
00474
00479 const KFbxGeometryElementCrease* GetElementEdgeCrease(int pIndex = 0) const;
00480
00484 int GetElementEdgeCreaseCount() const;
00485
00490 KFbxGeometryElementHole* CreateElementHole();
00491
00496 bool RemoveElementHole(KFbxGeometryElementHole* pElementHole);
00497
00502 KFbxGeometryElementHole* GetElementHole(int pIndex = 0);
00503
00508 const KFbxGeometryElementHole* GetElementHole(int pIndex = 0) const;
00509
00513 int GetElementHoleCount() const;
00514
00519 KFbxGeometryElementUserData* CreateElementUserData();
00520
00525 bool RemoveElementUserData(KFbxGeometryElementUserData* pElementUserData);
00526
00531 KFbxGeometryElementUserData* GetElementUserData(int pIndex = 0);
00532
00537 const KFbxGeometryElementUserData* GetElementUserData(int pIndex = 0) const;
00538
00542 int GetElementUserDataCount() const;
00543
00548 KFbxGeometryElementVisibility* CreateElementVisibility();
00549
00554 bool RemoveElementVisibility(KFbxGeometryElementVisibility* pElementVisibility);
00555
00560 KFbxGeometryElementVisibility* GetElementVisibility(int pIndex = 0);
00561
00566 const KFbxGeometryElementVisibility* GetElementVisibility(int pIndex = 0) const;
00567
00571 int GetElementVisibilityCount() const;
00572
00577 KFbxGeometryElementUV* CreateElementUV(const char* pUVSetName);
00578
00583 bool RemoveElementUV(KFbxGeometryElementUV* pElementUV);
00584
00589 KFbxGeometryElementUV* GetElementUV(int pIndex = 0);
00590
00595 const KFbxGeometryElementUV* GetElementUV(int pIndex = 0) const;
00596
00600 int GetElementUVCount() const;
00601
00606 KFbxGeometryElementUV* GetElementUV(const char* pUVSetName);
00607
00612 const KFbxGeometryElementUV* GetElementUV(const char* pUVSetName) const;
00613
00617 void GetUVSetNames(KStringList& pUVSetNameList) const;
00618
00620
00621
00636 virtual bool ContentWriteTo(KFbxStream& pStream) const;
00637
00643 virtual bool ContentReadFrom(const KFbxStream& pStream);
00645
00649 virtual int MemoryUsage() const;
00650
00651
00653
00654
00655
00656
00657
00658
00660 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00661
00662 virtual KFbxObject& Copy(const KFbxObject& pObject);
00663
00681
00682 bool GetNormals(KFbxLayerElementArrayTemplate<KFbxVector4>** pLockableArray) const;
00684 bool GetNormalsIndices(KFbxLayerElementArrayTemplate<int>** pLockableArray) const;
00686 bool GetTangents(KFbxLayerElementArrayTemplate<KFbxVector4>** pLockableArray, const int pLayerIndex = 0) const;
00688 bool GetTangentsIndices(KFbxLayerElementArrayTemplate<int>** pLockableArray, const int pLayerIndex = 0) const;
00690 bool GetBinormals(KFbxLayerElementArrayTemplate<KFbxVector4>** pLockableArray, const int pLayerIndex = 0) const;
00692 bool GetBinormalsIndices(KFbxLayerElementArrayTemplate<int>** pLockableArray, const int pLayerIndex = 0) const;
00694
00695 protected:
00696 KFbxGeometryBase(KFbxSdkManager& pManager, char const* pName);
00697
00698 virtual bool ConstructProperties(bool pForceSet);
00700 virtual void ContentClear();
00701
00702 public:
00703 KArrayTemplate<KFbxVector4> mControlPoints;
00704
00705 protected:
00706 friend class KFbxGeometryConverter;
00707 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00708
00709 };
00710
00711 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00712
00713 #endif // FBXFILESDK_KFBXPLUGINS_KFBXGEOMETRYBASE_H
00714