source: osgVisual/include/dataIO/dataIO_transportContainer.h @ 74

Last change on this file since 74 was 73, checked in by Torben Dannhauer, 14 years ago
File size: 3.0 KB
Line 
1#pragma once
2/* -*-c++-*- osgVisual - Copyright (C) 2009-2010 Torben Dannhauer
3 *
4 * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version.  The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * osgVisual requires for some proprietary modules a license from the correspondig manufacturer.
10 * You have to aquire licenses for all used proprietary modules.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * OpenSceneGraph Public License for more details.
16*/
17
18#include <osg/Object>
19#include <osg/Matrixd>
20#include <osg/Vec3d>
21
22#include <dataIO_executer.h>
23#include <dataIO_slot.h>
24
25#include <vector>
26
27namespace osgVisual {
28
29class dataIO_transportContainer : public osg::Object
30{
31public:
32        META_Object(osgVisual,dataIO_transportContainer);       // Required for serializer
33        dataIO_transportContainer(const osgVisual::dataIO_transportContainer& tC_, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):        // Required for serializer
34                        Object(tC_,copyop),
35                        frameID(tC_.frameID),
36                        viewMatrix(tC_.viewMatrix),
37                        eye(tC_.eye),
38                        center(tC_.center),
39                        up(tC_.up),
40                        executer(tC_.executer),
41                        ioSlots(tC_.ioSlots){}
42        dataIO_transportContainer(){}
43        virtual ~dataIO_transportContainer(){}
44
45
46
47
48        typedef std::vector<osg::ref_ptr<dataIO_executer> > executerList;
49        typedef std::vector<osg::ref_ptr<dataIO_slot> > slotList;
50
51private:
52        int frameID;
53        osg::Matrixd viewMatrix;
54        osg::Vec3d eye, center, up;
55        executerList executer;
56        slotList ioSlots;
57
58// Access functions for Serializer
59public:
60        int getFrameID() const {return frameID;}
61        void setFrameID(int frameID_ ){frameID=frameID_;}
62
63        void setViewMatrix(const osg::Matrixd& viewMatrix_){viewMatrix = viewMatrix_;}
64        const osg::Matrixd& getViewMatrix() const {return viewMatrix;}
65
66        void setEye(const osg::Vec3d& eye_) { eye = eye_; }
67    const osg::Vec3d& getEye() const { return eye; }
68
69        void setCenter(const osg::Vec3d& center_) { center = center_; }
70    const osg::Vec3d& getCenter() const { return center; }
71
72        void setUp(const osg::Vec3d& up_) { up = up_; }
73    const osg::Vec3d& getUp() const { return up; }
74
75        void setExecuter(const executerList& executer_) {executer=executer_;}
76        const executerList& getExecuter() const {return executer;}
77
78        void setIOSlots(const slotList& ioSlots_) {ioSlots=ioSlots_;}
79        const slotList& getIOSlots() const {return ioSlots;}
80
81
82
83        // Usage functions
84        void addExecuter( osg::ref_ptr<dataIO_executer> executerToAdd_ ) {executer.push_back(executerToAdd_);}
85        void removeAllExecuter() { executer.clear();}
86
87        void addSlot( osg::ref_ptr<dataIO_slot> slotToAdd_ ) {ioSlots.push_back(slotToAdd_);}
88        void removeAllSlots() {ioSlots.clear();}
89
90};
91
92} // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.