当前位置: 首页>>代码示例>>C++>>正文


C++ ModelManager类代码示例

本文整理汇总了C++中ModelManager的典型用法代码示例。如果您正苦于以下问题:C++ ModelManager类的具体用法?C++ ModelManager怎么用?C++ ModelManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ModelManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AddMesh

//////////////////////////////////////////////////////////////////////////
//
// Class ModelManagerSlaver
// 
void ModelManagerWrapper::AddMesh( const std::wstring& meshID, const std::wstring& meshFilename, const std::wstring& textureFilename )
{
	ModelManager* pModelMan = MyIrrlichtEngine::GetEngine()->GetModelManager();

	pModelMan->AddMesh( meshID, meshFilename, textureFilename );

}
开发者ID:HermanYang,项目名称:Scar,代码行数:11,代码来源:PythonWrapper.cpp

示例2: sprintf

bool RobotBrainServiceService::start(int argc, char* argv[])
{
  char adapterStr[255];

  //Create the topics
  SimEventsUtils::createTopic(communicator(), "SalientPointMessageTopic");

  //Create the adapter
  sprintf(adapterStr, "default -p %i", RobotBrainObjects::RobotBrainPort);
  itsAdapter = communicator()->createObjectAdapterWithEndpoints("SaliencyModule",
                                                                adapterStr);

  //Create the manager and its objects
  itsMgr = new ModelManager("SaliencyModuleService");

  LINFO("Starting SaliencyModule");
  nub::ref<SaliencyModuleI> ret(new SaliencyModuleI(*itsMgr));
  itsMgr->addSubComponent(ret);

  ret->init(communicator(), itsAdapter);

  itsMgr->parseCommandLine((const int)argc, (const char**)argv, "", 0, 0);

  itsAdapter->activate();

  itsMgr->start();

  return true;
}
开发者ID:ulyssesrr,项目名称:carmen_lcad,代码行数:29,代码来源:test-SaliencyModuleI.C

示例3: app

bool SeaBee3GUIService::start(int argc, char* argv[])
{
  QApplication app(argc, argv);

  itsMgr = new ModelManager("SeaBeeIIIGUIManager");

  char adapterStr[255];
  LINFO("Creating Adapter");
  sprintf(adapterStr, "default -p %i", 12345);
  itsAdapter = communicator()->createObjectAdapterWithEndpoints("RobotBrainPort",
      adapterStr);

  nub::ref<MainWindow> mainWindow(new MainWindow(*itsMgr));
  itsMgr->addSubComponent(mainWindow);

  LINFO("Starting Up GUI Comm");
  mainWindow->initIce(communicator(), itsAdapter);

  itsMgr->parseCommandLine(argc, argv, "", 0, 0);

  itsAdapter->activate();

  itsMgr->start();

  mainWindow->setGeometry(100,100,900,800);
  mainWindow->show();

  return app.exec();
}
开发者ID:ulyssesrr,项目名称:carmen_lcad,代码行数:29,代码来源:app-SeaBeeIIIGUI.C

示例4: setup

void CompanyWidget::setup(int companyType, bool isFin, bool isContact,
                          bool isAdd, bool isLabel)
{
    ui->finFrame->setHidden(!isFin);
    ui->contactFrame->setHidden(!isContact);
    ui->addCompany->setHidden(!isAdd);
    ui->typeLabel->setHidden(!isLabel);

    this->companyType = companyType;

    ModelManager *models = ModelManager::getInstance();

    if (isContact) {
        contactF = new SortFilterModel(this);
        contactF->setFilterRole(ContactModel::companyIdRole);
        contactF->setSourceModel(models->getContactModel());
        ui->contact->setModel(contactF);
    }

    SortFilterModel *companyF = new SortFilterModel(this);
    companyF->setFilterRole(CompanyModel::typeRole);
    companyF->setMatchValue(companyType);
    companyF->setSourceModel(models->getCompanyModel());
    ui->company->setModel(companyF);

    if (companyType == Company::CUSTOMER) {
        ui->typeLabel->setText(QString::fromUtf8("Заказчики"));

    } else if  (companyType == Company::SUPPLIER) {
        ui->typeLabel->setText(QString::fromUtf8("Поставщики"));

    }  else if  (companyType == -1) {
        ui->typeLabel->setText(QString::fromUtf8("Компании"));
    }
}
开发者ID:shul20,项目名称:proprint,代码行数:35,代码来源:companywidget.cpp

