Public Member Functions | Public Attributes | Protected Member Functions | Friends

KFbxGeometryBase Class Reference

This reference page is linked to from the following overview topics: List of Python FBX classes.


Search for all occurrences

Detailed Description

This class is the base class for geometric object such as meshes, NURBS and patches.

Use the KFbxGeometryBase class to manage the control points, normals, binormals and tangents of the geometries. The meaning of "control point" is dependent of the geometry object type. For meshes, the "control point" is the physical 3D coordinate of polygon vertices while, for NURBS, it is the the actual control point on the curves defining the surface. This class also allow you to define normals, binormals and tangents regardless of the type of geometric object. However, in reality, applying such definitions to NURBS and patches does not make much sense since these definitions would only exist at the control points and inbetween them, the interpolation would certainly not follow the curve.

Geometric objects are using a system of layered data to extend their construction definition. For example, a typical layer for a Mesh contains Normals, UVs and Materials but client applications can decide to define another set of Normals and UVs and swap them during the rendering phase to produce some different results. The combinations are limitless and it would be impossible to discuss them all. This example has been presented to show one possible context where layers can be used. More information can be found in the KFbxLayerContainer and KFbxLayer classes description.

Definition at line 70 of file kfbxgeometrybase.h.

#include <kfbxgeometrybase.h>

Inheritance diagram for KFbxGeometryBase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual int  MemoryUsage () const
  Calculate the actual amount of memory used by this geometry object.
virtual KFbxObject Copy (const KFbxObject &pObject)
  Copy an object content into this object.

Public Attributes

KArrayTemplate< KFbxVector4 mControlPoints

Protected Member Functions

  KFbxGeometryBase (KFbxSdkManager &pManager, char const *pName)
virtual bool  ConstructProperties (bool pForceSet)
virtual void  ContentClear ()
  Empties all the data (control points and layers) of the geometry object.

Friends

class  KFbxGeometryConverter

Control Points, Normals, Binormals and Tangent Management.

virtual void  InitControlPoints (int pCount)
  Allocates memory space for the array of control points.
void  InitNormals (int pCount=0)
  Allocates memory space for the array of normals.
void  InitNormals (KFbxGeometryBase *pSrc)
  Allocates memory space for the array of normals cloned from the pSrc.
void  InitTangents (int pCount=0, const int pLayerIndex=0, const char *pName="")
  Allocates memory space for the array of tangents on specified layer.
void  InitTangents (KFbxGeometryBase *pSrc, const int pLayerIndex=0)
  Allocates memory space for the array of tangents cloned from the pSrc on the specified layer.
void  InitBinormals (int pCount=0, const int pLayerIndex=0, const char *pName="")
  Allocates memory space for the array of binormals.
void  InitBinormals (KFbxGeometryBase *pSrc, const int pLayerIndex=0)
  Allocates memory space for the array of binormals cloned from the pSrc.
virtual void  SetControlPointAt (const KFbxVector4 &pCtrlPoint, const KFbxVector4 &pNormal, int pIndex, bool pI2DSearch=false)
  Sets the control point and the normal values at the specified index.
virtual void  SetControlPointAt (const KFbxVector4 &pCtrlPoint, int pIndex)
  Sets the control point at a specified index.
virtual KFbxVector4  GetControlPointAt (int pIndex) const
  Gets the control point at the specified index.
virtual void  SetControlPointNormalAt (const KFbxVector4 &pNormal, int pIndex, bool pI2DSearch=false)
  Sets the control point normal value at the specified index.
virtual int  GetControlPointsCount () const
  Returns the number of control points.
virtual KFbxVector4 GetControlPoints () const
  Returns a pointer to the array of control points.
virtual void  SetControlPointCount (int pCount)
  Allocates memory space for the array of control points.

Public and fast access Properties

KFbxTypedProperty< fbxDouble3 BBoxMin
  The minimum value of the control points bounding box.
KFbxTypedProperty< fbxDouble3 BBoxMax
  The maximum value of the control points bounding box.
void  ComputeBBox ()
  Computes the control points Bounding box.

Geometry Element Management.

A KFbxGeometryElement describes how the geometry element (normals, UVs and etc.) is mapped to a geometry surface and how the mapping information is arranged in memory.KFbxGeometryElement is exactly the same as KFbxLayerElement but does not expose the geometry's layer information. Use the geometry element classes to decompose the geometry without dealing with layers.
KFbxGeometryElementNormal CreateElementNormal ()
  Creates a normal geometry element for this geometry.
bool  RemoveElementNormal (KFbxGeometryElementNormal *pElementNormal)
  Remove the normal geometry element from this geometry.
KFbxGeometryElementNormal GetElementNormal (int pIndex=0)
  Returns this geometry's normal element.
