Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00013 #ifndef _FBXSDK_SCENE_GEOMETRY_BASE_H_
00014 #define _FBXSDK_SCENE_GEOMETRY_BASE_H_
00015
00016 #include <fbxsdk/fbxsdk_def.h>
00017
00018 #include <fbxsdk/core/base/fbxarray.h>
00019 #include <fbxsdk/core/math/fbxvector4.h>
00020 #include <fbxsdk/scene/geometry/fbxlayercontainer.h>
00021
00022 #include <fbxsdk/fbxsdk_nsbegin.h>
00023
00041 class FBXSDK_DLL FbxGeometryBase : public FbxLayerContainer
00042 {
00043 FBXSDK_OBJECT_DECLARE(FbxGeometryBase, FbxLayerContainer);
00044 public:
00045
00050
00055 virtual void InitControlPoints(int pCount);
00056
00064 void InitNormals(int pCount = 0 );
00065
00071 void InitNormals(FbxGeometryBase* pSrc);
00072
00081 void InitTangents(int pCount = 0, const int pLayerIndex = 0, const char* pName = "" );
00082
00088 void InitTangents(FbxGeometryBase* pSrc, const int pLayerIndex = 0);
00089
00098 void InitBinormals(int pCount = 0, const int pLayerIndex = 0, const char* pName = "" );
00099
00105 void InitBinormals(FbxGeometryBase* pSrc, const int pLayerIndex = 0);
00106
00118 virtual void SetControlPointAt(const FbxVector4 &pCtrlPoint , const FbxVector4 &pNormal , int pIndex, bool pI2DSearch = false);
00119
00120
00128 virtual void SetControlPointAt(const FbxVector4 &pCtrlPoint , int pIndex);
00129
00136 virtual FbxVector4 GetControlPointAt(int pIndex) const;
00137
00148 virtual void SetControlPointNormalAt(const FbxVector4 &pNormal, int pIndex, bool pI2DSearch=false);
00149
00153 virtual int GetControlPointsCount() const;
00154
00155
00160 virtual FbxVector4* GetControlPoints() const;
00161
00166 virtual void SetControlPointCount(int pCount);
00167
00169
00170
00175
00176 FbxPropertyT<FbxBool> PrimaryVisibility;
00177
00179 FbxPropertyT<FbxBool> CastShadow;
00180
00182 FbxPropertyT<FbxBool> ReceiveShadow;
00183
00185 FbxPropertyT<FbxDouble3> BBoxMin;
00186
00188 FbxPropertyT<FbxDouble3> BBoxMax;
00189
00192 void ComputeBBox();
00194
00195
00204
00209 FbxGeometryElementNormal* CreateElementNormal();
00210
00215 bool RemoveElementNormal(FbxGeometryElementNormal* pElementNormal);
00216
00221 FbxGeometryElementNormal* GetElementNormal(int pIndex = 0);
00222
00227 const FbxGeometryElementNormal* GetElementNormal(int pIndex = 0) const;
00228
00232 int GetElementNormalCount() const;
00233
00238 FbxGeometryElementBinormal* CreateElementBinormal();
00239
00244 bool RemoveElementBinormal(FbxGeometryElementBinormal* pElementBinormal);
00245
00250 FbxGeometryElementBinormal* GetElementBinormal(int pIndex = 0);
00251
00256 const FbxGeometryElementBinormal* GetElementBinormal(int pIndex = 0) const;
00257
00261 int GetElementBinormalCount() const;
00262
00267 FbxGeometryElementTangent* CreateElementTangent();
00268
00273 bool RemoveElementTangent(FbxGeometryElementTangent* pElementTangent);
00274
00279 FbxGeometryElementTangent* GetElementTangent(int pIndex = 0);
00280
00285 const FbxGeometryElementTangent* GetElementTangent(int pIndex = 0) const;
00286
00290 int GetElementTangentCount() const;
00291
00296 FbxGeometryElementMaterial* CreateElementMaterial();
00297
00302 bool RemoveElementMaterial(FbxGeometryElementMaterial* pElementMaterial);
00303
00308 FbxGeometryElementMaterial* GetElementMaterial(int pIndex = 0);
00309
00314 const FbxGeometryElementMaterial* GetElementMaterial(int pIndex = 0) const;
00315
00319 int GetElementMaterialCount() const;
00320
00325 FbxGeometryElementPolygonGroup* CreateElementPolygonGroup();
00326
00331 bool RemoveElementPolygonGroup(FbxGeometryElementPolygonGroup* pElementPolygonGroup);
00332
00337 FbxGeometryElementPolygonGroup* GetElementPolygonGroup(int pIndex = 0);
00338
00343 const FbxGeometryElementPolygonGroup* GetElementPolygonGroup(int pIndex = 0) const;
00344
00348 int GetElementPolygonGroupCount() const;
00349
00354 FbxGeometryElementVertexColor* CreateElementVertexColor();
00355
00360 bool RemoveElementVertexColor(FbxGeometryElementVertexColor* pElementVertexColor);
00361
00366 FbxGeometryElementVertexColor* GetElementVertexColor(int pIndex = 0);
00367
00372 const FbxGeometryElementVertexColor* GetElementVertexColor(int pIndex = 0) const;
00373
00377 int GetElementVertexColorCount() const;
00378
00383 FbxGeometryElementSmoothing* CreateElementSmoothing();
00384
00389 bool RemoveElementSmoothing(FbxGeometryElementSmoothing* pElementSmoothing);
00390
00395 FbxGeometryElementSmoothing* GetElementSmoothing(int pIndex = 0);
00396
00401 const FbxGeometryElementSmoothing* GetElementSmoothing(int pIndex = 0) const;
00402
00406 int GetElementSmoothingCount() const;
00407
00412 FbxGeometryElementCrease* CreateElementVertexCrease();
00413
00418 bool RemoveElementVertexCrease(FbxGeometryElementCrease* pElementCrease);
00419
00424 FbxGeometryElementCrease* GetElementVertexCrease(int pIndex = 0);
00425
00430 const FbxGeometryElementCrease* GetElementVertexCrease(int pIndex = 0) const;
00431
00435 int GetElementVertexCreaseCount() const;
00436
00441 FbxGeometryElementCrease* CreateElementEdgeCrease();
00442
00447 bool RemoveElementEdgeCrease(FbxGeometryElementCrease* pElementCrease);
00448
00453 FbxGeometryElementCrease* GetElementEdgeCrease(int pIndex = 0);
00454
00459 const FbxGeometryElementCrease* GetElementEdgeCrease(int pIndex = 0) const;
00460
00464 int GetElementEdgeCreaseCount() const;
00465
00470 FbxGeometryElementHole* CreateElementHole();
00471
00476 bool RemoveElementHole(FbxGeometryElementHole* pElementHole);
00477
00482 FbxGeometryElementHole* GetElementHole(int pIndex = 0);
00483
00488 const FbxGeometryElementHole* GetElementHole(int pIndex = 0) const;
00489
00493 int GetElementHoleCount() const;
00494
00499 FbxGeometryElementUserData* CreateElementUserData();
00500
00505 bool RemoveElementUserData(FbxGeometryElementUserData* pElementUserData);
00506
00511 FbxGeometryElementUserData* GetElementUserData(int pIndex = 0);
00512
00517 const FbxGeometryElementUserData* GetElementUserData(int pIndex = 0) const;
00518
00522 int GetElementUserDataCount() const;
00523
00528 FbxGeometryElementVisibility* CreateElementVisibility();
00529
00534 bool RemoveElementVisibility(FbxGeometryElementVisibility* pElementVisibility);
00535
00540 FbxGeometryElementVisibility* GetElementVisibility(int pIndex = 0);
00541
00546 const FbxGeometryElementVisibility* GetElementVisibility(int pIndex = 0) const;
00547
00551 int GetElementVisibilityCount() const;
00552
00557 FbxGeometryElementUV* CreateElementUV(const char* pUVSetName);
00558
00563 bool RemoveElementUV(FbxGeometryElementUV* pElementUV);
00564
00569 FbxGeometryElementUV* GetElementUV(int pIndex = 0);
00570
00575 const FbxGeometryElementUV* GetElementUV(int pIndex = 0) const;
00576
00580 int GetElementUVCount() const;
00581
00586 FbxGeometryElementUV* GetElementUV(const char* pUVSetName);
00587
00592 const FbxGeometryElementUV* GetElementUV(const char* pUVSetName) const;
00593
00597 void GetUVSetNames(FbxStringList& pUVSetNameList) const;
00598
00600
00601
00616 virtual bool ContentWriteTo(FbxStream& pStream) const;
00617
00623 virtual bool ContentReadFrom(const FbxStream& pStream);
00625
00629 virtual int MemoryUsage() const;
00630
00631
00632
00633
00634 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00635 virtual FbxObject& Copy(const FbxObject& pObject);
00636
00637 FbxArray<FbxVector4> mControlPoints;
00638
00639 bool GetNormals(FbxLayerElementArrayTemplate<FbxVector4>** pLockableArray) const;
00640 bool GetNormalsIndices(FbxLayerElementArrayTemplate<int>** pLockableArray) const;
00641 bool GetTangents(FbxLayerElementArrayTemplate<FbxVector4>** pLockableArray, const int pLayerIndex = 0) const;
00642 bool GetTangentsIndices(FbxLayerElementArrayTemplate<int>** pLockableArray, const int pLayerIndex = 0) const;
00643 bool GetBinormals(FbxLayerElementArrayTemplate<FbxVector4>** pLockableArray, const int pLayerIndex = 0) const;
00644 bool GetBinormalsIndices(FbxLayerElementArrayTemplate<int>** pLockableArray, const int pLayerIndex = 0) const;
00645
00646 protected:
00647 virtual void ConstructProperties(bool pForceSet);
00648 virtual void ContentClear();
00649 #endif
00650 };
00651
00652 #include <fbxsdk/fbxsdk_nsend.h>
00653
00654 #endif