KFbxGeometryBase
#include<kfbxgeometrybase.h>

Inheritance diagram for KFbxGeometryBase:

Inheritance graph
[legend]

List of all members.

Detailed Description

This class is the base class for managing control points.

Use theKFbxGeometryBaseclass to manage control points for mesh, nurbs, patches and normals (on Layer 0).

Definition at line63of filekfbxgeometrybase.h.


Public and fast access Properties

KFbxTypedProperty<fbxDouble3> BBoxMin
KFbxTypedProperty<fbxDouble3> BBoxMax
void ComputeBBox()
 Compute the Bounding box of the ControlPoints.

Control Points and Normals Management.

virtual void InitControlPoints(int pCount)
 Allocate memory space for the array of control points.
void InitNormals(int pCount=0)
 Allocate memory space for the array of normals.
void InitNormals(KFbxGeometryBase*pSrc)
 Allocate memory space for the array of normals cloning them from the pSrc.
virtual void SetControlPointAt(KFbxVector4&pCtrlPoint,KFbxVector4&pNormal, int pIndex, bool pI2DSearch=false)
 Sets the control point and the normal values for a given index.
virtual void SetControlPointAt(KFbxVector4&pCtrlPoint, int pIndex)
 Sets the control point for a given index.
virtual void SetControlPointNormalAt(KFbxVector4&pCtrlPoint, int pIndex, bool pI2DSearch=false)
 Sets the the normal values for a given index.
virtual int GetControlPointsCount() const
 Get the number of control points.
virtualKFbxVector4GetControlPoints() const
 Get a pointer to the array of control points.
K_DEPRECATEDKFbxVector4GetNormals() const
 Get a pointer to the array of normals.

Off-loading Serialization section

virtual bool ContentWriteTo(KFbxStream&pStream) const
 Write the content of the object to the given stream.
virtual bool ContentReadFrom(constKFbxStream&pStream)
 Read the content of the object from the given stream.

Member Function Documentation

virtual void InitControlPoints(int pCount ) [virtual]

Allocate 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.

void InitNormals(int pCount=0 ) 

Allocate memory space for the array of normals.

Parameters:
pCount The desired size for the normal 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.
Remarks:
This function must be called after function KFbxLayerContainer::InitControlPoints().

The normals initialized with this function will have the ReferenceMode set to eDIRECT.

void InitNormals(KFbxGeometryBasepSrc ) 

Allocate memory space for the array of normals cloning them from the pSrc.

Parameters:
pSrc The source geometry from wich we will clone the normals information (on Layer 0).
Remarks:
This function must be called with the argument otherwise it will do nothing.

virtual void SetControlPointAt(KFbxVector4pCtrlPoint,
KFbxVector4pNormal,
int pIndex,
bool pI2DSearch=false 
)[virtual]

Sets the control point and the normal values for a given index.

Parameters:
pCtrlPoint The value of the control point.
pNormal The value of the normal.
pIndex The index of the control point/normal to be modified.
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 arrays are not big enough to store the values at the given index, their size will be increased.

virtual void SetControlPointAt(KFbxVector4pCtrlPoint,
int pIndex 
)[virtual]

Sets the control point for a given index.

Parameters:
pCtrlPoint The value of the control point.
pIndex The index of the control point/normal to be modified.
Remarks:
If the arrays are not big enough to store the values at the given index, their size will be increased.

virtual void SetControlPointNormalAt(KFbxVector4pCtrlPoint,
int pIndex,
bool pI2DSearch=false 
)[virtual]

Sets the the normal values for a given index.

Parameters:
pNormal The value of the normal.
pIndex The index of the control point/normal to be modified.
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 arrays are not big enough to store the values at the given index, their size will be increased.

virtual int GetControlPointsCount( ) const[virtual]

Get the number of control points.

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

Reimplemented inKFbxTrimNurbsSurface.

virtualKFbxVector4* GetControlPoints( ) const[virtual]

Get a pointer to the array of control points.

Returns:
Pointer to the array of control points, orNULLif the array has not been allocated.
Remarks:
Use the functionKFbxGeometryBase::InitControlPoints()to allocate the array.

Reimplemented inKFbxTrimNurbsSurface.

K_DEPRECATEDKFbxVector4* GetNormals( ) const

Get a pointer to the array of normals.

Returns:
Pointer to array of normals, orNULLif the array hasn't been allocated yet.
Remarks:
Use the functionKFbxGeometryBase::InitNormals()to allocate the array.

This method should not be called anymore since it will not put a lock to internal array. Use the other flavor instead.

void ComputeBBox( ) 

Compute the Bounding box of the ControlPoints.

virtual bool ContentWriteTo(KFbxStreampStream ) const[virtual]

Write the content of the object to the given stream.

Parameters:
pStream The destination stream.
Returns:
True if the content has been successfully processed by the receiving stream.

Reimplemented fromKFbxObject.

Reimplemented inKFbxPatch.

virtual bool ContentReadFrom(constKFbxStreampStream ) [virtual]

Read the content of the object from the given stream.

Parameters:
pStream The source streak.
Returns:
True if the object has been able to fill itself with the received data from the stream.

Reimplemented fromKFbxObject.

Reimplemented inKFbxPatch.