Creating a mesh object
 
 
 

Here is how to create a node in your scene graph that contains a mesh:

//Create an SDK manager for your application
KFbxSdkManager* gSdkManager = KFbxSdkManager::Create();
 
// Create a scene object
gScene = KFbxScene::Create(gSdkManager, "");
 
// Create a mesh object
KFbxMesh* lMesh = KFbxMesh::Create(pSdkManager, "");
 
// Get the scene’s root node
KFbxNode* lRootNode = gScene->GetRootNode();
 
// Create a node for the mesh.
KFbxNode* lNode = KFbxNode::Create(pSdkManager, "");
 
// Set the node as a child of the scene’s root node.
lRootNode->AddChild(lNode);
 
// Set the mesh as the node attribute of the node
lNode->SetNodeAttribute(lMesh);
 
// set the shading mode to view texture
lNode->SetShadingMode(KFbxNode::eTEXTURE_SHADING);
 
// Rescale the cube
lNode->LclScaling.Set(KFbxVector4(0.3, 0.3, 0.3));