KFbxGeometryBase Class Reference

#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 the KFbxGeometryBase class to manage control points for mesh, nurbs, patches and normals (on Layer 0).

Definition at line 59 of file kfbxgeometrybase.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.
void  InitTangents (int pCount=0)
  Allocate memory space for the array of tangents.
void  InitTangents (KFbxGeometryBase *pSrc)
  Allocate memory space for the array of tangents cloning them from the pSrc.
void  InitBinormals (int pCount=0)
  Allocate memory space for the array of binormals.
void  InitBinormals (KFbxGeometryBase *pSrc)
  Allocate memory space for the array of binormals 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 &pNormal, int pIndex, bool pI2DSearch=false)
  Sets the the normal values for a given index.
virtual int  GetControlPointsCount () const
  Get the number of control points.
virtual KFbxVector4 GetControlPoints () const
  Get a pointer to the array of control points.
virtual void  SetControlPointCount (int pCount)
  Allocate memory space for the array of control points.

Off-loading Serialization section

virtual bool  ContentWriteTo (KFbxStream &pStream) const
  Writes the content of the object to the given stream.
virtual bool  ContentReadFrom (const KFbxStream &pStream)
  Reads 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 ( KFbxGeometryBase pSrc  ) 

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.

void InitTangents ( int  pCount = 0  ) 

Allocate memory space for the array of tangents.

Parameters:
pCount  The desired size for the tangent 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 tangents initialized with this function will have the ReferenceMode set to eDIRECT.

void InitTangents ( KFbxGeometryBase pSrc  ) 

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

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

void InitBinormals ( int  pCount = 0  ) 

Allocate memory space for the array of binormals.

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

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

void InitBinormals ( KFbxGeometryBase pSrc  ) 

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

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

virtual void SetControlPointAt ( KFbxVector4 pCtrlPoint,
KFbxVector4 pNormal,
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 ( KFbxVector4 pCtrlPoint,
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 ( KFbxVector4 pNormal,
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 in KFbxTrimNurbsSurface.

virtual KFbxVector4* GetControlPoints (  )  const [virtual]

Get a pointer to the array of control points.

Returns:
Pointer to the array of control points, or NULL if the array has not been allocated.
Remarks:
Use the function KFbxGeometryBase::InitControlPoints() to allocate the array.

Reimplemented in KFbxTrimNurbsSurface.

virtual void SetControlPointCount ( 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 ComputeBBox (  ) 

Compute the Bounding box of the ControlPoints.

virtual bool ContentWriteTo ( KFbxStream pStream  )  const [virtual]

Writes the content of the object to the given 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 object from the given stream.

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

Reimplemented from KFbxObject.

Reimplemented in KFbxPatch.

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