3DXI Contrasted with 3ds Max SDK
 
 
 

The following two code samples contrast extracting data using the core 3ds Max SDK and the 3DXI, by using the example of extracting controller data.

Extracting controller data using the core 3ds Max SDK:

Control * cont = node->GetTMController()->GetPositionController();
 
if (!cont) // Bug out if no controller.
    return;
 
int i;
IKeyControl *ikc = NULL;
ikc = GetKeyControlInterface(cont);
 
// TCB point3
if (ikc && cont->ClassID() == Class_ID(TCBINTERP_POINT3_CLASS_ID, 0)) {
    for (i=0; i<ikc->GetNumKeys(); i++) {
         ITCBPoint3Key key;
        ikc->GetKey(i, &key);
    // do as you wish with the data
    }
}

Extracting controller data using 3DXI:

IGameKeyTab poskeys;
IGameControl * pGameControl = gameNode->GetIGameControl();
pGameControl->GetBezierKeys(poskeys, IGAME_POS));