eqNBody/initData.h

00001 /*
00002  * Copyright (c) 2009, Philippe Robert <probert@eyescale.ch> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef EQNBODY_INITDATA_H
00019 #define EQNBODY_INITDATA_H
00020 
00021 #include <eq/eq.h>
00022 
00023 namespace eqNbody
00024 {
00025     class InitData : public eq::net::Object
00026     {
00027     public:
00028         InitData();
00029         virtual ~InitData();
00030 
00031         void setFrameDataID( const uint32_t id )   { _frameDataID = id; }
00032         uint32_t getFrameDataID() const   { return _frameDataID; }
00033 
00034         float getDamping() const { return _damping; }
00035         uint32_t getNumBodies() const { return _numBodies; }
00036         uint32_t getP() const { return _p; }
00037         uint32_t getQ() const { return _q; }
00038         
00039     protected:
00040         virtual void getInstanceData( eq::net::DataOStream& os );
00041         virtual void applyInstanceData( eq::net::DataIStream& is );
00042 
00043     private:
00044         uint32_t    _frameDataID;
00045         uint32_t    _numBodies;     // number of bodies in simulation
00046         uint32_t    _p;             // CUDA thread parameter p
00047         uint32_t    _q;             // CUDA thread parameter q
00048         float       _damping;       // damping factor
00049     };
00050 }
00051 
00052 #endif // EQNBODY_INITDATA_H
00053 
Generated on Mon Aug 10 18:58:39 2009 for Equalizer 0.9 by  doxygen 1.5.8