const KFbxGeometryElementNormal GetElementNormal (int pIndex=0) const
  Returns this geometry's normal element.
int  GetElementNormalCount () const
  Get the number of this geometry's normal geometry element.
KFbxGeometryElementBinormal CreateElementBinormal ()
  Creates a binormal geometry element for this geometry.
bool  RemoveElementBinormal (KFbxGeometryElementBinormal *pElementBinormal)
  Remove the binormal geometry element from this geometry.
KFbxGeometryElementBinormal GetElementBinormal (int pIndex=0)
  Returns this geometry's binormal element.
const KFbxGeometryElementBinormal GetElementBinormal (int pIndex=0) const
  Returns this geometry's binormal element.
int  GetElementBinormalCount () const
  Get the number of this geometry's binormal geometry element.
KFbxGeometryElementTangent CreateElementTangent ()
  Creates a tangent geometry element for this geometry.
bool  RemoveElementTangent (KFbxGeometryElementTangent *pElementTangent)
  Remove the tangent geometry element from this geometry.
KFbxGeometryElementTangent GetElementTangent (int pIndex=0)
  Returns this geometry's tangent element.
const KFbxGeometryElementTangent GetElementTangent (int pIndex=0) const
  Returns this geometry's tangent element.
int  GetElementTangentCount () const
  Get the number of this geometry's tangent geometry element.
KFbxGeometryElementMaterial CreateElementMaterial ()
  Creates a material geometry element for this geometry.
bool  RemoveElementMaterial (KFbxGeometryElementMaterial *pElementMaterial)
  Remove the material geometry element from this geometry.
KFbxGeometryElementMaterial GetElementMaterial (int pIndex=0)
  Returns this geometry's material element.
const KFbxGeometryElementMaterial GetElementMaterial (int pIndex=0) const
  Returns this geometry's material element.
int  GetElementMaterialCount () const
  Get the number of this geometry's material geometry element.
KFbxGeometryElementPolygonGroup CreateElementPolygonGroup ()
  Creates a polygon group geometry element for this geometry.
bool  RemoveElementPolygonGroup (KFbxGeometryElementPolygonGroup *pElementPolygonGroup)
  Remove the polygon group geometry element from this geometry.
KFbxGeometryElementPolygonGroup GetElementPolygonGroup (int pIndex=0)
  Returns this geometry's polygon group element.
const
KFbxGeometryElementPolygonGroup
GetElementPolygonGroup (int pIndex=0) const
  Returns this geometry's polygon group element.
int  GetElementPolygonGroupCount () const
  Get the number of this geometry's polygon group geometry element.
KFbxGeometryElementVertexColor CreateElementVertexColor ()
  Creates a vertex color geometry element for this geometry.
bool  RemoveElementVertexColor (KFbxGeometryElementVertexColor *pElementVertexColor)
  Remove the vertex color geometry element from this geometry.
KFbxGeometryElementVertexColor GetElementVertexColor (int pIndex=0)
  Returns this geometry's vertex color element.
const
KFbxGeometryElementVertexColor
GetElementVertexColor (int pIndex=0) const
  Returns this geometry's vertex color element.
int  GetElementVertexColorCount () const
  Get the number of this geometry's vertex color geometry element.
KFbxGeometryElementSmoothing CreateElementSmoothing ()
  Creates a smoothing geometry element for this geometry.
bool  RemoveElementSmoothing (KFbxGeometryElementSmoothing *pElementSmoothing)
  Remove the smoothing geometry element from this geometry.
KFbxGeometryElementSmoothing GetElementSmoothing (int pIndex=0)
  Returns this geometry's smoothing element.
const
KFbxGeometryElementSmoothing
GetElementSmoothing (int pIndex=0) const
  Returns this geometry's smoothing element.
int  GetElementSmoothingCount () const
  Get the number of this geometry's smoothing geometry element.
KFbxGeometryElementCrease CreateElementVertexCrease ()
  Creates a vertex crease geometry element for this geometry.
bool  RemoveElementVertexCrease (KFbxGeometryElementCrease *pElementCrease)
  Remove the vertex crease geometry element from this geometry.
KFbxGeometryElementCrease GetElementVertexCrease (int pIndex=0)
  Returns this geometry's vertex crease element.
const KFbxGeometryElementCrease GetElementVertexCrease (int pIndex=0) const
  Returns this geometry's vertex crease element.
int  GetElementVertexCreaseCount () const
  Get the number of this geometry's vertex crease geometry element.
KFbxGeometryElementCrease CreateElementEdgeCrease ()
  Creates an edge crease geometry element for this geometry.
bool  RemoveElementEdgeCrease (KFbxGeometryElementCrease *pElementCrease)
  Remove the edge crease geometry element from this geometry.
