FBX C++ API Reference
fbxgeometrybase.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_SCENE_GEOMETRY_BASE_H_
14 #define _FBXSDK_SCENE_GEOMETRY_BASE_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
21 
22 #include <fbxsdk/fbxsdk_nsbegin.h>
23 
24 class FbxStatus;
25 
44 {
46 
47 public:
52 
57  virtual void InitControlPoints(int pCount);
58 
66  void InitNormals(int pCount = 0 );
67 
73  void InitNormals(FbxGeometryBase* pSrc);
74 
83  void InitTangents(int pCount = 0, const int pLayerIndex = 0, const char* pName = "" );
84 
90  void InitTangents(FbxGeometryBase* pSrc, const int pLayerIndex = 0);
91 
100  void InitBinormals(int pCount = 0, const int pLayerIndex = 0, const char* pName = "" );
101 
107  void InitBinormals(FbxGeometryBase* pSrc, const int pLayerIndex = 0);
108 
120  virtual void SetControlPointAt(const FbxVector4 &pCtrlPoint , const FbxVector4 &pNormal , int pIndex, bool pI2DSearch = false);
121 
122 
130  virtual void SetControlPointAt(const FbxVector4 &pCtrlPoint , int pIndex);
131 
138  virtual FbxVector4 GetControlPointAt(int pIndex) const;
139 
150  virtual void SetControlPointNormalAt(const FbxVector4 &pNormal, int pIndex, bool pI2DSearch=false);
151 
155  virtual int GetControlPointsCount() const;
156 
157 
163  virtual FbxVector4* GetControlPoints(FbxStatus* pStatus=NULL) const;
164 
169  virtual void SetControlPointCount(int pCount);
170 
172 
173 
178  FbxPropertyT<FbxBool> PrimaryVisibility;
180 
183 
186 
189 
192 
195  void ComputeBBox();
197 
198 
207 
212  FbxGeometryElementNormal* CreateElementNormal();
213 
218  bool RemoveElementNormal(FbxGeometryElementNormal* pElementNormal);
219 
224  FbxGeometryElementNormal* GetElementNormal(int pIndex = 0);
225 
230  const FbxGeometryElementNormal* GetElementNormal(int pIndex = 0) const;
231 
235  int GetElementNormalCount() const;
236 
241  FbxGeometryElementBinormal* CreateElementBinormal();
242 
247  bool RemoveElementBinormal(FbxGeometryElementBinormal* pElementBinormal);
248 
253  FbxGeometryElementBinormal* GetElementBinormal(int pIndex = 0);
254 
259  const FbxGeometryElementBinormal* GetElementBinormal(int pIndex = 0) const;
260 
264  int GetElementBinormalCount() const;
265 
270  FbxGeometryElementTangent* CreateElementTangent();
271 
276  bool RemoveElementTangent(FbxGeometryElementTangent* pElementTangent);
277 
282  FbxGeometryElementTangent* GetElementTangent(int pIndex = 0);
283 
288  const FbxGeometryElementTangent* GetElementTangent(int pIndex = 0) const;
289 
293  int GetElementTangentCount() const;
294 
299  FbxGeometryElementMaterial* CreateElementMaterial();
300 
305  bool RemoveElementMaterial(FbxGeometryElementMaterial* pElementMaterial);
306 
311  FbxGeometryElementMaterial* GetElementMaterial(int pIndex = 0);
312 
317  const FbxGeometryElementMaterial* GetElementMaterial(int pIndex = 0) const;
318 
322  int GetElementMaterialCount() const;
323 
328  FbxGeometryElementPolygonGroup* CreateElementPolygonGroup();
329 
334  bool RemoveElementPolygonGroup(FbxGeometryElementPolygonGroup* pElementPolygonGroup);
335 
340  FbxGeometryElementPolygonGroup* GetElementPolygonGroup(int pIndex = 0);
341 
346  const FbxGeometryElementPolygonGroup* GetElementPolygonGroup(int pIndex = 0) const;
347 
351  int GetElementPolygonGroupCount() const;
352 
357  FbxGeometryElementVertexColor* CreateElementVertexColor();
358 
363  bool RemoveElementVertexColor(FbxGeometryElementVertexColor* pElementVertexColor);
364 
369  FbxGeometryElementVertexColor* GetElementVertexColor(int pIndex = 0);
370 
375  const FbxGeometryElementVertexColor* GetElementVertexColor(int pIndex = 0) const;
376 
380  int GetElementVertexColorCount() const;
381 
386  FbxGeometryElementSmoothing* CreateElementSmoothing();
387 
392  bool RemoveElementSmoothing(FbxGeometryElementSmoothing* pElementSmoothing);
393 
398  FbxGeometryElementSmoothing* GetElementSmoothing(int pIndex = 0);
399 
404  const FbxGeometryElementSmoothing* GetElementSmoothing(int pIndex = 0) const;
405 
409  int GetElementSmoothingCount() const;
410 
415  FbxGeometryElementCrease* CreateElementVertexCrease();
416 
421  bool RemoveElementVertexCrease(FbxGeometryElementCrease* pElementCrease);
422 
427  FbxGeometryElementCrease* GetElementVertexCrease(int pIndex = 0);
428 
433  const FbxGeometryElementCrease* GetElementVertexCrease(int pIndex = 0) const;
434 
438  int GetElementVertexCreaseCount() const;
439 
444  FbxGeometryElementCrease* CreateElementEdgeCrease();
445 
450  bool RemoveElementEdgeCrease(FbxGeometryElementCrease* pElementCrease);
451 
456  FbxGeometryElementCrease* GetElementEdgeCrease(int pIndex = 0);
457 
462  const FbxGeometryElementCrease* GetElementEdgeCrease(int pIndex = 0) const;
463 
467  int GetElementEdgeCreaseCount() const;
468 
473  FbxGeometryElementHole* CreateElementHole();
474 
479  bool RemoveElementHole(FbxGeometryElementHole* pElementHole);
480 
485  FbxGeometryElementHole* GetElementHole(int pIndex = 0);
486 
491  const FbxGeometryElementHole* GetElementHole(int pIndex = 0) const;
492 
496  int GetElementHoleCount() const;
497 
502  FbxGeometryElementUserData* CreateElementUserData();
503 
508  bool RemoveElementUserData(FbxGeometryElementUserData* pElementUserData);
509 
514  FbxGeometryElementUserData* GetElementUserData(int pIndex = 0);
515 
520  const FbxGeometryElementUserData* GetElementUserData(int pIndex = 0) const;
521 
525  int GetElementUserDataCount() const;
526 
531  FbxGeometryElementVisibility* CreateElementVisibility();
532 
537  bool RemoveElementVisibility(FbxGeometryElementVisibility* pElementVisibility);
538 
543  FbxGeometryElementVisibility* GetElementVisibility(int pIndex = 0);
544 
549  const FbxGeometryElementVisibility* GetElementVisibility(int pIndex = 0) const;
550 
554  int GetElementVisibilityCount() const;
555 
562  FbxGeometryElementUV* CreateElementUV(const char* pUVSetName, FbxLayerElement::EType pTypeIdentifier=FbxLayerElement::eTextureDiffuse);
563 
568  bool RemoveElementUV(FbxGeometryElementUV* pElementUV);
569 
577  FbxGeometryElementUV* GetElementUV(int pIndex = 0, FbxLayerElement::EType pTypeIdentifier=FbxLayerElement::eUnknown);
578 
586  const FbxGeometryElementUV* GetElementUV(int pIndex = 0, FbxLayerElement::EType pTypeIdentifier=FbxLayerElement::eUnknown) const;
587 
594  int GetElementUVCount(FbxLayerElement::EType pTypeIdentifier=FbxLayerElement::eUnknown) const;
595 
600  FbxGeometryElementUV* GetElementUV(const char* pUVSetName);
601 
606  const FbxGeometryElementUV* GetElementUV(const char* pUVSetName) const;
607 
611  void GetUVSetNames(FbxStringList& pUVSetNameList) const;
612 
614 
615 
630  virtual bool ContentWriteTo(FbxStream& pStream) const;
631 
637  virtual bool ContentReadFrom(const FbxStream& pStream);
639 
643  virtual int MemoryUsage() const;
644 
645 /*****************************************************************************************************************************
646 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
647 *****************************************************************************************************************************/
648 #ifndef DOXYGEN_SHOULD_SKIP_THIS
649  virtual FbxObject& Copy(const FbxObject& pObject);
650  virtual void Compact();
651 
652  FbxArray<FbxVector4> mControlPoints;
653 
654  bool GetNormals(FbxLayerElementArrayTemplate<FbxVector4>** pLockableArray) const;
655  bool GetNormalsIndices(FbxLayerElementArrayTemplate<int>** pLockableArray) const;
656  bool GetTangents(FbxLayerElementArrayTemplate<FbxVector4>** pLockableArray, const int pLayerIndex = 0) const;
657  bool GetTangentsIndices(FbxLayerElementArrayTemplate<int>** pLockableArray, const int pLayerIndex = 0) const;
658  bool GetBinormals(FbxLayerElementArrayTemplate<FbxVector4>** pLockableArray, const int pLayerIndex = 0) const;
659  bool GetBinormalsIndices(FbxLayerElementArrayTemplate<int>** pLockableArray, const int pLayerIndex = 0) const;
660 
661 protected:
662  virtual void ConstructProperties(bool pForceSet);
663  virtual void ContentClear();
664 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
665 };
666 
667 #include <fbxsdk/fbxsdk_nsend.h>
668 
669 #endif /* _FBXSDK_SCENE_GEOMETRY_BASE_H_ */
#define FBXSDK_OBJECT_DECLARE(Class, Parent)
Macro used to declare a new class derived from FbxObject.
Definition: fbxobject.h:61
Layer element for mapping Tangents to a geometry.
Definition: fbxlayer.h:1337
FBX SDK environment definition.
FbxPropertyT< FbxDouble3 > BBoxMax
The maximum value of the control points bounding box.
virtual void Compact()
Compact the memory used by this object.
FbxPropertyT< FbxBool > ReceiveShadow
If true, the geometry will receive shadows.
Layer element for mapping materials (FbxSurfaceMaterial) to a geometry.
Definition: fbxlayer.h:1394
virtual bool ContentWriteTo(FbxStream &pStream) const
Writes the content of the object to the given stream.
virtual void ContentClear()
Clears this object&#39;s content from memory.
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:858
Abstract class for implementing I/O operations through a stream of data.
Definition: fbxstream.h:26
#define NULL
Definition: fbxarch.h:210
virtual FbxObject & Copy(const FbxObject &pObject)
Copy an object content into this object.
Array that stores pairs of FbxString and a pointer.
Layer element for mapping custom user data to a geometry.
Definition: fbxlayer.h:1518
Contains a collection of FbxLayer objects.
Layer element for indicating if specified components are shown/hidden.
Definition: fbxlayer.h:2142
Layer element for mapping Vertex Colors to a geometry.
Definition: fbxlayer.h:1494
Layer element for mapping UVs to a geometry.
Definition: fbxlayer.h:1478
Layer element for mapping Normals to a geometry.
Definition: fbxlayer.h:1303
This class facilitates the testing/reporting of errors.
Definition: fbxstatus.h:26
FbxPropertyT< FbxBool > CastShadow
If true, the geometry will produce shadows.
The base class of most FBX objects.
Definition: fbxobject.h:157
Layer element for indicating hole of polygon of a geometry.
Definition: fbxlayer.h:2103
This class is the base class for geometric object such as meshes, NURBS and patches.
virtual bool ContentReadFrom(const FbxStream &pStream)
Reads the content of the object from the given stream.
Layer element for indicating smoothness of components of a geometry.
Definition: fbxlayer.h:2023
Layer element for indicating crease of components of a geometry.
Definition: fbxlayer.h:2063
FbxPropertyT< FbxDouble3 > BBoxMin
The minimum value of the control points bounding box.
EType
Layer Element type identifier.
Definition: fbxlayer.h:75
A four double mathematic vector class.
Definition: fbxvector4.h:25
#define FBXSDK_DLL
Definition: fbxarch.h:173
Layer element for grouping related polygons together.
Definition: fbxlayer.h:1450
virtual void ConstructProperties(bool pForceSet)
Optional property constructor override, automatically called by default constructor.
Class for array of basic elements such as pointers and basic types.
Definition: fbxarray.h:23
Layer element for mapping Binormals to a geometry.
Definition: fbxlayer.h:1320