This reference page is linked to from the following overview topics: List of Python Fbx classes.
#include <fbxstatistics.h>
This class is a basic class to get the quantity of items.
User processes the statistics raw data by deriving FbxStatistics
class and overrides AddItem method. When overriding
AddItem method, User must store item's name and item's
count by pair which means The index of one item's name in array
mItemName is the same as the index of this item's
count in array mItemCount.
Here is a code snippet to show how it used. //Define my own statistics class. class MyStatistics : public FbxStatistics { public: virtual bool AddItem(FbxString& pItemName, int pItemCount) { mItemName.Add( FbxSdkNew< FbxString >(pItemName) ); mItemCount.Add( pItemCount); return true; }; }; FbxManager* lSdkManager = FbxManager::Create(); FbxScene* lScene = FbxScene::Create( lSdkManager, "Scene"); FbxNode* lNode1 = FbxNode::Create(lScene, "Node1"); FbxNode* lNode2 = FbxNode::Create(lScene, "Node2"); FbxNode* lNode3 = FbxNode::Create(lScene, "Node3"); FbxNode* lNode4 = FbxNode::Create(lScene, "Node4"); lScene.AddNode(lNode1); lScene.AddNode(lNode2); lScene.AddNode(lNode3); MyStatistics lStatistics; lStatistics.AddItem("Node_Count", lScene.GetNodeCount() ); FbxString lItemName; int lItemCount; if( lStatistics.GetItemPair( 0, lItemName, lItemCount)) { //do something }
Definition at line 62 of file fbxstatistics.h.
Public Member Functions |
|
| void | Reset () |
| Reset the statistics. |
|
| int | GetNbItems () const |
| Get the number of items. |
|
| bool | GetItemPair (int pNum, FbxString &pItemName, int &pItemCount) const |
| Get the statistics information by pair.
|
|
| FbxStatistics & | operator= (const FbxStatistics &pStatistics) |
| Assignment operator. |
|
Protected Member Functions |
|
| virtual bool | AddItem (FbxString &, int) |
| virtual function to define the process of
the incoming statistics data. |
|
Protected Attributes |
|
| FbxArray< FbxString * > | mItemName |
| An array to store item's name. |
|
| FbxArray< int > | mItemCount |
| An array to store item's count. |
|
Constructor and Destructor. |
|
| FbxStatistics () | |
| virtual | ~FbxStatistics () |
| FbxStatistics | ( | ) |
| virtual ~FbxStatistics | ( | ) | [virtual] |
| void Reset | ( | ) |
Reset the statistics.
| int GetNbItems | ( | ) | const |
Get the number of items.
| bool GetItemPair | ( | int | pNum, |
| FbxString & | pItemName, | ||
| int & | pItemCount | ||
| ) | const |
Get the statistics information by pair.
| pNum | The index of statistics data to be got. |
| pItemName | Output the item's name. |
| pItemCount | Output the item's count. |
True if successful, False
otherwise.| FbxStatistics& operator= | ( | const FbxStatistics & | pStatistics | ) |
Assignment operator.
| pStatistics | FbxStatistics assigned to this one. |
| virtual bool AddItem | ( | FbxString & | , |
| int | |||
| ) | [inline, protected, virtual] |
virtual function to define the process of the incoming statistics data.
| pItemName | The item's name |
| pItemCount | The item's count. |
Definition at line 96 of file fbxstatistics.h.
{ return false; };
An array to store item's name.
Definition at line 96 of file fbxstatistics.h.
FbxArray<int> mItemCount
[protected] |
An array to store item's count.
Definition at line 102 of file fbxstatistics.h.