KFbxGeometryElementCrease GetElementEdgeCrease (int pIndex=0)
  Returns this geometry's edge crease element.
const KFbxGeometryElementCrease GetElementEdgeCrease (int pIndex=0) const
  Returns this geometry's edge crease element.
int  GetElementEdgeCreaseCount () const
  Get the number of this geometry's edge crease geometry element.
KFbxGeometryElementHole CreateElementHole ()
  Creates a hole geometry element for this geometry.
bool  RemoveElementHole (KFbxGeometryElementHole *pElementHole)
  Remove the hole geometry element from this geometry.
KFbxGeometryElementHole GetElementHole (int pIndex=0)
  Returns this geometry's hole element.
const KFbxGeometryElementHole GetElementHole (int pIndex=0) const
  Returns this geometry's hole element.
int  GetElementHoleCount () const
  Get the number of this geometry's hole geometry element.
KFbxGeometryElementUserData CreateElementUserData ()
  Creates a user data geometry element for this geometry.
bool  RemoveElementUserData (KFbxGeometryElementUserData *pElementUserData)
  Remove the user data geometry element from this geometry.
KFbxGeometryElementUserData GetElementUserData (int pIndex=0)
  Returns this geometry's user data element.
const KFbxGeometryElementUserData GetElementUserData (int pIndex=0) const
  Returns this geometry's user data element.
int  GetElementUserDataCount () const
  Get the number of this geometry's user data geometry element.
KFbxGeometryElementVisibility CreateElementVisibility ()
  Creates a visibility geometry element for this geometry.
bool  RemoveElementVisibility (KFbxGeometryElementVisibility *pElementVisibility)
  Remove the visibility geometry element from this geometry.
KFbxGeometryElementVisibility GetElementVisibility (int pIndex=0)
  Returns this geometry's visibility element.
const
KFbxGeometryElementVisibility
GetElementVisibility (int pIndex=0) const
  Returns this geometry's visibility element.
int  GetElementVisibilityCount () const
  Get the number of this geometry's visibility geometry element.
KFbxGeometryElementUV CreateElementUV (const char *pUVSetName)
  Creates a UV geometry element for this geometry.
bool  RemoveElementUV (KFbxGeometryElementUV *pElementUV)
  Remove the UV geometry element from this geometry.
KFbxGeometryElementUV GetElementUV (int pIndex=0)
  Returns this geometry's UV element.
const KFbxGeometryElementUV GetElementUV (int pIndex=0) const
  Returns this geometry's UV element.
int  GetElementUVCount () const
  Get the number of this geometry's UV geometry element.
KFbxGeometryElementUV GetElementUV (const char *pUVSetName)
  Returns this geometry's UV element.
const KFbxGeometryElementUV GetElementUV (const char *pUVSetName) const
  Returns this geometry's UV element.
void  GetUVSetNames (KStringList &pUVSetNameList) const
  Returns this geometry's all UV set names.

Off-loading Serialization section

The methods in this section are typically called by a peripheral (KFbxPeripheral).There should be no real interest in calling them directly. The functions will write/read the memory dump of the data contained in this class. Each data block written/read will start with an (int) value representing the number of items in the array. If this value (v) is not zero, it will be followed by the array content. A block of data that is (v * sizeof(array item size)) bytes big. The methods will also call the parent class ones to dump the Layers content.
virtual bool  ContentWriteTo (KFbxStream &pStream) const
  Writes the content of the geometry object to the specified stream.
virtual bool  ContentReadFrom (const KFbxStream &pStream)
  Reads the content of the geometry object from the specified stream.

Utility methods

All the methods in this section are wrappers used to simplify the internal code of the FBX SDK.It is strongly recommended that clients access the data using the appropriate public Layer methods instead since they provide more control and are less subject to changes. For example, to access the direct array of normals, instead of calling GetNormals(&anArray) do: and to access the index array:
bool  GetNormals (KFbxLayerElementArrayTemplate< KFbxVector4 > **pLockableArray) const
  Get an access to the Normals direct array defined on the layer 0.
bool  GetNormalsIndices (KFbxLayerElementArrayTemplate< int > **pLockableArray) const
  Get an access to the Normals index array defined on the layer 0.
bool  GetTangents (KFbxLayerElementArrayTemplate< KFbxVector4 > **pLockableArray, const int pLayerIndex=0) const
  Get access to the Tangents direct array defined on the specified layer.
bool  GetTangentsIndices (KFbxLayerElementArrayTemplate< int > **pLockableArray, const int pLayerIndex=0) const
  Get access to the Tangents index array defined on the specified layer.
bool  GetBinormals (KFbxLayerElementArrayTemplate< KFbxVector4 > **pLockableArray, const int pLayerIndex=0) const
  Get access to the Binormals direct array defined on the specified layer.
