问题描述
//主应用程序类。
class myApp:public vpApp
{
public:
/ *
构造函数
* /
myApp()
{
}
/ **
*析构函数
* /
~myApp()
{
//缓存Vega Prime类实例的非参与成员变量
}
int configure()
{
// pre -configuration
//首先配置vega prime系统
vpApp :: configure();
// vsgu :: SUCCESS
返回0;
}
public:
void createobject()
{
vpObject * m_espirit;
m_espirit =新vpObject;
m_espirit-> setFileName(C:\\Presagis\\Vega_Prime_3\\resources\\data\\models\\\ \\ esprit \\\\prit.flt);
m_espirit-> setPosition(-835,-865,55);
m_espirit-> setScale(5 ,5,5);
m_espirit-> setOrientation(-43,0,0);
vpScene * myScene = vpScene :: find(myScene);
myScene-> addChild(m_espirit);
}
};
int main(int argc,char * argv [])
{
//初始化vega prime
vp :: initialize(argc ,argv);
//创建我的应用实例
myApp * app = new myApp;
//加载acf文件
if(argc< = 1)
app-> define(Nokiaacf.acf);
else
app-> define(argv [1]);
//配置我的应用
app-> configure();
//调用函数
app-> createobject();
//运行时循环
app- > run();
//来自我的应用实例
app-> unref();
//关闭vega prime
vp :: shutdown();
返回0;
}
// the main application class.
class myApp : public vpApp
{
public:
/*
Constructor
*/
myApp()
{
}
/**
* Destructor
*/
~myApp()
{
// unreference member variables which cache Vega Prime class instances
}
int configure()
{
// pre-configuration
// configure vega prime system first
vpApp::configure();
//vsgu::SUCCESS
return 0;
}
public:
void createobject()
{
vpObject *m_espirit;
m_espirit=new vpObject;
m_espirit->setFileName("C:\\Presagis\\Vega_Prime_3\\resources\\data\\models\\esprit\\esprit.flt");
m_espirit->setPosition(-835,-865,55);
m_espirit->setScale(5,5,5);
m_espirit->setOrientation(-43,0,0);
vpScene *myScene=vpScene::find("myScene");
myScene->addChild(m_espirit);
}
};
int main(int argc, char *argv[])
{
// initialize vega prime
vp::initialize(argc, argv);
// create my app instance
myApp *app = new myApp;
// load acf file
if (argc <= 1)
app->define("Nokiaacf.acf");
else
app->define(argv[1]);
// configure my app
app->configure();
//calling function
app->createobject();
// runtime loop
app->run();
// unref my app instance
app->unref();
// shutdown vega prime
vp::shutdown();
return 0;
}
推荐答案
这篇关于如何在Vega prime中向对象添加运动,我已经添加了对象但是无法给出运动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!