2#include "ExtensionRegistry.h"
3#include "Resources/ResourceStore.h"
4#include "ResourceManifest.h"
5#include "Serialization/EntityReader.h"
7#include "PotreeComponent.h"
8#include "PotreeSystem.h"
10#include "Foundation/Logging/Logger.h"
25 } potreeExtensionInstance;
31 PotreeComponent::registerType();
37 const std::string resourceArchive =
"Cogs.Core.Extensions.Potree.zip";
42 bool resourceArchiveAdded =
false;
43 auto manifest = getResourceManifest(context);
44 for (
auto& item : manifest) {
45 if (item.find(resourceArchive) != std::string::npos) {
47 resourceArchiveAdded =
true;
51 if (!resourceArchiveAdded) {
57 context->
resourceStore->addSearchPath(
"../Extensions/Potree/Data/");
62 readEntityDefinition(R
"(
63{ "name": "PotreeModel",
A Context instance contains all the services, systems and runtime components needed to use Cogs.
class EntityStore * store
Entity store.
std::unique_ptr< class ResourceStore > resourceStore
ResourceStore service instance.
static void add(Extension *extension, StringView version)
Adds the given extension to the registry, ensuring the initialization methods are called at appropria...
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
Defines an extension to Cogs.Core and provides methods to override in order to initialize extension c...
void cleanup(Context *context) override
Cleanup context bound extension content.
bool initializeStatic() override
Initialize extension statically.
bool initialize(Context *context) override
Initialize extension for the given context.
const char * getExtensionKey() const override
Get the extensions unique key, used to check for extension presence and retrieve extension specific d...
@ PostView
Run after view data has been updated. Anything after this is appropriate for geometry depending on e....