本文整理汇总了C++中Model::GetModelType方法的典型用法代码示例。如果您正苦于以下问题:C++ Model::GetModelType方法的具体用法?C++ Model::GetModelType怎么用?C++ Model::GetModelType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model
的用法示例。
在下文中一共展示了Model::GetModelType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getModel
/*!
This returns the model renderer of the model. A Model renderer is basically a class responsible for managing the same type of models.
\param[in] type Enumeration of the model type want to query.
\return Model pointer.
*/
Model* Renderer::getModel( ModelType type)
{
for( int i=0; i<RenderMemData.models.size(); i++ )
{
Model* model = RenderMemData.models.at(i);
if ( model->GetModelType() == type )
return model;
}
return NULL;
}
示例2: editWorld
void interfaceWindow::editWorld()
{
QMainWindow *editWindow = new QMainWindow;
QWidget *q = new QWidget;
const std::map<std::string, Model*> modelsWithNames = world->GetAllModelsByName();
const std::set<Model*> models = world->GetAllModels();
QComboBox *modls = new QComboBox();
std::set<Model*>::const_iterator it;
it = models.begin();
for(; it != models.end(); it++) {
//Model *m = it->second;
Model *m = *it;
QString name(((std::string)(m->GetModelType())).c_str());
//if(((std::string)m->GetModelType()) == "position"){
//modls->addItem(name+"("+((std::string)m->GetModelType()).c_str()+")");
modls->addItem("("+name+")");
//}
}
//(*it)->GetModelType()
QGridLayout *layout = new QGridLayout;
layout->addWidget(modls, 0, 0);
q->setLayout(layout);
editWindow->setCentralWidget(q);
/*
world->models_by_name;
world->models_by_wfentity;
world->models_with_fiducials_byx;
world->models_with_fiducials_byy;
*/
editWindow->show();
}