bool  GetBinormalsIndices (KFbxLayerElementArrayTemplate< int > **pLockableArray, const int pLayerIndex=0) const
  Get access to the Binormals index array defined on the specified layer.

Constructor & Destructor Documentation

KFbxGeometryBase ( KFbxSdkManager pManager,
char const *  pName 
) [protected]

Member Function Documentation

virtual void InitControlPoints ( int  pCount ) [virtual]

Allocates memory space for the array of control points.

Parameters:
pCount The number of control points.
Remarks:
Any previously allocated array of control points will be cleared.
Examples:
Common/GeometryUtility.cxx, ExportDocument/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, Instances/main.cxx, Layers/main.cxx, ProceduralTexture/main.cxx, UIExamples/CubeCreator/SDK_Utility.cxx, and UserProperties/main.cxx.
void InitNormals ( int  pCount = 0 )

Allocates memory space for the array of normals.

Parameters:
pCount The desired size for the normal array. If pCount is specified, the array will be the same size as pCount. If pCount is not specified, the array will be the same length as the array of control points.
Remarks:
This function must be called after function KFbxLayerContainer::InitControlPoints().
The normals initialized with this function will have the ReferenceMode set to eDIRECT. Also, the array will always be defined on layer 0.
void InitNormals ( KFbxGeometryBase pSrc )

Allocates memory space for the array of normals cloned from the pSrc.

Parameters:
pSrc The source geometry from which the normals information is cloned.
Remarks:
This function must be called with the argument, otherwise it does not do anything. Also, it will only process the normals array defined on layer 0 of the pSrc.
void InitTangents ( int  pCount = 0,
const int  pLayerIndex = 0,
const char *  pName = "" 
)

Allocates memory space for the array of tangents on specified layer.

Parameters:
pCount The desired size of the tangent array. If pCount is specified, the array will be the same size as pCount. If pCount is not specified, the array will be the same length as the array of control points.
pLayerIndex The specified layer index to allocate memory space for the array of tangents.
pName The specified name for the allocated tangents array.
Remarks:
This function must be called after function KFbxLayerContainer::InitControlPoints(). The tangents initialized with this function will have the reference mode set to eDIRECT.
void InitTangents ( KFbxGeometryBase pSrc,
const int  pLayerIndex = 0 
)

Allocates memory space for the array of tangents cloned from the pSrc on the specified layer.

Parameters:
pSrc The source geometry from which the tangents information is cloned.
pLayerIndex The specified layer index to allocate memory space for cloned array of tangents from the pSrc.
Remarks:
This function must be called with the argument, otherwise it does not do anything.
void InitBinormals ( int  pCount = 0,
const int  pLayerIndex = 0,
const char *  pName = "" 
)

Allocates memory space for the array of binormals.

Parameters:
pCount The desired size of the binormal array. If pCount is specified, the array will have the same size as pCount. If pCount is not specified, the array will be the same length as the array of control points.
pLayerIndex The specified layer index to allocate memory space for the array of binormals.
pName The specified name for the allocated binormals array.
Remarks:
This function must be called after function KFbxLayerContainer::InitControlPoints(). The binormals initialized with this function will have the reference mode set to eDIRECT.
void InitBinormals ( KFbxGeometryBase pSrc,
const int  pLayerIndex = 0 
)

Allocates memory space for the array of binormals cloned from the pSrc.

Parameters:
pSrc The source geometry from which the binormals information is cloned.
pLayerIndex The specified layer index to allocate memory space for cloned array of binormals from the pSrc.
Remarks:
This function must be called with the argument, otherwise it does not do anything.
virtual void SetControlPointAt ( const KFbxVector4 pCtrlPoint,
const KFbxVector4 pNormal,
int  pIndex,
bool  pI2DSearch = false 
) [virtual]

Sets the control point and the normal values at the specified index.

Parameters:
pCtrlPoint The value of the control point.
pNormal The value of the normal.
pIndex The specified index of the control point/normal.
pI2DSearch When true AND the normals array reference mode is eINDEX_TO_DIRECT, search pNormal in the existing array to avoid inserting if it already exist. NOTE: This feature uses a linear search algorithm, therefore it can be time consuming if the DIRECT array of normals contains a huge number of elements.
Remarks:
If the arrays (control points and normals) are not big enough to store the values at the specified index, they will be automatically resized to accommodate the new entries.
Examples:
Common/GeometryUtility.cxx.
virtual void SetControlPointAt ( const KFbxVector4 pCtrlPoint,
int  pIndex 
) [virtual]

Sets the control point at a specified index.

