Equalizer  1.4.1
share/Equalizer/examples/osgScaleViewer/node.h
00001 
00002 /*
00003  * Copyright (c)
00004  *   2008-2009, Thomas McGuire <thomas.mcguire@student.uni-siegen.de>
00005  *   2010, Stefan Eilemann <eile@equalizergraphics.com>
00006  *   2010, Sarah Amsellem <sarah.amsellem@gmail.com>
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions are met:
00010  *
00011  * - Redistributions of source code must retain the above copyright notice, this
00012  *   list of conditions and the following disclaimer.
00013  * - Redistributions in binary form must reproduce the above copyright notice,
00014  *   this list of conditions and the following disclaimer in the documentation
00015  *   and/or other materials provided with the distribution.
00016  * - Neither the name of Eyescale Software GmbH nor the names of its
00017  *   contributors may be used to endorse or promote products derived from this
00018  *   software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00022  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00023  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
00024  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00025  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00026  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00027  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00028  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00029  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00030  * POSSIBILITY OF SUCH DAMAGE.
00031  */
00032 
00033 #ifndef NODE_H
00034 #define NODE_H
00035 
00036 #define EQ_IGNORE_GLEW
00037 #include <eq/eq.h>
00038 
00039 #include <osg/Image>
00040 #include <osg/Light>
00041 #include <osg/LightSource>
00042 #include <osg/Node>
00043 
00044 namespace osgScaleViewer
00045 {
00046     class Node : public eq::Node
00047     {
00048     public:
00053         Node( eq::Config* parent );
00054 
00055         int32_t getUniqueContextID() { return ++_contextID; }
00056         osg::ref_ptr< osg::Node > getModel() { return _model; }
00057         osg::ref_ptr< osg::FrameStamp > getFrameStamp() { return _frameStamp; }
00058 
00059     protected:
00060         virtual bool configInit( const eq::uint128_t& initID );
00061         virtual bool configExit();
00062         virtual void frameStart( const eq::uint128_t& frameID,
00063                                  const uint32_t frameNumber );
00064 
00065     private:
00066         lunchbox::a_int32_t _contextID;
00067         osg::ref_ptr< osg::Node > _model;
00068         osg::ref_ptr< osg::FrameStamp > _frameStamp;
00069         osg::ref_ptr< osg::NodeVisitor > _updateVisitor;
00070 
00071         osg::ref_ptr< osg::Node > _createSceneGraph();
00072         osg::ref_ptr< osg::Node > _createSceneGraph( osg::ref_ptr<osg::Image> );
00073         osg::ref_ptr< osg::Group > _initSceneGraph();
00074         osg::ref_ptr< osg::LightSource > _createLightSource();
00075     };
00076 
00077 }
00078 #endif
Generated on Mon Nov 26 2012 14:41:49 for Equalizer 1.4.1 by  doxygen 1.7.6.1