1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 04:49:54 +00:00
openmw-tes3mp/apps/opencs/view/render/actor.hpp

60 lines
1.1 KiB
C++
Raw Normal View History

2018-07-14 02:48:59 +00:00
#ifndef OPENCS_VIEW_RENDER_ACTOR_H
#define OPENCS_VIEW_RENDER_ACTOR_H
#include <string>
#include <osg/ref_ptr>
namespace osg
{
class Group;
}
namespace CSMWorld
{
class Data;
}
namespace SceneUtil
{
class Skeleton;
}
namespace CSVRender
{
/// Handles loading an npc or creature
class Actor
{
public:
/// Creates an actor.
/// \param id The referenceable id
/// \param type The record type
/// \param data The data store
Actor(const std::string& id, int type, CSMWorld::Data& data);
/// Retrieves the base node that meshes are attached to
osg::Group* getBaseNode();
/// (Re)creates the npc or creature renderable
void update();
private:
2018-07-22 20:38:30 +00:00
void loadSkeleton(const std::string& model);
void updateCreature();
void updateNpc();
std::string getBodyPartMesh(const std::string& bodyPartId);
static const std::string MeshPrefix;
2018-07-14 02:48:59 +00:00
std::string mId;
int mType;
CSMWorld::Data& mData;
SceneUtil::Skeleton* mSkeleton;
osg::ref_ptr<osg::Group> mBaseNode;
};
}
#endif