00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef Frame_H
00020 #define Frame_H
00021
00022 #include <osg/Node>
00023 #include <osg/Geometry>
00024 #include <osg/Notify>
00025 #include <osg/MatrixTransform>
00026 #include <osg/Texture2D>
00027 #include <osg/Billboard>
00028 #include <osg/LineWidth>
00029 #include <osg/PositionAttitudeTransform>
00030
00031 #include <osgGA/TrackballManipulator>
00032 #include <osgGA/FlightManipulator>
00033 #include <osgGA/DriveManipulator>
00034
00035 #include <osgDB/Registry>
00036 #include <osgDB/ReadFile>
00037
00038 #include <osgViewer/Viewer>
00039
00040 #include <iostream>
00041
00042
00043
00044
00045
00046
00047 namespace uvsim
00048 {
00049
00050 typedef std::vector< osg::ref_ptr<osg::Image> > ImageList;
00051
00052 class FrameCallback : public osg::NodeCallback
00053 {
00054 public:
00055 virtual void operator()(osg::Node *node, osg::NodeVisitor *nv);
00056 };
00057
00058 class Frame : public osg::Referenced
00059 {
00060 public:
00061 Frame(float insize);
00062 osg::PositionAttitudeTransform *root;
00063 private:
00064 osg::Drawable *createSquare(const osg::Vec3& corner,const osg::Vec3& width,const osg::Vec3& height, osg::Image* image=NULL);
00065 osg::Drawable *createAxis(const osg::Vec3& corner,const osg::Vec3& xdir,const osg::Vec3& ydir,const osg::Vec3& zdir);
00066 FrameCallback *callback;
00067 float size;
00068 };
00069
00070 }
00071
00072 #endif
00073
00074