Skip to content

Commit 086980c

Browse files
ahcordeazeey
authored andcommitted
Fixed MeshManager Singleton (#451)
Signed-off-by: ahcorde <[email protected]> Signed-off-by: Addisu Z. Taddese <[email protected]>
1 parent 6412cd3 commit 086980c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

graphics/include/gz/common/MeshManager.hh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ namespace ignition
5757
/// Destroys the collada loader, the stl loader and all the meshes
5858
private: virtual ~MeshManager();
5959

60+
/// Return a pointer to the mesh manager
61+
/// \todo(ahcorde) Remove inheritance from Singleton base class
62+
/// \return a pointer to the mesh manager
63+
public: static MeshManager* Instance();
64+
6065
/// \brief Load a mesh from a file.
6166
/// The mesh will be searched on the global SystemPaths instance provided
6267
/// by Util.hh.

graphics/src/MeshManager.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,3 +1579,9 @@ void MeshManager::ConvertPolylinesToVerticesAndEdges(
15791579
}
15801580
}
15811581
}
1582+
1583+
//////////////////////////////////////////////////
1584+
MeshManager* MeshManager::Instance()
1585+
{
1586+
return SingletonT<MeshManager>::Instance();
1587+
}

0 commit comments

Comments
 (0)