基类具有不完整的类型
这个错误究竟是什么意思,我该如何解决?我试图通过class Entity在我的EntityPhysics标题中声明该类来声明该类,但它不起作用.
这是我的Entity.h
#ifndef __Game__Entity__
#define __Game__Entity__
#include <iostream>
#include <string>
#include "OGRE/Ogre.h"
#include "OgreInit.h"
class Entity{
public:
Entity(std::string entityId, std::string mesh, Ogre::Vector3 position = Ogre::Vector3::ZERO, Ogre::Vector3 rotation = Ogre::Vector3::ZERO);
virtual ~Entity() = 0;
void setPosition(Ogre::Vector3 position);
Ogre::Vector3 getPosition();
void setRotation(Ogre::Vector3 rotationIncrease);
Ogre::Vector3 getRotation();
void setMesh(std::string meshName);
std::string getMesh();
virtual void tick() = 0;
void removeEntity();
Ogre::Entity getEntity();
Ogre::SceneNode getSceneNode();
std::string entityId;
protected:
Ogre::Entity *ent;
Ogre::SceneNode *nod;
};
#endif /* defined(__Game__Entity__) */
Run Code Online (Sandbox Code Playgroud)
和我的EntityPhysics.h
#ifndef __Game__EntityPhysics__
#define __Game__EntityPhysics__ …Run Code Online (Sandbox Code Playgroud)