Misc work

Added ext/kameleon to .gitignore
moved renderableplanet to a subfolder
This commit is contained in:
Alexander Bock
2014-05-05 12:41:41 +02:00
parent 5769919ea6
commit 5e758b16d1
9 changed files with 158 additions and 3 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
bin/
build/
ext/SGCT
ext/kameleon
.DS_Store
*.swp

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" ?>
<Cluster masterAddress="127.0.0.1" externalControlPort="20500">
<Node address="127.0.0.1" port="20400">
<Window fullScreen="false">
<Stereo type="none" />
<Pos x="0" y="100" />
<Size x="910" y="263" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<Viewplane>
<!-- Lower left -->
<Pos x="-3.34533" y="-0.965" z="0.0" />
<!-- Upper left -->
<Pos x="-3.34533" y="0.965" z="0.0" />
<!-- Upper right -->
<Pos x="3.34533" y="0.965" z="0.0" />
</Viewplane>
</Viewport>
</Window>
</Node>
<Node address="127.0.0.2" port="20401">
<Window fullScreen="false">
<Stereo type="none" />
<Size x="400" y="300" />
<Pos x="0" y="400" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<Viewplane>
<!-- Lower left -->
<Pos x="-3.34533" y="-0.965" z="0.0" />
<!-- Upper left -->
<Pos x="-3.34533" y="0.965" z="0.0" />
<!-- Upper right -->
<Pos x="-0.772" y="0.965" z="0.0" />
</Viewplane>
</Viewport>
</Window>
</Node>
<Node address="127.0.0.3" port="20402">
<Window fullScreen="false">
<Stereo type="none" />
<Size x="400" y="300" />
<Pos x="400" y="400" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<Viewplane>
<!-- Lower left -->
<Pos x="-1.286667" y="-0.965" z="0.0" />
<!-- Upper left -->
<Pos x="-1.286667" y="0.965" z="0.0" />
<!-- Upper right -->
<Pos x="1.286667" y="0.965" z="0.0" />
</Viewplane>
</Viewport>
</Window>
</Node>
<Node address="127.0.0.4" port="20403">
<Window fullScreen="false">
<Stereo type="none" />
<Size x="400" y="300" />
<Pos x="800" y="400" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<Viewplane>
<!-- Lower left -->
<Pos x="0.772" y="-0.965" z="0.0" />
<!-- Upper left -->
<Pos x="0.772" y="0.965" z="0.0" />
<!-- Upper right -->
<Pos x="3.34533" y="0.965" z="0.0" />
</Viewplane>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.065">
<Pos x="0.0" y="-0.065" z="4.0" />
</User>
</Cluster>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" ?>
<Cluster masterAddress="localhost">
<Node address="localhost" port="20401">
<Window fullScreen="false">
<Stereo type="test" />
<!-- 16:9 aspect ratio -->
<Size x="640" y="360" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<Viewplane>
<!-- Lower left -->
<Pos x="-1.778" y="-1.0" z="0.0" />
<!-- Upper left -->
<Pos x="-1.778" y="1.0" z="0.0" />
<!-- Upper right -->
<Pos x="1.778" y="1.0" z="0.0" />
</Viewplane>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.065">
<Pos x="0.0" y="0.0" z="4.0" />
</User>
</Cluster>

View File

@@ -0,0 +1,39 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
namespace openspace {
template <class T>
ghoul::TemplateFactory<T>* FactoryManager::factory()
{
for (ghoul::TemplateFactoryBase* factory : _factories) {
if (factory->baseClassType() == typeid(T))
return dynamic_cast<ghoul::TemplateFactory<T>*>(factory);
}
LERRORC("FactoryManager", "Could not find factory for type '" << typeid(T).name()
<< "'");
return nullptr;
}
} // namespace openspace

View File

@@ -72,6 +72,12 @@ file(GLOB RENDERING_HEADER ${HEADER_ROOT_DIR}/openspace/rendering/*.h)
set(OPENSPACE_HEADER ${OPENSPACE_HEADER} ${RENDERING_HEADER})
source_group(Rendering FILES ${RENDERING_SOURCE} ${RENDERING_HEADER})
file(GLOB RENDERING_PLANETS_SOURCE ${SOURCE_ROOT_DIR}/rendering/planets/*.cpp)
set(OPENSPACE_SOURCE ${OPENSPACE_SOURCE} ${RENDERING_PLANETS_SOURCE})
file(GLOB RENDERING_PLANETS_HEADER ${HEADER_ROOT_DIR}/openspace/rendering/planets/*.h)
set(OPENSPACE_HEADER ${OPENSPACE_HEADER} ${RENDERING_PLANETS_HEADER})
source_group(Rendering\\Planets FILES ${RENDERING_PLANETS_SOURCE} ${RENDERING_PLANETS_HEADER})
file(GLOB SCENEGRAPH_SOURCE ${SOURCE_ROOT_DIR}/scenegraph/*.cpp)
set(OPENSPACE_SOURCE ${OPENSPACE_SOURCE} ${SCENEGRAPH_SOURCE})
file(GLOB SCENEGRAPH_HEADER ${HEADER_ROOT_DIR}/openspace/scenegraph/*.h ${HEADER_ROOT_DIR}/openspace/scenegraph/*.inl)

View File

@@ -23,7 +23,7 @@
****************************************************************************************/
// open space includes
#include <openspace/rendering/renderableplanet.h>
#include <openspace/rendering/planets/renderableplanet.h>
#include <openspace/util/constants.h>
#include <ghoul/opengl/texturereader.h>

View File

@@ -24,7 +24,7 @@
// open space includes
#include <openspace/scenegraph/scenegraph.h>
#include <openspace/rendering/renderableplanet.h>
#include <openspace/rendering/planets/renderableplanet.h>
#include <openspace/interaction/interactionhandler.h>
#include <openspace/util/spice.h>
#include <openspace/engine/openspaceengine.h>

View File

@@ -27,7 +27,7 @@
#include <cassert>
// renderables
#include <openspace/rendering/renderableplanet.h>
#include <openspace/rendering/planets/renderableplanet.h>
#include <openspace/rendering/renderablevolumeexpert.h>
#include <openspace/rendering/renderablevolumecl.h>
#include <openspace/rendering/renderablevolumegl.h>
@@ -65,6 +65,8 @@ void FactoryManager::initialize()
_manager->addFactory(new ghoul::TemplateFactory<Ephemeris>);
_manager->factory<Ephemeris>()->registerClass<StaticEphemeris>("Static");
_manager->factory<Ephemeris>()->registerClass<SpiceEphemeris>("Spice");
}
void FactoryManager::deinitialize()