Parameters:
pCtrlPoint The value of the control point.
pIndex The specified index of the control point.
Remarks:
If the array is not big enough to store the value at the specified index, it will be automatically resized to accommodate the new entry.
virtual KFbxVector4 GetControlPointAt ( int  pIndex ) const [virtual]

Gets the control point at the specified index.

Parameters:
pIndex The specified index of the control point.
Returns:
The value of the specific control point.
Remarks:
If index is out of range, KFbxVector4(0, 0, 0) is returned.
virtual void SetControlPointNormalAt ( const KFbxVector4 pNormal,
int  pIndex,
bool  pI2DSearch = false 
) [virtual]

Sets the control point normal value at the specified index.

Parameters:
pNormal The value of the normal.
pIndex The specified index of the normal.
pI2DSearch When true AND the normals array reference mode is eINDEX_TO_DIRECT, search pNormal in the existing array to avoid inserting it if it already exist. NOTE: this feature uses a linear search algorithm, therefore it can be time consuming if the DIRECT array of normals contains a huge number of elements.
Remarks:
If the array is not big enough to store the value at the specified index, it will be automatically resized to accommodate the new entry.
virtual int GetControlPointsCount ( ) const [virtual]

Returns the number of control points.

Returns:
The number of control points allocated in the geometry.

Reimplemented in KFbxTrimNurbsSurface.

Examples:
ImportScene/DisplayMesh.cxx, ImportScene/DisplayNurb.cxx, ImportScene/DisplayPatch.cxx, ImportScene/DisplayShape.cxx, Normals/main.cxx, and ViewScene/DrawScene.cxx.
virtual KFbxVector4* GetControlPoints ( ) const [virtual]
virtual void SetControlPointCount ( int  pCount ) [virtual]

Allocates memory space for the array of control points.

Parameters:
pCount The number of control points.
Remarks:
Any previously allocated array of control points will NOT be cleared.
void ComputeBBox ( )

Computes the control points Bounding box.

KFbxGeometryElementNormal* CreateElementNormal ( )

Creates a normal geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
Examples:
ExportDocument/main.cxx, ExportScene03/main.cxx, Layers/main.cxx, ProceduralTexture/main.cxx, UIExamples/CubeCreator/SDK_Utility.cxx, and UserProperties/main.cxx.
bool RemoveElementNormal ( KFbxGeometryElementNormal pElementNormal )

Remove the normal geometry element from this geometry.

Parameters:
pElementNormal A pointer to the normal element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementNormal* GetElementNormal ( int  pIndex = 0 )

Returns this geometry's normal element.

Parameters:
pIndex The normal geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
Examples:
ImportScene/DisplayMesh.cxx, and Normals/main.cxx.
const KFbxGeometryElementNormal* GetElementNormal ( int  pIndex = 0 ) const

Returns this geometry's normal element.

Parameters:
pIndex The normal geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementNormalCount ( ) const

Get the number of this geometry's normal geometry element.

Returns:
Total number of normal geometry elements for this geometry.
Examples:
ImportScene/DisplayMesh.cxx, and ViewScene/GlFunctions.cxx.
KFbxGeometryElementBinormal* CreateElementBinormal ( )

Creates a binormal geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
bool RemoveElementBinormal ( KFbxGeometryElementBinormal pElementBinormal )

Remove the binormal geometry element from this geometry.

Parameters:
pElementBinormal A pointer to the binormal element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementBinormal* GetElementBinormal ( int  pIndex = 0 )

Returns this geometry's binormal element.

Parameters:
pIndex The binormal geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
Examples:
ImportScene/DisplayMesh.cxx.
const KFbxGeometryElementBinormal* GetElementBinormal ( int  pIndex = 0 ) const

Returns this geometry's binormal element.

Parameters:
pIndex The binormal geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementBinormalCount ( ) const

Get the number of this geometry's binormal geometry element.

Returns:
Total number of binormal geometry elements for this geometry.
Examples:
ImportScene/DisplayMesh.cxx.
KFbxGeometryElementTangent* CreateElementTangent ( )

Creates a tangent geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
bool RemoveElementTangent ( KFbxGeometryElementTangent pElementTangent )

Remove the tangent geometry element from this geometry.

Parameters:
pElementTangent A pointer to the tangent element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementTangent* GetElementTangent ( int  pIndex = 0 )

Returns this geometry's tangent element.

Parameters:
pIndex The tangent geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
Examples:
ImportScene/DisplayMesh.cxx.
const KFbxGeometryElementTangent* GetElementTangent ( int  pIndex = 0 ) const

Returns this geometry's tangent element.

Parameters:
pIndex The tangent geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementTangentCount ( ) const

Get the number of this geometry's tangent geometry element.

