2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-04-05 01:51:25 +00:00
|
|
|
|
2016-04-09 23:19:17 +00:00
|
|
|
#include "CFactoryMgr.hpp"
|
|
|
|
#include "IOStreams.hpp"
|
|
|
|
#include "CSegIdList.hpp"
|
|
|
|
#include "CSegId.hpp"
|
2016-04-16 03:24:25 +00:00
|
|
|
#include "TSegIdMap.hpp"
|
2016-04-09 23:19:17 +00:00
|
|
|
|
2016-04-05 01:51:25 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
2016-04-09 23:19:17 +00:00
|
|
|
class CCharLayoutNode
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
struct Bone
|
|
|
|
{
|
|
|
|
CSegId x0_parentId;
|
|
|
|
zeus::CVector3f x4_origin;
|
|
|
|
std::vector<CSegId> x10_children;
|
|
|
|
void read(CInputStream& in);
|
|
|
|
};
|
|
|
|
private:
|
2016-04-16 03:24:25 +00:00
|
|
|
TSegIdMap<Bone> x0_boneMap;
|
2016-04-09 23:19:17 +00:00
|
|
|
public:
|
|
|
|
CCharLayoutNode(CInputStream& in);
|
2016-04-16 03:24:25 +00:00
|
|
|
const TSegIdMap<Bone>& GetBoneMap() const {return x0_boneMap;}
|
2016-04-09 23:19:17 +00:00
|
|
|
};
|
|
|
|
|
2016-04-05 01:51:25 +00:00
|
|
|
class CCharLayoutInfo
|
|
|
|
{
|
2016-04-09 23:19:17 +00:00
|
|
|
std::shared_ptr<CCharLayoutNode> x0_node;
|
|
|
|
CSegIdList x8_segIdList;
|
|
|
|
std::map<std::string, CSegId> x18_segIdMap;
|
|
|
|
public:
|
|
|
|
CCharLayoutInfo(CInputStream& in);
|
2016-04-13 23:07:18 +00:00
|
|
|
const std::shared_ptr<CCharLayoutNode>& GetRootNode() const {return x0_node;}
|
2016-04-12 22:28:08 +00:00
|
|
|
const CSegIdList& GetSegIdList() const {return x8_segIdList;}
|
2016-04-13 23:07:18 +00:00
|
|
|
zeus::CVector3f GetFromParentUnrotated(const CSegId& id) const;
|
2016-09-06 05:52:51 +00:00
|
|
|
zeus::CVector3f GetFromRootUnrotated(const CSegId& id) const;
|
2017-11-13 06:19:18 +00:00
|
|
|
CSegId GetSegIdFromString(std::string_view name) const;
|
2016-04-05 01:51:25 +00:00
|
|
|
};
|
|
|
|
|
2016-09-02 19:32:57 +00:00
|
|
|
CFactoryFnReturn FCharLayoutInfo(const SObjectTag&, CInputStream&, const CVParamTransfer&,
|
|
|
|
CObjectReference* selfRef);
|
2016-04-09 23:19:17 +00:00
|
|
|
|
2016-04-05 01:51:25 +00:00
|
|
|
}
|
|
|
|
|