00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef VASISECTOR
00022 #define VASISECTOR 1
00023
00024 #include <osgSim/Sector>
00025
00026
00027
00028 class VasiSector : public osgSim::Sector {
00029 public:
00030 VasiSector() :
00031 Sector(),
00032 direction(0.0f, 1.0f, 0.0f),
00033 up(0.0f, 0.0f, 1.0f),
00034 tanDirection(0.0),
00035 topSector(true) { computeMatrix(); }
00036
00037 VasiSector(const VasiSector& copy,
00038 const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) :
00039 Sector(copy, copyop),
00040 direction(copy.direction),
00041 up(copy.up),
00042 local_to_LP(copy.local_to_LP),
00043 tanDirection(copy.tanDirection),
00044 topSector(copy.topSector) {}
00045
00046 VasiSector(const osg::Vec3& _direction, const osg::Vec3& _up,
00047 bool _topSector) :
00048 Sector(),
00049 direction(_direction),
00050 up(_up),
00051 topSector(_topSector) { computeMatrix(); }
00052
00053 META_Object(osgSim, VasiSector);
00054 const osg::Vec3& getDirection() const { return direction; }
00055 const osg::Vec3& getUp() const { return up; }
00056 bool getTopSector() const { return topSector; }
00057 virtual float operator() (const osg::Vec3& eyeLocal) const;
00058
00059 protected:
00060 void computeMatrix();
00061 osg::Vec3 direction ;
00062 osg::Vec3 up;
00063 osg::Matrix local_to_LP ;
00064 double tanDirection;
00065 bool topSector;
00066 };
00067 #endif