Merge branch 'develop' into feature/globebrowsing

Conflicts:
	modules/base/scale/staticscale.cpp
	modules/base/scale/staticscale.h
	modules/globebrowsing/meshes/trianglesoup.h
	modules/globebrowsing/tile/tiledataset.cpp
	modules/newhorizons/shaders/renderableModelProjection_fs.glsl
	src/interaction/interactionhandler.cpp
	src/rendering/renderengine.cpp
	src/scene/scenegraphnode.cpp
This commit is contained in:
Alexander Bock
2016-09-20 15:52:01 +02:00
142 changed files with 8052 additions and 1702 deletions
+18 -2
View File
@@ -86,9 +86,11 @@ public:
/**
* Adds the passed \p factory to the FactoryManager. Factories may only be added once.
* \param factory The ghoul::TemplateFactory to add to this FactoryManager
* \param name A user-readable name for the registered factory.
* \pre \p factory must not be nullptr
*/
void addFactory(std::unique_ptr<ghoul::TemplateFactoryBase> factory);
void addFactory(std::unique_ptr<ghoul::TemplateFactoryBase> factory,
std::string name = "");
/**
* This method provides access to all registered ghoul::TemplateFactory%s through
@@ -102,11 +104,25 @@ public:
template <class T>
ghoul::TemplateFactory<T>* factory() const;
/**
* Writes a documentation for the FactoryMananger that contains all of the registered
* factories and for each factory all registered class names.
* \param file The file to which the documentation will be written
* \param type The type of documentation that will be written
* \pre \p file must not be empty
* \pre \p type must not be empty
*/
void writeDocumentation(const std::string& file, const std::string& type);
private:
/// Singleton member for the Factory Manager
static FactoryManager* _manager;
std::vector<std::unique_ptr<ghoul::TemplateFactoryBase>> _factories;
struct FactoryInfo {
std::unique_ptr<ghoul::TemplateFactoryBase> factory;
std::string name;
};
std::vector<FactoryInfo> _factories;
};
} // namespace openspace
+2 -2
View File
@@ -27,8 +27,8 @@ namespace openspace {
template <class T>
ghoul::TemplateFactory<T>* FactoryManager::factory() const {
for (auto& factory : _factories) {
if (factory->baseClassType() == typeid(T))
return dynamic_cast<ghoul::TemplateFactory<T>*>(factory.get());
if (factory.factory->baseClassType() == typeid(T))
return dynamic_cast<ghoul::TemplateFactory<T>*>(factory.factory.get());
}
throw FactoryNotFoundError(typeid(T).name());
+4
View File
@@ -27,6 +27,8 @@
#include <openspace/properties/propertyowner.h>
#include <openspace/documentation/documentation.h>
#include <string>
#include <vector>
@@ -64,6 +66,8 @@ public:
*/
void deinitialize();
virtual std::vector<Documentation> documentations() const;
protected:
/**
* Customization point for each derived class. The internalInitialize method is called
@@ -50,12 +50,14 @@ struct UpdateData {
bool doPerformanceMeasurement;
};
struct RenderData {
const Camera& camera;
// psc position to be removed in favor of the double precision position defined in
// the translation in transform.
psc position;
bool doPerformanceMeasurement;
int renderBinMask;
TransformData modelTransform;
};