示例5: LDEBUG

bool RobotBrainServiceService::start(int argc, char* argv[])
#endif	
{
  MYLOGVERB = LOG_INFO;

  char adapterStr[255];

  //Create the adapter
  int port = RobotBrainObjects::RobotBrainPort;
  bool connected = false;

  // try to connect to ports until successful
  LDEBUG("Opening Connection");
  while(!connected)
  {
    try
    {
      LINFO("Trying Port:%d", port);
      sprintf(adapterStr, "default -p %i", port);
      itsAdapter = communicator()->createObjectAdapterWithEndpoints
        ("GistSal_Navigation", adapterStr);
      connected = true;
    }
    catch(Ice::SocketException)
    {
      port++;
    }
  }

  //Create the manager and its objects
  itsMgr = new ModelManager("BeoLocalizationService");

  LINFO("Starting BeoLocalization System");
  nub::ref<BeoLocalizer>
    bl(new BeoLocalizer
        (*itsMgr, "BeoLocalizer", "BeoLocalizer"));
  LINFO("BeoLocalizer created");
  itsMgr->addSubComponent(bl);
  LINFO("BeoLocalizer Added As a subcomponent");
  bl->init(communicator(), itsAdapter);
  LINFO("BeoLocalizer initiated");

  // check command line inputs/options
  if (itsMgr->parseCommandLine((const int)argc, (const char**)argv,
                               "", 0, 0)
      == false) return(1);

  // FIXXX: in the future the map should be specificable 
  //        from the command line to allow for stand alone application

  // check app-Beobot2_GistSalLocalizer.C


  // activate manager and adapter
  itsAdapter->activate();
  itsMgr->start();

  return true;
}
开发者ID:ulyssesrr,项目名称:carmen_lcad,代码行数:59,代码来源:app-BeoLocalizer.C

示例6: while

bool RobotBrainServiceService::start(int argc, char* argv[])
{
  char adapterStr[255];

  //Create the adapter
  int port = RobotBrainObjects::RobotBrainPort;
  bool connected = false;

  while(!connected)
    {
      try
        {
          LINFO("Trying Port:%d", port);
          sprintf(adapterStr, "default -p %i", port);
          itsAdapter = communicator()->createObjectAdapterWithEndpoints("SeaBee3SimulatorAdapter",
                                                                        adapterStr);
          connected = true;
        }
      catch(Ice::SocketException)
        {
          port++;
        }
    }

  //Create the manager and its objects
  itsMgr = new ModelManager("SeaBee3SimulatorServiceManager");

  nub::ref<OutputFrameSeries> ofs(new OutputFrameSeries(*itsMgr));
  itsMgr->addSubComponent(ofs);


  LINFO("Starting SeaBee3 Simulator");
  nub::ref<SeaBee3Simulator> subSim(new SeaBee3Simulator(*itsMgr, "SeaBee3Simulator", "SeaBee3Simulator"));
  itsMgr->addSubComponent(subSim);
  subSim->init(communicator(), itsAdapter);

  itsMgr->parseCommandLine((const int)argc, (const char**)argv, "", 0, 0);

  itsAdapter->activate();

  itsMgr->start();

  while(1){
    Layout<PixRGB<byte> > outDisp;

    subSim->simLoop();
    Image<PixRGB<byte> > forwardCam = flipVertic(subSim->getFrame(1));
    Image<PixRGB<byte> > downwardCam = flipVertic(subSim->getFrame(2));

    outDisp = vcat(outDisp, hcat(forwardCam, downwardCam));

    ofs->writeRgbLayout(outDisp, "subSim", FrameInfo("subSim", SRC_POS));

    handle_keys(ofs, subSim);
  }


  return true;
}
开发者ID:ulyssesrr,项目名称:carmen_lcad,代码行数:59,代码来源:test-SeaBee3Simulator.C

示例7: LDEBUG

