openmw-tes3coop/apps/openmw/mwrender/npcanimation.hpp

80 lines
2.7 KiB
C++
Raw Normal View History

#ifndef _GAME_RENDER_NPCANIMATION_H
#define _GAME_RENDER_NPCANIMATION_H
#include "animation.hpp"
#include "components/nifogre/ogre_nif_loader.hpp"
2012-04-08 02:02:20 +00:00
#include "../mwworld/inventorystore.hpp"
2012-04-08 21:27:56 +00:00
#include "../mwclass/npc.hpp"
#include "../mwworld/containerstore.hpp"
namespace MWRender{
class NpcAnimation: public Animation{
2012-04-05 03:23:24 +00:00
private:
MWWorld::InventoryStore& mInv;
int mStateID;
2012-04-12 00:16:22 +00:00
int mPartslots[27]; //Each part slot is taken by clothing, armor, or is empty
int mPartPriorities[27];
2012-04-12 00:16:22 +00:00
//Bounded Parts
2012-07-17 19:19:50 +00:00
std::vector<Ogre::Entity*> lclavicle;
std::vector<Ogre::Entity*> rclavicle;
std::vector<Ogre::Entity*> rupperArm;
std::vector<Ogre::Entity*> lupperArm;
std::vector<Ogre::Entity*> rUpperLeg;
std::vector<Ogre::Entity*> lUpperLeg;
std::vector<Ogre::Entity*> lForearm;
std::vector<Ogre::Entity*> rForearm;
std::vector<Ogre::Entity*> lWrist;
std::vector<Ogre::Entity*> rWrist;
std::vector<Ogre::Entity*> rKnee;
std::vector<Ogre::Entity*> lKnee;
std::vector<Ogre::Entity*> neck;
std::vector<Ogre::Entity*> rAnkle;
std::vector<Ogre::Entity*> lAnkle;
std::vector<Ogre::Entity*> groin;
std::vector<Ogre::Entity*> lfoot;
std::vector<Ogre::Entity*> rfoot;
std::vector<Ogre::Entity*> hair;
std::vector<Ogre::Entity*> head;
2012-04-08 21:27:56 +00:00
bool isBeast;
2012-04-14 22:58:52 +00:00
bool isFemale;
std::string headModel;
std::string hairModel;
std::string npcName;
std::string bodyRaceID;
float timeToChange;
MWWorld::ContainerStoreIterator robe;
2012-04-14 03:25:15 +00:00
MWWorld::ContainerStoreIterator helmet;
2012-04-14 20:44:46 +00:00
MWWorld::ContainerStoreIterator shirt;
MWWorld::ContainerStoreIterator cuirass;
2012-04-14 22:58:52 +00:00
MWWorld::ContainerStoreIterator greaves;
2012-04-14 23:21:14 +00:00
MWWorld::ContainerStoreIterator leftpauldron;
MWWorld::ContainerStoreIterator rightpauldron;
2012-04-15 00:32:46 +00:00
MWWorld::ContainerStoreIterator boots;
MWWorld::ContainerStoreIterator pants;
MWWorld::ContainerStoreIterator leftglove;
MWWorld::ContainerStoreIterator rightglove;
2012-04-15 19:16:48 +00:00
MWWorld::ContainerStoreIterator skirtiter;
public:
NpcAnimation(const MWWorld::Ptr& ptr, OEngine::Render::OgreRenderer& _rend, MWWorld::InventoryStore& _inv);
virtual ~NpcAnimation();
2012-07-17 19:19:50 +00:00
std::vector<Ogre::Entity*> insertBoundedPart(const std::string &mesh, const std::string &bonename);
virtual void runAnimation(float timepassed);
void updateParts();
2012-07-17 19:19:50 +00:00
void removeEntities(std::vector<Ogre::Entity*> &entities);
2012-04-13 00:40:11 +00:00
void removeIndividualPart(int type);
2012-04-15 19:16:48 +00:00
void reserveIndividualPart(int type, int group, int priority);
2012-04-13 02:16:02 +00:00
bool addOrReplaceIndividualPart(int type, int group, int priority, const std::string &mesh);
void removePartGroup(int group);
2012-04-14 22:58:52 +00:00
void addPartGroup(int group, int priority, std::vector<ESM::PartReference>& parts);
};
}
#endif