#ifndef MWRENDER_CHARACTERPREVIEW_H #define MWRENDER_CHARACTERPREVIEW_H #include #include #include "externalrendering.hpp" #include "../mwworld/ptr.hpp" namespace OEngine { namespace Render { class SelectionBuffer; } } namespace MWRender { class NpcAnimation; class CharacterPreview : public ExternalRendering { public: CharacterPreview(MWWorld::Ptr character, int sizeX, int sizeY, const std::string& name, Ogre::Vector3 position, Ogre::Vector3 lookAt); virtual ~CharacterPreview(); virtual void setup (Ogre::SceneManager *sceneManager); virtual void onSetup(); protected: Ogre::TexturePtr mTexture; Ogre::RenderTarget* mRenderTarget; Ogre::Viewport* mViewport; Ogre::Camera* mCamera; Ogre::SceneManager* mSceneMgr; Ogre::SceneNode* mNode; Ogre::Vector3 mPosition; Ogre::Vector3 mLookAt; MWWorld::Ptr mCharacter; MWRender::NpcAnimation* mAnimation; std::string mName; int mSizeX; int mSizeY; }; class InventoryPreview : public CharacterPreview { public: InventoryPreview(MWWorld::Ptr character); virtual ~InventoryPreview(); virtual void onSetup(); void update(int sizeX, int sizeY); int getSlotSelected(int posX, int posY); void setNpcAnimation (NpcAnimation* anim); private: OEngine::Render::SelectionBuffer* mSelectionBuffer; }; class RaceSelectionPreview : public CharacterPreview { public: RaceSelectionPreview(); void update(float angle); }; } #endif