.. _program_listing_file_Source_Physics_Inc_Physics_Geometry_ClothMesh.h: Program Listing for File ClothMesh.h ==================================== |exhale_lsh| :ref:`Return to documentation for file ` (``Source\Physics\Inc\Physics\Geometry\ClothMesh.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include #include #include #include #include #include #include "AssetManager/GLTFLoader.h" namespace Azura { class Log; enum class AssetLocation; } // namespace Azura namespace Azura { namespace Physics { struct Edge; class ClothMesh final : public IClothPhysicsGeometry { public: ClothMesh(const String& assetName, AssetLocation location, Memory::Allocator& allocator, const Log& log); U32 VertexDataSize() const override; U32 IndexDataSize() const override; const U8* VertexData() const override; const U8* IndexData() const override; RawStorageFormat GetVertexFormat() const override; RawStorageFormat GetIndexFormat() const override; U32 GetVertexCount() const override; U32 GetIndexCount() const override; U32 TotalDataSize() const override; U32 NormalDataSize() const override; const U8* NormalData() const override; RawStorageFormat GetNormalFormat() const override; U32 UVDataSize() const override; const U8* UVData() const override; RawStorageFormat GetUVFormat() const override; // Cloth Physics Overrides void SetAnchorOnIndex(U32 idx) override; const Containers::Vector& GetVertexInverseMass() const override; const Containers::Vector& GetVertexAliases() const; PBD::ClothSolvingView GetPBDSolvingView(Memory::Allocator& allocator) override; private: void AddEdgeTriangleNeighbor(const Edge& edge, const U32 triangleIdx); bool IsVertexAnchorPoint(SizeType idx) const; std::vector m_anchorIdx; std::unordered_map, EdgeMapHash> m_edgeTriangleMap; std::unordered_map m_vertexAliasMap; Containers::Vector m_vertices; Containers::Vector m_vertexInvMass; Containers::Vector m_vertexAlias; Containers::Vector m_normals; Containers::Vector m_triangles; Containers::Vector m_uv; std::unique_ptr p_interface{nullptr}; }; } // namespace Physics } // namespace Azura