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;
78 const std::string &bonefilter,
bool enchantedGlow, osg::Vec4f* glowColor=NULL);
84 bool enchantedGlow=
false, osg::Vec4f* glowColor=NULL);
86 void addPartGroup(
int group,
int priority,
const std::vector<ESM::PartReference> &parts,
87 bool enchantedGlow=
false, osg::Vec4f* glowColor=NULL);
110 bool disableSounds =
false,
ViewMode viewMode=
VM_Normal,
float firstPersonFieldOfView=55.f);
148 int getSlot(
const osg::NodePath& path)
const;
159 static const std::vector<const ESM::BodyPart*>&
getBodyParts(
const std::string& raceId,
bool female,
bool firstperson,
bool werewolf);
void updateParts()
Definition: npcanimation.cpp:496
virtual void permanentEffectAdded(const ESM::MagicEffect *magicEffect, bool isNew)
Definition: npcanimation.cpp:971
virtual void attachArrow()
Definition: npcanimation.cpp:936
void rebuild()
Rebuilds the NPC, updating their root model, animation sources, and equipment.
Definition: npcanimation.cpp:390
Wrapper class that constructs and provides access to the most commonly used resource subsystems...
Definition: resourcesystem.hpp:30
void reserveIndividualPart(ESM::PartReferenceType type, int group, int priority)
Definition: npcanimation.cpp:693
ViewMode
Definition: npcanimation.hpp:32
NpcAnimation(const MWWorld::Ptr &ptr, osg::ref_ptr< osg::Group > parentNode, Resource::ResourceSystem *resourceSystem, bool disableSounds=false, ViewMode viewMode=VM_Normal, float firstPersonFieldOfView=55.f)
Definition: npcanimation.cpp:279
void removePartGroup(int group)
Definition: npcanimation.cpp:703
PartHolderPtr mObjectParts[ESM::PRT_Count]
Definition: npcanimation.hpp:42
osg::Vec3f mFirstPersonOffset
Definition: npcanimation.hpp:63
virtual void setPitchFactor(float factor)
Definition: npcanimation.hpp:125
std::string mHairModel
Definition: npcanimation.hpp:47
void removeIndividualPart(ESM::PartReferenceType type)
Definition: npcanimation.cpp:680
virtual void showWeapons(bool showWeapon)
Definition: npcanimation.cpp:878
PartReferenceType
Definition: loadarmo.hpp:13
Definition: npcanimation.hpp:33
virtual ~NpcAnimation()
Definition: npcanimation.cpp:274
Handles attach & release of projectiles for ranged weapons.
Definition: weaponanimation.hpp:29
osg::ref_ptr< NeckController > mFirstPersonNeckController
Definition: npcanimation.hpp:91
const ESM::NPC * mNpc
Definition: npcanimation.hpp:45
virtual osg::Vec3f runAnimation(float timepassed)
Definition: npcanimation.cpp:656
std::shared_ptr< HeadAnimationTime > mHeadAnimationTime
Definition: npcanimation.hpp:67
Definition: npcanimation.hpp:56
virtual void setAccurateAiming(bool enabled)
Definition: npcanimation.cpp:1183
bool mShowCarriedLeft
Definition: npcanimation.hpp:50
virtual void equipmentChanged()
Definition: npcanimation.cpp:1009
virtual void showCarriedLeft(bool show)
Definition: npcanimation.cpp:914
std::shared_ptr< PartHolder > PartHolderPtr
Definition: animation.hpp:72
float mAimingFactor
Definition: npcanimation.hpp:73
static const std::vector< const ESM::BodyPart * > & getBodyParts(const std::string &raceId, bool female, bool firstperson, bool werewolf)
Definition: npcanimation.cpp:1042
Variant of the ContainerStore for NPCs.
Definition: inventorystore.hpp:20
float mFirstPersonFieldOfView
Definition: npcanimation.hpp:65
static const PartBoneMap sPartList
Definition: npcanimation.hpp:39
Definition: npcanimation.hpp:54
float mPitchFactor
Definition: weaponanimation.hpp:66
std::shared_ptr< WeaponAnimationTime > mWeaponAnimationTime
Definition: npcanimation.hpp:68
Definition: actoranimation.hpp:31
ViewMode mViewMode
Definition: npcanimation.hpp:48
virtual void setVampire(bool vampire)
Definition: npcanimation.cpp:1014
Definition: loadnpc.hpp:23
virtual void enableHeadAnimation(bool enable)
Definition: npcanimation.cpp:999
bool mAccurateAiming
Definition: npcanimation.hpp:72
void updateNpcBase()
Definition: npcanimation.cpp:412
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:1027
void setViewMode(ViewMode viewMode)
Definition: npcanimation.cpp:305
virtual osg::Node * getWeaponNode()
Definition: npcanimation.cpp:958
int mPartslots[ESM::PRT_Count]
Definition: npcanimation.hpp:60
Definition: loadmgef.hpp:13
std::map< ESM::PartReferenceType, std::string > PartBoneMap
Definition: npcanimation.hpp:30
virtual void releaseArrow(float attackStrength)
Definition: npcanimation.cpp:941
bool mSoundsDisabled
Definition: npcanimation.hpp:70
static bool isFirstPersonPart(const ESM::BodyPart *bodypart)
Definition: npcanimation.cpp:712
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:397
virtual void updatePtr(const MWWorld::Ptr &updated)
Definition: npcanimation.cpp:1032
bool addOrReplaceIndividualPart(ESM::PartReferenceType type, int group, int priority, const std::string &mesh, bool enchantedGlow=false, osg::Vec4f *glowColor=NULL)
Definition: npcanimation.cpp:725
bool mShowWeapons
Definition: npcanimation.hpp:49
NpcType mNpcType
Definition: npcanimation.hpp:58
static bool isFemalePart(const ESM::BodyPart *bodypart)
Definition: npcanimation.cpp:720
virtual osg::Group * getArrowBone()
Definition: npcanimation.cpp:946
Definition: npcanimation.hpp:23
Definition: npcanimation.hpp:55
virtual void addControllers()
Definition: npcanimation.cpp:854
Definition: npcanimation.hpp:35
std::string mSoundIds[ESM::PRT_Count]
Definition: npcanimation.hpp:43
Definition: loadbody.hpp:12
virtual void showWeapon(bool show)
Definition: npcanimation.hpp:138
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:52
std::string mHeadModel
Definition: npcanimation.hpp:46
PartHolderPtr insertBoundedPart(const std::string &model, const std::string &bonename, const std::string &bonefilter, bool enchantedGlow, osg::Vec4f *glowColor=NULL)
Definition: npcanimation.cpp:640
void addPartGroup(int group, int priority, const std::vector< ESM::PartReference > &parts, bool enchantedGlow=false, osg::Vec4f *glowColor=NULL)
Definition: npcanimation.cpp:806
Definition: npcanimation.hpp:34
Definition: loadarmo.hpp:43
virtual Resource::ResourceSystem * getResourceSystem()
Definition: npcanimation.cpp:966
virtual void setWeaponGroup(const std::string &group)
Definition: npcanimation.cpp:1004
virtual void setRenderBin()
Set the render bin for this animation's object root. May be customized by subclasses.
Definition: npcanimation.cpp:370
int mPartPriorities[ESM::PRT_Count]
Definition: npcanimation.hpp:61