Returns:
Total number of tangent geometry elements for this geometry.
Examples:
ImportScene/DisplayMesh.cxx.
KFbxGeometryElementMaterial* CreateElementMaterial ( )

Creates a material geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
Examples:
ExportDocument/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, Layers/main.cxx, ProceduralTexture/main.cxx, and UIExamples/CubeCreator/SDK_Utility.cxx.
bool RemoveElementMaterial ( KFbxGeometryElementMaterial pElementMaterial )

Remove the material geometry element from this geometry.

Parameters:
pElementMaterial A pointer to the material element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementMaterial* GetElementMaterial ( int  pIndex = 0 )

Returns this geometry's material element.

Parameters:
pIndex The material geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
Examples:
ExportDocument/main.cxx, ExportScene02/main.cxx, ImportScene/DisplayMesh.cxx, and ViewScene/GlFunctions.cxx.
const KFbxGeometryElementMaterial* GetElementMaterial ( int  pIndex = 0 ) const

Returns this geometry's material element.

Parameters:
pIndex The material geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementMaterialCount ( ) const

Get the number of this geometry's material geometry element.

Returns:
Total number of material geometry elements for this geometry.
Examples:
ImportScene/DisplayMesh.cxx.
KFbxGeometryElementPolygonGroup* CreateElementPolygonGroup ( )

Creates a polygon group geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
Examples:
Layers/main.cxx.
bool RemoveElementPolygonGroup ( KFbxGeometryElementPolygonGroup pElementPolygonGroup )

Remove the polygon group geometry element from this geometry.

Parameters:
pElementPolygonGroup A pointer to the polygon group element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementPolygonGroup* GetElementPolygonGroup ( int  pIndex = 0 )

Returns this geometry's polygon group element.

Parameters:
pIndex The polygon group geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
Examples:
ImportScene/DisplayMesh.cxx.
const KFbxGeometryElementPolygonGroup* GetElementPolygonGroup ( int  pIndex = 0 ) const

Returns this geometry's polygon group element.

Parameters:
pIndex The polygon group geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementPolygonGroupCount ( ) const

Get the number of this geometry's polygon group geometry element.

Returns:
Total number of polygon group geometry elements for this geometry.
Examples:
ImportScene/DisplayMesh.cxx.
KFbxGeometryElementVertexColor* CreateElementVertexColor ( )

Creates a vertex color geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
Examples:
Layers/main.cxx.
bool RemoveElementVertexColor ( KFbxGeometryElementVertexColor pElementVertexColor )

Remove the vertex color geometry element from this geometry.

Parameters:
pElementVertexColor A pointer to the vertex color element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementVertexColor* GetElementVertexColor ( int  pIndex = 0 )

Returns this geometry's vertex color element.

Parameters:
pIndex The vertex color geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
Examples:
ImportScene/DisplayMesh.cxx.
const KFbxGeometryElementVertexColor* GetElementVertexColor ( int  pIndex = 0 ) const

Returns this geometry's vertex color element.

Parameters:
pIndex The vertex color geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementVertexColorCount ( ) const

Get the number of this geometry's vertex color geometry element.

Returns:
Total number of vertex color geometry elements for this geometry.
Examples:
ImportScene/DisplayMesh.cxx.
KFbxGeometryElementSmoothing* CreateElementSmoothing ( )

Creates a smoothing geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
bool RemoveElementSmoothing ( KFbxGeometryElementSmoothing pElementSmoothing )

Remove the smoothing geometry element from this geometry.

Parameters:
pElementSmoothing A pointer to the smoothing element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementSmoothing* GetElementSmoothing ( int  pIndex = 0 )

Returns this geometry's smoothing element.

Parameters:
pIndex The smoothing geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
Examples:
Normals/main.cxx.
const KFbxGeometryElementSmoothing* GetElementSmoothing ( int  pIndex = 0 ) const

Returns this geometry's smoothing element.

Parameters:
pIndex The smoothing geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementSmoothingCount ( ) const

Get the number of this geometry's smoothing geometry element.

Returns:
Total number of smoothing geometry elements for this geometry.
KFbxGeometryElementCrease* CreateElementVertexCrease ( )

Creates a vertex crease geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
bool RemoveElementVertexCrease ( KFbxGeometryElementCrease pElementCrease )

Remove the vertex crease geometry element from this geometry.

Parameters:
pElementCrease A pointer to the vertex crease element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementCrease* GetElementVertexCrease ( int  pIndex = 0 )

Returns this geometry's vertex crease element.

Parameters:
pIndex The vertex crease geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
const KFbxGeometryElementCrease* GetElementVertexCrease ( int  pIndex = 0 ) const

Returns this geometry's vertex crease element.

Parameters:
pIndex The vertex crease geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementVertexCreaseCount ( ) const

