Creating a camera
 
 
 

Here is how to create a node whose node attribute is a camera:

First we instantiate a camera object, using the SDK manager to manage memory:

KFbxCamera* lCamera = KFbxCamera::Create(pSdkManager, "");

Then we adjust the settings of the camera so that it “films” in a format suitable for (non-high-definition) television :

// Set camera properties for classic TV projection with aspect ratio 4:3
lCamera->SetFormat(KFbxCamera::eNTSC);

Next we instantiate a node object:

KFbxNode* lCameraNode = KFbxNode::Create(pSdkManager, "");

We set the camera object as the node attribute of the node object:

lCameraNode->SetNodeAttribute(lCamera);

Finally, we add the node as a child of the root note of the FBX scene graph:

KFbxNode* lRootNode = gScene->GetRootNode()
lRootNode->AddChild(lCameraNode);