bool RobotBrainServiceService::start(int argc, char* argv[])
#endif	
{
  MYLOGVERB = LOG_INFO;

  char adapterStr[255];

  //Create the topics
//  SimEventsUtils::createTopic(communicator(), "BeoGPSMessageTopic");

  //Create the adapter
  int port = RobotBrainObjects::RobotBrainPort;
  bool connected = false;

  // try to connect to ports until successful
  LDEBUG("Opening Connection");
  while(!connected)
  {
    try
    {
      LINFO("Trying Port:%d", port);
      sprintf(adapterStr, "default -p %i", port);
      itsAdapter = communicator()->createObjectAdapterWithEndpoints
        ("BeoGPS", adapterStr);
      connected = true;
    }
    catch(Ice::SocketException)
    {
      port++;
    }
  }

  //Create the manager and its objects
  itsMgr = new ModelManager("BeoGPSService");

  LINFO("Starting BeoGPS System");
  nub::ref<BeoGPS> gps(new BeoGPS(*itsMgr, "BeoGPS", "BeoGPS"));
  LINFO("BeoGPS created");
  itsMgr->addSubComponent(gps);
  LINFO("BeoGPS Added As a subcomponent");
  gps->init(communicator(), itsAdapter);
  LINFO("BeoGPS initiated");

  // check command line inputs/options
  if (itsMgr->parseCommandLine
      (argc, argv, "<serdev>", 0, 0) == false)
    return(1);

  // let's configure our serial device:
//   gps->configureSerial(itsMgr->getExtraArg(0));
//   LINFO("Using: %s", itsMgr->getExtraArg(0).c_str());

  // activate manager and adapter
  itsAdapter->activate();
  itsMgr->start();

  return true;
}
开发者ID:ulyssesrr,项目名称:carmen_lcad,代码行数:58,代码来源:app-BeoGPS.C

示例8: QDialog

MsgDialog::MsgDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::MsgDialog)
{
    ui->setupUi(this);

    ModelManager *models = ModelManager::getInstance();
    ui->clients->setModel(models->getClientModel());
}
开发者ID:shul20,项目名称:proprint,代码行数:9,代码来源:msgdialog.cpp

示例9: AddSceneNodeByMeshID

PythonSceneNode ModelManagerWrapper::AddSceneNodeByMeshID( const std::wstring& meshID, bool bTestCollision /*= false */ )
{
	ModelManager* pModelMan = MyIrrlichtEngine::GetEngine()->GetModelManager();

	PythonSceneNode node;
	scene::ISceneNode* pNode = pModelMan->AddSceneNodeFromMesh( meshID, bTestCollision );
	node.ptr = pNode;
	//pNode->drop();		// 引用减一
	return node;
}
开发者ID:HermanYang,项目名称:Scar,代码行数:10,代码来源:PythonWrapper.cpp

示例10: main

int main(const int argc, const char **argv)
{

  MYLOGVERB = LOG_INFO;
  ModelManager *mgr = new ModelManager("Extract Patches for Hmax with Feature Learning");

  mgr->exportOptions(MC_RECURSE);

  // required arguments
  // <c1patchesDir> <trainPosDir>

  if (mgr->parseCommandLine(
                            (const int)argc, (const char**)argv, "<c1patchesDir> <trainPosDir>", 2, 2) == false)
    return 1;

  // Create a temp HmaxFL object to extract C1Patches
  std::vector<int> c1ScaleSS(2);
  c1ScaleSS[0] = 1; c1ScaleSS[1] = 3;
  std::vector<int> c1SpaceSS(2);
  c1SpaceSS[0] = 10; c1SpaceSS[1] = 11;
  // desired frame sizes [11 and 13]
  HmaxFL hmax(NORI,c1SpaceSS,c1ScaleSS,2,true,1.0F,1.0F,0.3F,4.05F,-0.05F,11,2);

  std::string c1PatchesBaseDir;
  std::string trainPosName; // Directory where positive images are

  c1PatchesBaseDir = mgr->getExtraArg(0);
  trainPosName = mgr->getExtraArg(1);

  // Extract random patches from a set of images in a positive training directory
  std::vector<std::string> trainPos = hmax.readDir(trainPosName);
  int posTrainSize = trainPos.size();

  //Image<byte> inputb;

  Image<float> trainPosImage;

  std::cout << "Scanned training and testing images" << std::endl;

  std::vector<int> pS(4);
  pS[0] = 4; pS[1] = 8, pS[2] = 12; pS[3] = 16;

  std::srand(time(0));
  for(int i=0;i<NUM_PATCHES_PER_SIZE;i++){
    // Randomly select an image from the list
    unsigned int imInd = static_cast<unsigned int>(floor((rand()-1.0F)/RAND_MAX*posTrainSize));
    trainPosImage = Raster::ReadFloat(trainPos[imInd]);
    // Learn the appropriate simple S2 patches from the C1 results
    hmax.extractRandC1Patch(c1PatchesBaseDir,trainPosImage,i,pS);
  }

  std::cout << "Completed extraction of C1 Patches" << std::endl;

  return 0;
}
开发者ID:ulyssesrr,项目名称:carmen_lcad,代码行数:55,代码来源:extractpatches.C

