Created classes for PlanetGeometry

Added SimpleSphereGeometry
Created infrastructure for added other geometries
This commit is contained in:
Alexander Bock
2014-05-05 17:28:46 +02:00
parent d7eb868dde
commit a86d544812
14 changed files with 423 additions and 111 deletions

View File

@@ -33,10 +33,6 @@ const std::string _loggerCat = "Renderable";
namespace openspace {
//Renderable::Renderable()
// : _name("")
//{}
Renderable* Renderable::createFromDictionary(const ghoul::Dictionary& dictionary)
{
std::string name;
@@ -53,7 +49,7 @@ Renderable* Renderable::createFromDictionary(const ghoul::Dictionary& dictionary
= FactoryManager::ref().factory<Renderable>();
Renderable* result = factory->create(renderableType, dictionary);
if (result == nullptr) {
LERROR("Failed creating Renderable object of type '" << renderableType << "'");
LERROR("Failed to create a Renderable object of type '" << renderableType << "'");
return nullptr;
}
@@ -63,22 +59,14 @@ Renderable* Renderable::createFromDictionary(const ghoul::Dictionary& dictionary
}
Renderable::Renderable(const ghoul::Dictionary& dictionary)
: _name("")
{
std::string name;
dictionary.getValue(constants::scenegraphnode::keyName, name);
setName(name);
}
Renderable::~Renderable() {
}
void Renderable::setName(std::string name)
Renderable::~Renderable()
{
_name = std::move(name);
}
const std::string& Renderable::name() const
{
return _name;
}
void Renderable::setBoundingSphere(const pss& boundingSphere)
@@ -95,4 +83,4 @@ void Renderable::update()
{
}
} // namespace openspace
} // namespace openspace