#ifndef __DNACOMMON_PATH_HPP__ #define __DNACOMMON_PATH_HPP__ #include "DataSpec/DNACommon/DNACommon.hpp" #include "DataSpec/DNACommon/PAK.hpp" #include "DNAMP1.hpp" namespace DataSpec::DNAMP1 { struct PATH : BigDNA { using PathMesh = hecl::blender::PathMesh; AT_DECL_DNA Value version; struct Node : BigDNA { AT_DECL_DNA Value position; Value normal; }; Value nodeCount; Vector nodes; struct Link : BigDNA { AT_DECL_DNA Value nodeIdx; Value regionIdx; Value width2d; Value oneOverWidth2d; }; Value linkCount; Vector links; struct Region : BigDNA { AT_DECL_DNA Value nodeCount; Value nodeStart; Value linkCount; Value linkStart; Value meshIndexMask; Value meshTypeMask; Value height; Value normal; Value regionIdx; Value centroid; Value aabb[2]; Value regionIdxPtr; }; Value regionCount; Vector regions; Vector bitmap1; Vector bitmap2; Vector bitmap3; Value octreeRegionLookupCount; Vector octreeRegionLookup; struct OctreeNode : BigDNA { AT_DECL_DNA Value isLeaf; Value aabb[2]; Value centroid; Value children[8]; Value regionCount; Value regionStart; }; Value octreeNodeCount; Vector octree; void sendToBlender(hecl::blender::Connection& conn, std::string_view entryName, const zeus::CMatrix4f* xf); static bool Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl::ProjectPath& outPath, PAKRouter& pakRouter, const PAK::Entry& entry, bool force, hecl::blender::Token& btok, std::function fileChanged); static bool Cook(const hecl::ProjectPath& outPath, const PathMesh& mesh); }; } #endif // __DNACOMMON_PATH_HPP__