Equalizer 1.0

share/Equalizer/examples/osgScaleViewer/frameData.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 OSGSV_FRAMEDATA_H
00034 #define OSGSV_FRAMEDATA_H
00035 
00036 #define EQ_IGNORE_GLEW
00037 #include <eq/eq.h>
00038 
00039 #include <osg/ref_ptr>
00040 #include <osg/Node>
00041 #include <osg/Image>
00042 
00043 namespace osgScaleViewer
00044 {
00045     class FrameData : public eq::fabric::Serializable
00046     {
00047     public:
00048         FrameData();
00049 
00054         void setCameraPosition( eq::Vector3f cameraPosition );
00055 
00060         const eq::Vector3f getCameraPosition() const { return _cameraPosition; }
00061 
00066         void setCameraLookAtPoint( eq::Vector3f cameraLookAtPoint );
00067 
00072         const eq::Vector3f getCameraLookAtPoint() const 
00073             { return _cameraLookAtPoint; }
00074 
00079         void setCameraUpVector( eq::Vector3f cameraUpVector );
00080 
00085         const eq::Vector3f getCameraUpVector() const { return _cameraUpVector; }
00086 
00088         void toggleStatistics();
00089 
00091         bool useStatistics() const { return _statistics; }
00092 
00093     protected:
00095         virtual void serialize( co::DataOStream& os, const uint64_t dirtyBits );
00096     
00098         virtual void deserialize( co::DataIStream& is,
00099                                   const uint64_t dirtyBits );
00100 
00102         enum DirtyBits
00103         {
00104             DIRTY_CAMERA  = eq::fabric::Serializable::DIRTY_CUSTOM << 0,
00105             DIRTY_FLAGS   = eq::fabric::Serializable::DIRTY_CUSTOM << 1
00106         };
00107 
00109         virtual ChangeType getChangeType() const;
00110 
00111     private:
00113         eq::Vector3f _cameraPosition;
00114 
00116         eq::Vector3f _cameraLookAtPoint;
00117 
00119         eq::Vector3f _cameraUpVector;    
00120 
00121         bool _statistics;
00122     };
00123 }
00124 #endif
Generated on Sun May 8 2011 19:11:05 for Equalizer 1.0 by  doxygen 1.7.3