示例11: on_ambientButton_clicked

void ToolWidget::on_ambientButton_clicked()
{
    ModelManager* model = mainWindow->getModelManager();
    if (!model->openLight()) {
        QMessageBox::critical(this, "Error", "Fail to open new light");
    }
    mainWindow->getViewManager()->repaintAll();
    ui->ambientButton->setEnabled(model->canOpenLight());

    updateLightBox();
    updateLightCanOpen();
}
开发者ID:Ovilia,项目名称:April,代码行数:12,代码来源:ToolWidget.cpp

示例12: if

void ToolWidget::on_tabWidget_currentChanged(QWidget *arg1)
{
    if (arg1 == ui->solidTab) {
        mainWindow->getModelManager()->selectSolid(selectedSolid);
        mainWindow->getViewManager()->repaintAll();
    } else if (arg1 == ui->primitiveTab) {
        ModelManager* model = mainWindow->getModelManager();
        ASolid* solid = model->getSolidFromPmt(selectedPrimitive);
        model->selectSolid(solid);
        mainWindow->getViewManager()->repaintAll();
    }
}
开发者ID:Ovilia,项目名称:April,代码行数:12,代码来源:ToolWidget.cpp

示例13: LoadDataFromScene

void ModelPanel::LoadDataFromScene()
{
	ModelManager* modelMgr = gEngine->GetModelManager();
	std::list<Model*> modelList = modelMgr->GetModelList();

	wxTreeItemId rootId = mTreeCtrl->AddRoot(L"root", 0, 0, New ModelTreeItemData(NULL));

	for(std::list<Model*>::iterator iter = modelList.begin(); iter != modelList.end(); ++iter)
	{
		Model* model = *iter;
		appendModel(rootId, model);
	}
}
开发者ID:SinYocto,项目名称:Zee,代码行数:13,代码来源:ModelPanel.cpp

示例14: on_visiblePmtBtn_clicked

void ToolWidget::on_visiblePmtBtn_clicked()
{
    ModelManager* model = mainWindow->getModelManager();
    ASolid* solid = model->getSolidFromPmt(selectedPrimitive);
    if (solid) {
        solid->setVisible(!solid->getVisible());
        mainWindow->getViewManager()->repaintAll();
        if (ui->visiblePmtBtn->text() == "Hide") {
            ui->visiblePmtBtn->setText("Show");
        } else {
            ui->visiblePmtBtn->setText("Hide");
        }
    }
}
开发者ID:Ovilia,项目名称:April,代码行数:14,代码来源:ToolWidget.cpp

示例15: LINFO

bool RobotBrainServiceService::start(int argc, char* argv[])
{
  char adapterStr[255];

  LINFO("Creating Topic!");
  //Create the topics
//  SimEventsUtils::createTopic(communicator(), "BinFinderMessageTopic");

  //Create the adapter
  int port = RobotBrainObjects::RobotBrainPort;
  bool connected = false;
  LDEBUG("Opening Connection");

  while(!connected)
  {
    try
    {
      LINFO("Trying Port:%d", port);
      sprintf(adapterStr, "default -p %i", port);
      itsAdapter = communicator()->createObjectAdapterWithEndpoints
        ("BinFinder",
          adapterStr);
      connected = true;
    }
    catch(Ice::SocketException)
    {
      port++;
    }
  }

  //Create the manager and its objects
        itsMgr = new ModelManager("BinFinderService");

  LINFO("Starting BinFinder");
  nub::ref<BinFinder> ret
    (new BinFinder(*itsMgr, "BinFinder1", "BinFinder2"));
  LINFO("BinFinder Created");
  itsMgr->addSubComponent(ret);
  LINFO("BinFinder Added As Sub Component");
  ret->init(communicator(), itsAdapter);
  LINFO("BinFinder Inited");

  itsMgr->parseCommandLine((const int)argc, (const char**)argv, "", 0, 0);

  itsAdapter->activate();

  itsMgr->start();

  return true;
}
开发者ID:ulyssesrr,项目名称:carmen_lcad,代码行数:50,代码来源:test-BinFinder.C


注:本文中的ModelManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。