本文整理汇总了C++中ModelLoader::loadModel方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelLoader::loadModel方法的具体用法?C++ ModelLoader::loadModel怎么用?C++ ModelLoader::loadModel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelLoader
的用法示例。
在下文中一共展示了ModelLoader::loadModel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QGLWidget
GLWidget::GLWidget(const QGLFormat & format, QWidget * parent) : QGLWidget(format, parent),
mShaderProgram(this),
mViewMatrix(),
mProjectionMatrix(){
float ratio = float(geometry().width())/float(geometry().height());
mProjectionMatrix.perspective(60, ratio, .1, 100); // ortho(-5,5,-5,5,-5,5);//Orthogonal projection
mViewMatrix.translate(0.0,0.0,-10.0);
ModelLoader* loader = ModelFactory::getModelLoader("models/monkey.obj");
if(loader != NULL){
objTest = (StaticModel*)loader->loadModel();
}
objTest->mModelMatrix.translate(0,0,0);
delete loader;
manip = new SphereManipulator("cube manipulator", objTest);
this->grabKeyboard();
}
示例2: trainingMode
void trainingMode(){
/* ********************* Interface part **********************/
/* ********************* **** ************** **** **********************/
cout << endl << endl;
cout << " ================== Training mode =============" << endl;
cout << " == Enter number of training examples: "; cin >> numTrainingExamples;
cout << " == Enter number of LBFGS iterations: " ; cin >> numLbfgsIterations;
cout << " == Enter lambda: " ; cin >> lambda;
/* Checking if input is valid */
if (numTrainingExamples > 40000) numTrainingExamples = 40000;
if (numTrainingExamples <= 0) numTrainingExamples = 150;
if (numLbfgsIterations < 1) numLbfgsIterations = 5;
/* Reading model */
//NNModel* model = readModel();
ModelLoader l;
NNModel* model = l.loadModel("modelL56.nn");
trainModel(model);
}