Get the number of this geometry's vertex crease geometry element.

Returns:
Total number of vertex crease geometry elements for this geometry.
KFbxGeometryElementCrease* CreateElementEdgeCrease ( )

Creates an edge crease geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
bool RemoveElementEdgeCrease ( KFbxGeometryElementCrease pElementCrease )

Remove the edge crease geometry element from this geometry.

Parameters:
pElementCrease A pointer to the edge crease element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementCrease* GetElementEdgeCrease ( int  pIndex = 0 )

Returns this geometry's edge crease element.

Parameters:
pIndex The edge crease geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
const KFbxGeometryElementCrease* GetElementEdgeCrease ( int  pIndex = 0 ) const

Returns this geometry's edge crease element.

Parameters:
pIndex The edge crease geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementEdgeCreaseCount ( ) const

Get the number of this geometry's edge crease geometry element.

Returns:
Total number of edge crease geometry elements for this geometry.
KFbxGeometryElementHole* CreateElementHole ( )

Creates a hole geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
bool RemoveElementHole ( KFbxGeometryElementHole pElementHole )

Remove the hole geometry element from this geometry.

Parameters:
pElementHole A pointer to the hole element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementHole* GetElementHole ( int  pIndex = 0 )

Returns this geometry's hole element.

Parameters:
pIndex The hole geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
const KFbxGeometryElementHole* GetElementHole ( int  pIndex = 0 ) const

Returns this geometry's hole element.

Parameters:
pIndex The hole geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementHoleCount ( ) const

Get the number of this geometry's hole geometry element.

Returns:
Total number of hole geometry elements for this geometry.
KFbxGeometryElementUserData* CreateElementUserData ( )

Creates a user data geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
bool RemoveElementUserData ( KFbxGeometryElementUserData pElementUserData )

Remove the user data geometry element from this geometry.

Parameters:
pElementUserData A pointer to the user data element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementUserData* GetElementUserData ( int  pIndex = 0 )

Returns this geometry's user data element.

Parameters:
pIndex The user data geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
const KFbxGeometryElementUserData* GetElementUserData ( int  pIndex = 0 ) const

Returns this geometry's user data element.

Parameters:
pIndex The user data geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementUserDataCount ( ) const

Get the number of this geometry's user data geometry element.

Returns:
Total number of user data geometry elements for this geometry.
KFbxGeometryElementVisibility* CreateElementVisibility ( )

Creates a visibility geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
bool RemoveElementVisibility ( KFbxGeometryElementVisibility pElementVisibility )

Remove the visibility geometry element from this geometry.

Parameters:
pElementVisibility A pointer to the visibility element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementVisibility* GetElementVisibility ( int  pIndex = 0 )

Returns this geometry's visibility element.

Parameters:
pIndex The visibility geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
Examples:
ImportScene/DisplayMesh.cxx.
const KFbxGeometryElementVisibility* GetElementVisibility ( int  pIndex = 0 ) const

Returns this geometry's visibility element.

Parameters:
pIndex The visibility geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementVisibilityCount ( ) const

Get the number of this geometry's visibility geometry element.

Returns:
Total number of visibility geometry elements for this geometry.
Examples:
ImportScene/DisplayMesh.cxx.
KFbxGeometryElementUV* CreateElementUV ( const char *  pUVSetName )

Creates a UV geometry element for this geometry.

Returns:
A pointer to the newly created geometry element.
Remarks:
The created geometry element is associated with this geometry automatically.
Examples:
ExportDocument/main.cxx, ExportScene03/main.cxx, Layers/main.cxx, ProceduralTexture/main.cxx, and UIExamples/CubeCreator/SDK_Utility.cxx.
bool RemoveElementUV ( KFbxGeometryElementUV pElementUV )

Remove the UV geometry element from this geometry.

Parameters:
pElementUV A pointer to the UV element to be removed.
Returns:
True if the geometry element is removed, false otherwise.
KFbxGeometryElementUV* GetElementUV ( int  pIndex = 0 )

Returns this geometry's UV element.

Parameters:
pIndex The UV geometry element index.
Returns:
A pointer to the geometry element or NULL if pIndex is out of range.
Examples:
ImportScene/DisplayMesh.cxx, and UVSample/main.cxx.
const KFbxGeometryElementUV* GetElementUV ( int  pIndex = 0 ) const

Returns this geometry's UV element.

Parameters:
pIndex The UV geometry element index.
Returns:
A const pointer to the geometry element or NULL if pIndex is out of range.
int GetElementUVCount ( ) const

Get the number of this geometry's UV geometry element.

