-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#5231: Create IRegionManager interface, for use in the XYWnd class. M…
…ore refactoring.
- Loading branch information
1 parent
2db1573
commit fb09689
Showing
11 changed files
with
84 additions
and
41 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,36 @@ | ||
#pragma once | ||
|
||
#include "imodule.h" | ||
#include "math/AABB.h" | ||
|
||
namespace map | ||
{ | ||
|
||
class IRegionManager : | ||
public RegisterableModule | ||
{ | ||
public: | ||
virtual ~IRegionManager() {} | ||
|
||
/** | ||
' greebo: Stores the corners coordinates of the currently active | ||
* region into the given <regionMin>, <regionMax> vectors. | ||
* If regioning is inactive, the maximum possible bounds are returned. | ||
*/ | ||
virtual AABB getRegionBounds() = 0; | ||
}; | ||
|
||
} // namespace | ||
|
||
const char* const MODULE_REGION_MANAGER = "RegionManager"; | ||
|
||
inline map::IRegionManager& GlobalRegionManager() | ||
{ | ||
// Cache the reference locally | ||
static map::IRegionManager& _module( | ||
*std::static_pointer_cast<map::IRegionManager>( | ||
module::GlobalModuleRegistry().getModule(MODULE_REGION_MANAGER) | ||
) | ||
); | ||
return _module; | ||
} |
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
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