.. _program_listing_file_Source_Physics_Inc_Physics_Geometry_ClothPlane.h: Program Listing for File ClothPlane.h ===================================== |exhale_lsh| :ref:`Return to documentation for file ` (``Source\Physics\Inc\Physics\Geometry\ClothPlane.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include #include #include #include #include #include #include namespace Azura { namespace Physics { struct Edge; class ClothPlane final : public IClothPhysicsGeometry { public: ClothPlane(const Vector2f& boundMin , const Vector2f& boundMax, Memory::Allocator& allocator); ClothPlane(ClothTriangulation triangulation, const Vector2f& boundMin , const Vector2f& boundMax, float worldHeight, const Vector2u& subDivisions, const Vector2u& uvScale, Memory::Allocator& allocator); 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; PBD::ClothSolvingView GetPBDSolvingView(Memory::Allocator& allocator) override; private: void AddEdgeTriangleNeighbor(const Edge& edge, const U32 triangleIdx); std::vector m_anchorIdx; std::unordered_map, EdgeMapHash> m_edgeTriangleMap; Containers::Vector m_vertices; Containers::Vector m_vertexInvMass; Containers::Vector m_normals; Containers::Vector m_triangles; Containers::Vector m_uv; }; } // namespace Physics } // namespace Azura