Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#5346: Extract the IMapExporter interface, and add IMap::createMapExp…
…orter method to return an instance to enable the game connection plugin to export the scene.
- Loading branch information
1 parent
d6b6a8f
commit 94453b0
Showing
10 changed files
with
88 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
#include "inode.h" | ||
#include "imapformat.h" | ||
|
||
namespace map | ||
{ | ||
|
||
/** | ||
* Exporter class used to serialise a map to an output stream. | ||
* Use the given exportMap() method to write a scene to the | ||
* attached stream. For scene traversal the given functor | ||
* is used to allow for custom filtering of the scene nodes. | ||
* | ||
* Use GlobalMapModule().createMapExporter() to acquire an | ||
* instance of IMapExporter. | ||
* | ||
* Note: This is a scoped object by design, which will prepare | ||
* the scene during construction and clean it up on destruction. | ||
*/ | ||
class IMapExporter | ||
{ | ||
public: | ||
using Ptr = std::shared_ptr<IMapExporter>; | ||
|
||
virtual ~IMapExporter() {} | ||
|
||
// Export the scene below the given root node using the given traversal function | ||
virtual void exportMap(const scene::INodePtr& root, const GraphTraversalFunc& traverse) = 0; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters