简体   繁体   English

如何获得OSG中的动画进行播放?

[英]How do I get animation in OSG to playback?

I'm relatively new to c++ and open scene graph. 我是C ++和开放场景图的新手。 I'm trying to make something that I have recorded in the application to playback, however I have an error that just won't budge - hoping it's something easy to fix. 我正在尝试制作一些已记录在应用程序中的内容以进行播放,但是我遇到了一个不会让步的错误-希望它很容易修复。

if (!robotInputDeviceState->paused) {
            bodycb->setPause(false);

            robotInputDeviceState->outline->setWidth(0);
        }
        else {
            bodycb->setPause(true);

            findNode.getFirst()->setUpdateCallback(new updateRobotPosCallback(robotInputDeviceState, "BodyRotator"));
            robotInputDeviceState->bodyPath->clear();

        }
        return false;
        break;

The error code is in the screenshot below, and the red underline is on the bracket '(' after new updateRobotPosCallback and before the robotInputDeviceState. 错误代码在下面的屏幕截图中,红色下划线在新的updateRobotPosCallback之后和robotInputDeviceState之前的括号'('上。

Any ideas? 有任何想法吗? 错误代码详细信息

I agree with the comment above by Jonathan - this is a fairly generic C++ compilation error, not really OSG-related. 我同意Jonathan的上述评论-这是一个相当普通的C ++编译错误,与OSG无关。 You are trying to use a version of the constructor that does not exist. 您正在尝试使用不存在的构造函数版本。 Did you write the class updateRobotPosCallback? 您是否编写了updateRobotPosCallback类? If so, does it have the 2-argument constructor in both the header file and the implementation file? 如果是这样,它在头文件和实现文件中都具有2参数构造函数吗? If you didn't write it, where did you get it from, and are there more files that you are missing? 如果您没有编写文件,那么它是从哪里获得的,还有更多丢失的文件吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM