是哪个文档啊?没有看到完整的程序啊
我的程序如下:
#include <vsDOF.h>
……
class myApp : public vpApp {
public:
vsNode* myNode; //定义节点实例
vpObject* myObj; //定义带有dof节点的模型实例
vsDOF* myDof; //定义dof节点实例
……
~myApp()
{
m_myFx->unref();
myDof->unref();
myNode->unref();
myObj->unref();
}
int configure()
{
//实例化模型实例
myObj=vpObject::find("plant");
//实例化节点实例
if (myObj) myNode = myObj ->findNamed("d_dl");
//判断节点是否是dof节点,如果是则强制转换为dof节点,并实例化dof节点实例
if( myNode && myNode->isOfClassType(vsDOF::getStaticClassType()) )
myDof = (vsDOF*)myNode ;
vsDOF::Constraint constraint(true, 0.0f, 360.0f);
myDof ->setConstraint(vsDOF::COMPONENT_ROTATE_H, constraint);//如限制Z轴旋转
return vsgu::SUCCESS;
}
……
}
……
如何实现DOF自动运行?
另外在关闭exe程序后,会出现如下情况:
This application has requested the Runtime to terminate it in an unusual way.
……
vp: one of the components initialized vp, but never shut it down: watch for memory leaks on program exit.
……
请问这个问题又该如何解决?:( |