1 #ifndef GAME_RENDER_NPCANIMATION_H
2 #define GAME_RENDER_NPCANIMATION_H
6 #include "../mwworld/inventorystore.hpp"
21 class HeadAnimationTime;
30 typedef std::map<ESM::PartReferenceType,std::string>
PartBoneMap;
80 const std::string &bonefilter,
bool enchantedGlow, osg::Vec4f* glowColor=NULL);
86 bool enchantedGlow=
false, osg::Vec4f* glowColor=NULL);
88 void addPartGroup(
int group,
int priority,
const std::vector<ESM::PartReference> &parts,
89 bool enchantedGlow=
false, osg::Vec4f* glowColor=NULL);
109 bool disableSounds =
false,
ViewMode viewMode=
VM_Normal,
float firstPersonFieldOfView=55.f);
147 int getSlot(
const osg::NodePath& path)
const;
158 static const std::vector<const ESM::BodyPart*>&
getBodyParts(
const std::string& raceId,
bool female,
bool firstperson,
bool werewolf);
boost::shared_ptr< WeaponAnimationTime > mWeaponAnimationTime
Definition: npcanimation.hpp:70
void updateParts()
Definition: npcanimation.cpp:532
virtual void permanentEffectAdded(const ESM::MagicEffect *magicEffect, bool isNew)
Definition: npcanimation.cpp:975
virtual void attachArrow()
Definition: npcanimation.cpp:940
void rebuild()
Rebuilds the NPC, updating their root model, animation sources, and equipment.
Definition: npcanimation.cpp:402
Wrapper class that constructs and provides access to the most commonly used resource subsystems...
Definition: resourcesystem.hpp:24
void reserveIndividualPart(ESM::PartReferenceType type, int group, int priority)
Definition: npcanimation.cpp:718
ViewMode
Definition: npcanimation.hpp:32
void removePartGroup(int group)
Definition: npcanimation.cpp:728
PartHolderPtr mObjectParts[ESM::PRT_Count]
Definition: npcanimation.hpp:44
osg::Vec3f mFirstPersonOffset
Definition: npcanimation.hpp:65
virtual void setPitchFactor(float factor)
Definition: npcanimation.hpp:124
std::string mHairModel
Definition: npcanimation.hpp:49
void removeIndividualPart(ESM::PartReferenceType type)
Definition: npcanimation.cpp:705
virtual void showWeapons(bool showWeapon)
Definition: npcanimation.cpp:886
PartReferenceType
Definition: loadarmo.hpp:13
Definition: npcanimation.hpp:33
virtual ~NpcAnimation()
Definition: npcanimation.cpp:270
Handles attach & release of projectiles for ranged weapons.
Definition: weaponanimation.hpp:29
osg::ref_ptr< NeckController > mFirstPersonNeckController
Definition: npcanimation.hpp:93
const ESM::NPC * mNpc
Definition: npcanimation.hpp:47
virtual osg::Vec3f runAnimation(float timepassed)
Definition: npcanimation.cpp:681
Definition: npcanimation.hpp:58
virtual void setAccurateAiming(bool enabled)
Definition: npcanimation.cpp:1154
bool mShowCarriedLeft
Definition: npcanimation.hpp:52
virtual void equipmentChanged()
Definition: npcanimation.cpp:1013
virtual void showCarriedLeft(bool show)
Definition: npcanimation.cpp:920
float mAimingFactor
Definition: npcanimation.hpp:75
static const std::vector< const ESM::BodyPart * > & getBodyParts(const std::string &raceId, bool female, bool firstperson, bool werewolf)
Definition: npcanimation.cpp:1046
Variant of the ContainerStore for NPCs.
Definition: inventorystore.hpp:20
float mFirstPersonFieldOfView
Definition: npcanimation.hpp:67
static const PartBoneMap sPartList
Definition: npcanimation.hpp:39
Definition: npcanimation.hpp:56
float mPitchFactor
Definition: weaponanimation.hpp:66
Definition: actoranimation.hpp:31
ViewMode mViewMode
Definition: npcanimation.hpp:50
virtual void setVampire(bool vampire)
Definition: npcanimation.cpp:1018
Definition: loadnpc.hpp:23
virtual void enableHeadAnimation(bool enable)
Definition: npcanimation.cpp:1003
bool mAccurateAiming
Definition: npcanimation.hpp:74
void updateNpcBase()
Definition: npcanimation.cpp:427
void setFirstPersonOffset(const osg::Vec3f &offset)
Set a translation offset (in object root space) to apply to meshes when in first person mode...
Definition: npcanimation.cpp:1031
void setViewMode(ViewMode viewMode)
Definition: npcanimation.cpp:317
virtual osg::Node * getWeaponNode()
Definition: npcanimation.cpp:962
int mPartslots[ESM::PRT_Count]
Definition: npcanimation.hpp:62
Definition: loadmgef.hpp:13
NpcAnimation(const MWWorld::Ptr &ptr, osg::ref_ptr< osg::Group > parentNode, Resource::ResourceSystem *resourceSystem, bool disableListener=false, bool disableSounds=false, ViewMode viewMode=VM_Normal, float firstPersonFieldOfView=55.f)
Definition: npcanimation.cpp:287
std::map< ESM::PartReferenceType, std::string > PartBoneMap
Definition: npcanimation.hpp:30
virtual void releaseArrow(float attackStrength)
Definition: npcanimation.cpp:945
bool mSoundsDisabled
Definition: npcanimation.hpp:72
bool mListenerDisabled
Definition: npcanimation.hpp:41
int getSlot(const osg::NodePath &path) const
Get the inventory slot that the given node path leads into, or -1 if not found.
Definition: npcanimation.cpp:412
virtual void updatePtr(const MWWorld::Ptr &updated)
Definition: npcanimation.cpp:1036
bool addOrReplaceIndividualPart(ESM::PartReferenceType type, int group, int priority, const std::string &mesh, bool enchantedGlow=false, osg::Vec4f *glowColor=NULL)
Definition: npcanimation.cpp:737
bool mShowWeapons
Definition: npcanimation.hpp:51
NpcType mNpcType
Definition: npcanimation.hpp:60
virtual osg::Group * getArrowBone()
Definition: npcanimation.cpp:950
Definition: npcanimation.hpp:23
Definition: npcanimation.hpp:57
virtual void addControllers()
Definition: npcanimation.cpp:862
Definition: npcanimation.hpp:35
std::string mSoundIds[ESM::PRT_Count]
Definition: npcanimation.hpp:45
virtual void showWeapon(bool show)
Definition: npcanimation.hpp:137
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
void enable(CodeContainer &code, Literals &literals, const std::string &id)
Definition: generator.cpp:870
NpcType
Definition: npcanimation.hpp:54
std::string mHeadModel
Definition: npcanimation.hpp:48
PartHolderPtr insertBoundedPart(const std::string &model, const std::string &bonename, const std::string &bonefilter, bool enchantedGlow, osg::Vec4f *glowColor=NULL)
Definition: npcanimation.cpp:670
void addPartGroup(int group, int priority, const std::vector< ESM::PartReference > &parts, bool enchantedGlow=false, osg::Vec4f *glowColor=NULL)
Definition: npcanimation.cpp:814
boost::shared_ptr< HeadAnimationTime > mHeadAnimationTime
Definition: npcanimation.hpp:69
Definition: npcanimation.hpp:34
boost::shared_ptr< PartHolder > PartHolderPtr
Definition: animation.hpp:75
Definition: loadarmo.hpp:43
virtual Resource::ResourceSystem * getResourceSystem()
Definition: npcanimation.cpp:970
virtual void setWeaponGroup(const std::string &group)
Definition: npcanimation.cpp:1008
virtual void setRenderBin()
Set the render bin for this animation's object root. May be customized by subclasses.
Definition: npcanimation.cpp:382
int mPartPriorities[ESM::PRT_Count]
Definition: npcanimation.hpp:63