Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dardok committed Nov 10, 2011
0 parents commit 4f76a3a
Show file tree
Hide file tree
Showing 41 changed files with 4,141 additions and 0 deletions.
461 changes: 461 additions & 0 deletions LGPL

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions LICENSE.txt
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
28 changes: 28 additions & 0 deletions Makefile
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 $<
38 changes: 38 additions & 0 deletions callbacks.h
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;
};
};
Loading

0 comments on commit 4f76a3a

Please sign in to comment.