Returns:
Total number of UV geometry elements for this geometry.
Examples:
ImportScene/DisplayMesh.cxx, UVSample/main.cxx, and ViewScene/GlFunctions.cxx.
KFbxGeometryElementUV* GetElementUV ( const char *  pUVSetName )

Returns this geometry's UV element.

Parameters:
pUVSetName The UV set name of the UV geometry element.
Returns:
A pointer to the UV geometry element or NULL if no UV geometry element with this name exists.
const KFbxGeometryElementUV* GetElementUV ( const char *  pUVSetName ) const

Returns this geometry's UV element.

Parameters:
pUVSetName The UV set name of the UV geometry element.
Returns:
A const pointer to the UV geometry element or NULL if no UV geometry element with this name exists.
void GetUVSetNames ( KStringList pUVSetNameList ) const

Returns this geometry's all UV set names.

Parameters:
pUVSetNameList A reference to KStringList that will be filled with this geometry's all UV set names.
Examples:
UVSample/main.cxx, and ViewScene/GlFunctions.cxx.
virtual bool ContentWriteTo ( KFbxStream pStream ) const [virtual]

Writes the content of the geometry object to the specified stream.

Parameters:
pStream The destination stream.
Returns:
True if the content is successfully processed by the receiving stream, false otherwise.

Reimplemented from KFbxObject.

Reimplemented in KFbxPatch.

virtual bool ContentReadFrom ( const KFbxStream pStream ) [virtual]

Reads the content of the geometry object from the specified stream.

Parameters:
pStream The source stream.
Returns:
True if the geometry object fills itself with the received data from the stream successfully, false otherwise.

Reimplemented from KFbxObject.

Reimplemented in KFbxPatch.

virtual int MemoryUsage ( ) const [virtual]

Calculate the actual amount of memory used by this geometry object.

Returns:
The memory size in bytes (includes the amount use by the data defined in the layers).
virtual KFbxObject& Copy ( const KFbxObject pObject ) [virtual]

Copy an object content into this object.

Parameters:
pObject The source object to copy data from.
Returns:
Returns the destination object being modified by the source.
Remarks:
This function replace the assignment operator (operator=). It will copy all property values and the name. Connections are NOT copied.

Reimplemented from KFbxLayerContainer.

Reimplemented in KFbxGeometry, KFbxLine, KFbxMesh, KFbxNurb, KFbxNurbsCurve, KFbxNurbsSurface, KFbxPatch, KFbxShape, KFbxBoundary, and KFbxTrimNurbsSurface.

bool GetNormals ( KFbxLayerElementArrayTemplate< KFbxVector4 > **  pLockableArray ) const

Get an access to the Normals direct array defined on the layer 0.

Examples:
ImportScene/DisplayShape.cxx.
bool GetNormalsIndices ( KFbxLayerElementArrayTemplate< int > **  pLockableArray ) const

Get an access to the Normals index array defined on the layer 0.

bool GetTangents ( KFbxLayerElementArrayTemplate< KFbxVector4 > **  pLockableArray,
const int  pLayerIndex = 0 
) const

Get access to the Tangents direct array defined on the specified layer.

bool GetTangentsIndices ( KFbxLayerElementArrayTemplate< int > **  pLockableArray,
const int  pLayerIndex = 0 
) const

Get access to the Tangents index array defined on the specified layer.

bool GetBinormals ( KFbxLayerElementArrayTemplate< KFbxVector4 > **  pLockableArray,
const int  pLayerIndex = 0 
) const

Get access to the Binormals direct array defined on the specified layer.

bool GetBinormalsIndices ( KFbxLayerElementArrayTemplate< int > **  pLockableArray,
const int  pLayerIndex = 0 
) const

Get access to the Binormals index array defined on the specified layer.

virtual bool ConstructProperties ( bool  pForceSet ) [protected, virtual]

Reimplemented from KFbxNodeAttribute.

Reimplemented in KFbxLine, and KFbxShape.

Examples:
ExportScene03/MyKFbxMesh.h.
virtual void ContentClear ( ) [protected, virtual]

Empties all the data (control points and layers) of the geometry object.

Reimplemented from KFbxObject.


Friends And Related Function Documentation

friend class KFbxGeometryConverter [friend]

Reimplemented from KFbxLayerContainer.

Reimplemented in KFbxMesh, KFbxNurb, and KFbxNurbsSurface.

Definition at line 706 of file kfbxgeometrybase.h.


Member Data Documentation

The minimum value of the control points bounding box.

Definition at line 205 of file kfbxgeometrybase.h.

The maximum value of the control points bounding box.

Definition at line 208 of file kfbxgeometrybase.h.

Definition at line 703 of file kfbxgeometrybase.h.


The documentation for this class was generated from the following file:

KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase
KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase KFbxGeometryBase