MCPcopy Create free account
hub / github.com/OpenMW/openmw / attachBodyPart

Method attachBodyPart

apps/opencs/view/render/actor.cpp:117–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115 }
116
117 void Actor::attachBodyPart(ESM::PartReferenceType type, const std::string& mesh)
118 {
119 auto sceneMgr = mData.getResourceSystem()->getSceneManager();
120
121 // Attach to skeleton
122 std::string boneName = ESM::getBoneName(type);
123 auto node = mNodeMap.find(boneName);
124 if (!mesh.empty() && node != mNodeMap.end())
125 {
126 auto instance = sceneMgr->getInstance(VFS::Path::toNormalized(mesh));
127 SceneUtil::attach(instance, mSkeleton, boneName, node->second, sceneMgr);
128 }
129 }
130
131 std::string Actor::getBodyPartMesh(const ESM::RefId& bodyPartId)
132 {

Callers

nothing calls this directly

Calls 9

getBoneNameFunction · 0.85
toNormalizedFunction · 0.85
attachFunction · 0.85
getSceneManagerMethod · 0.80
getResourceSystemMethod · 0.45
findMethod · 0.45
emptyMethod · 0.45
endMethod · 0.45
getInstanceMethod · 0.45

Tested by

no test coverage detected