1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 03:39:14 +00:00
OpenMW/apps/openmw/mwrender/characterpreview.hpp

70 lines
1.4 KiB
C++
Raw Normal View History

2012-09-12 22:54:32 +00:00
#ifndef MWRENDER_CHARACTERPREVIEW_H
#define MWRENDER_CHARACTERPREVIEW_H
#include <OgreRenderTarget.h>
2012-09-14 12:34:18 +00:00
#include <OgreMaterialManager.h>
namespace OEngine
{
namespace Render
{
class SelectionBuffer;
}
}
2012-09-12 22:54:32 +00:00
namespace MWRender
{
2012-09-13 17:03:31 +00:00
class NpcAnimation;
2012-09-12 22:54:32 +00:00
class CharacterPreview
{
public:
2012-09-13 17:03:31 +00:00
CharacterPreview(Ogre::SceneManager* sceneMgr, Ogre::SceneNode* node, int sizeX, int sizeY, const std::string& name,
Ogre::Vector3 position, Ogre::Vector3 lookAt);
2012-09-12 22:54:32 +00:00
2012-09-13 17:03:31 +00:00
protected:
2012-09-12 22:54:32 +00:00
Ogre::TexturePtr mTexture;
Ogre::RenderTarget* mRenderTarget;
Ogre::Viewport* mViewport;
Ogre::Camera* mCamera;
Ogre::SceneManager* mSceneMgr;
Ogre::SceneNode* mNode;
2012-09-13 17:03:31 +00:00
int mSizeX;
int mSizeY;
};
class InventoryPreview : public CharacterPreview
{
public:
InventoryPreview(Ogre::SceneManager* sceneMgr, Ogre::SceneNode* node);
2012-09-14 12:34:18 +00:00
virtual ~InventoryPreview();
2012-09-13 17:03:31 +00:00
void update(int sizeX, int sizeY);
2012-09-14 12:34:18 +00:00
int getSlotSelected(int posX, int posY);
2012-09-13 17:03:31 +00:00
void setNpcAnimation (NpcAnimation* anim);
private:
NpcAnimation* mAnimation;
2012-09-14 12:34:18 +00:00
OEngine::Render::SelectionBuffer* mSelectionBuffer;
2012-09-13 17:03:31 +00:00
};
class RaceSelectionPreview : public CharacterPreview
{
public:
RaceSelectionPreview(Ogre::SceneManager* sceneMgr, Ogre::SceneNode* node);
void update(float angle);
2012-09-12 22:54:32 +00:00
};
}
#endif