本文整理汇总了C++中INodeTab::AppendNode方法的典型用法代码示例。如果您正苦于以下问题:C++ INodeTab::AppendNode方法的具体用法?C++ INodeTab::AppendNode怎么用?C++ INodeTab::AppendNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类INodeTab
的用法示例。
在下文中一共展示了INodeTab::AppendNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessGeoBlocks
void MaxAWDExporter::ProcessGeoBlocks()
{
AWDTriGeom *geoBlock;
AWDBlockIterator *it;
int proccessed=0;
it = new AWDBlockIterator(awd->get_mesh_data_blocks());
UpdateProgressBar(MAXAWD_PHASE_PROCESS_GEOMETRY, (double)proccessed/(double)awd->get_mesh_data_blocks()->get_num_blocks());
INodeTab lNodes;
while ((geoBlock = (AWDTriGeom * ) it->next()) != NULL){
INode * node = (INode *)INodeToGeoBlockCache->Get(geoBlock);
if (node==NULL){
AWDMessageBlock * newWarning = new AWDMessageBlock(geoBlock->get_name(), "ERROR: Could not find the INode for this AWDGeometry.");
awd->get_message_blocks()->append(newWarning);
return;
}
lNodes.AppendNode( node );
}
IGameScene* _pIgame = NULL;
_pIgame = GetIGameInterface();
_pIgame->InitialiseIGame( lNodes );
it->reset();
while ((geoBlock = (AWDTriGeom * ) it->next()) != NULL){
INode * node = (INode *)INodeToGeoBlockCache->Get(geoBlock);
if (node==NULL){
AWDMessageBlock * newWarning = new AWDMessageBlock(geoBlock->get_name(), "ERROR: Could not find the INode for this AWDGeometry.");
awd->get_message_blocks()->append(newWarning);
}
else{
int exportThis=false;
IGameObject * gobj = NULL;
IGameMesh * igame_mesh = NULL;
gobj = GetIGameInterface()->GetIGameNode(node)->GetIGameObject();
if(gobj->GetIGameType()==IGameObject::IGAME_MESH){
igame_mesh = (IGameMesh*)gobj;
if (igame_mesh!=NULL){
igame_mesh->InitializeData();
if(igame_mesh->GetNumberOfFaces()>0){
exportThis=true;
}
}
}
if (exportThis){
Object *obj;
obj = node->GetObjectRef();
int skinIdx;
ObjectState os;
IDerivedObject *derivedObject = NULL;
skinIdx = IndexOfSkinMod(node->GetObjectRef(), &derivedObject);
if (skinIdx >= 0) {
// Flatten all modifiers up to but not including
// the skin modifier.
// to do: get the correct time for the neutral-pose
os = derivedObject->Eval(0, skinIdx + 1);
}
else {
// Flatten entire modifier stack
// to do: get the correct time for the neutral-pose
os = node->EvalWorldState(maxInterface->GetTime());
}
obj = os.obj;
ISkin *skin = NULL;
if (derivedObject != NULL && skinIdx >= 0) {
Modifier *mod = derivedObject->GetModifier(skinIdx);
skin = (ISkin *)mod->GetInterface(I_SKIN);
}
ExportTriGeom(geoBlock,obj,node,skin, igame_mesh);
RETURN_IF_ERROR;
}
}
proccessed++;
UpdateProgressBar(MAXAWD_PHASE_PROCESS_GEOMETRY, (double)proccessed/(double)awd->get_mesh_data_blocks()->get_num_blocks());
}
delete it;
_pIgame->ReleaseIGame();
}