Torch
Loading...
Searching...
No Matches
SkeletonFactory.h
1#pragma once
2
3#include <factories/BaseFactory.h>
4#include "types/Vec3D.h"
5
6namespace SF64 {
7
8class LimbData : public IParsedData {
9public:
10 uint32_t mAddr;
11 uint32_t mDList;
12 Vec3f mTrans;
13 Vec3s mRot;
14 uint32_t mSibling;
15 uint32_t mChild;
16 int mIndex;
17
18 LimbData(uint32_t addr, uint32_t dList, Vec3f trans, Vec3s rot, uint32_t sibling, uint32_t child, int index);
19};
20
21class SkeletonData : public IParsedData {
22public:
23 std::vector<LimbData> mSkeleton;
24
25 explicit SkeletonData(std::vector<LimbData> skeleton) : mSkeleton(skeleton) {}
26};
27
29 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
30};
31
33 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
34};
35
37 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
38};
39
41public:
42 std::optional<std::shared_ptr<IParsedData>> parse(std::vector<uint8_t>& buffer, YAML::Node& data) override;
43 inline std::unordered_map<ExportType, std::shared_ptr<BaseExporter>> GetExporters() override {
44 return {
45 REGISTER(Code, SkeletonCodeExporter)
46 REGISTER(Header, SkeletonHeaderExporter)
47 REGISTER(Binary, SkeletonBinaryExporter)
48 };
49 }
50};
51}
Definition BaseFactory.h:88
Definition BaseFactory.h:94
Definition BaseFactory.h:80
Definition SkeletonFactory.h:32
Definition SkeletonFactory.h:36
Definition SkeletonFactory.h:40
Definition SkeletonFactory.h:28
Definition Vec3D.h:5
Definition Vec3D.h:17