-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4f76a3a
Showing
41 changed files
with
4,141 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,12 @@ | ||
Equalizer - a framework to create and deploy parallel OpenGL-based applications. | ||
Collage - a cross-platform C++ library for building heterogenous, distributed applications. | ||
|
||
Equalizer and Collage are licensed under the LGPL, unless noted otherwise, e.g., for external dependencies. See file LGPL for the full license. The examples are licensed under the BSD license. External dependencies are either LGPL or BSD-licensed. See file ACKNOWLEDGEMENTS and AUTHORS for further details. | ||
|
||
Copyright (C) 2005-2011, Stefan Eilemann <[email protected]> | ||
|
||
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. | ||
|
||
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. | ||
|
||
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
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,28 @@ | ||
CC = g++ | ||
|
||
#EXTRA_CFLAGS = `sdl-config --cflags` | ||
#EXTRA_LIBS = `sdl-config --libs` | ||
|
||
OPT = -O -DNDEBUG | ||
#OPT = -g -Wall | ||
|
||
D = | ||
#D = d | ||
|
||
OBJS = channel.o config.o configEvent.o error.o frameData.o initData.o main.o node.o eqEarth.o pipe.o view.o window.o renderer.o sceneView.o viewer.o controls.o earthManipulator.o | ||
CFLAGS = ${OPT} -isystem /afs/cmf/project/dc/sys/include -I/afs/cmf/project/dc/sys/include -I/afs/cmf/project/gis/include ${EXTRA_CFLAGS} -I. | ||
LIBS = -L/afs/cmf/project/dc/sys/lib -losg${D} -losgViewer${D} -losgUtil${D} -lEqualizer -L/afs/cmf/project/gis/lib -losgEarth${D} -losgEarthUtil${D} ${EXTRA_LIBS} | ||
|
||
all: eqEarth | ||
|
||
eqEarth: ${OBJS} | ||
${CC} ${CFLAGS} -o $@ ${OBJS} ${LIBS} | ||
|
||
clean: | ||
/bin/rm -f *.o eqEarth | ||
|
||
.SUFFIXES: | ||
.SUFFIXES: .o .cpp | ||
|
||
.cpp.o: | ||
${CC} ${CFLAGS} -c $< |
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,38 @@ | ||
#pragma once | ||
|
||
#include <osg/NodeCallback> | ||
|
||
#include <osgEarthUtil/SkyNode> | ||
|
||
namespace eqEarth | ||
{ | ||
// ---------------------------------------------------------------------------- | ||
|
||
struct SkyUpdateCallback : public osg::NodeCallback | ||
{ | ||
SkyUpdateCallback( ) : _last( -1 ) { } | ||
|
||
void operator( )( osg::Node* node, osg::NodeVisitor* nv ) | ||
{ | ||
if( osg::NodeVisitor::UPDATE_VISITOR == nv->getVisitorType( )) | ||
{ | ||
osg::ref_ptr< const osg::FrameStamp > fs = nv->getFrameStamp( ); | ||
|
||
struct tm now; | ||
fs->getCalendarTime( now ); | ||
|
||
if( _last != now.tm_sec ) | ||
{ | ||
static_cast< osgEarth::Util::SkyNode* >( node )->setDateTime( | ||
now.tm_year + 1900, now.tm_mon + 1, now.tm_mday, | ||
now.tm_hour + ( now.tm_min / 60.0 ) + ( now.tm_sec / 3600.0 )); | ||
_last = now.tm_sec; | ||
} | ||
} | ||
|
||
traverse( node, nv ); | ||
} | ||
|
||
int _last; | ||
}; | ||
}; |
Oops, something went wrong.