#pragma once #include "ModelPacker.h" using namespace Atomic; namespace Thekla { struct Atlas_Output_Mesh; struct Atlas_Input_Mesh; } namespace AtomicGlow { class ModelPacker; class MeshLightmapUVGen : public Object { ATOMIC_OBJECT(MeshLightmapUVGen, Object) public: struct Settings { bool genChartID_; Settings() { genChartID_ = false; } }; MeshLightmapUVGen(Context* context, Model* model, const Settings& settings); virtual ~MeshLightmapUVGen(); bool Generate(); private: inline void EmitVertex(PODVector& vertices, unsigned& index, const MPVertex& vertex); void WriteLightmapUVCoords(); struct LMVertex { MPGeometry* geometry_; unsigned geometryIdx_; unsigned originalVertex_; }; SharedPtr model_; SharedPtr modelPacker_; SharedPtr curLOD_; SharedArrayPtr lmVertices_; Settings settings_; Thekla::Atlas_Output_Mesh* tOutputMesh_; Thekla::Atlas_Input_Mesh* tInputMesh_; }; }