Changeset 13041 for OpenSceneGraph/trunk/include/osgSim/Sector
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osgSim/Sector (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgSim/Sector
r12388 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 29 29 { 30 30 public: 31 31 32 32 Sector() {} 33 33 34 34 Sector(const Sector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): 35 35 osg::Object(copy,copyop) {} … … 38 38 virtual const char *className() const { return "Sector"; } 39 39 virtual bool isSameKindAs(const osg::Object *obj) const { return dynamic_cast<const Sector *>(obj) != 0; } 40 40 41 41 virtual float operator() (const osg::Vec3& /*eyeLocal*/) const = 0; 42 42 … … 55 55 _cosAngle(-1.0f), 56 56 _cosFadeAngle(-1.0f) {} 57 57 58 58 void setAzimuthRange(float minAzimuth,float maxAzimuth,float fadeAngle=0.0f); 59 59 void getAzimuthRange(float& minAzimuth, float& maxAzimuth, float& fadeAngle) const; … … 81 81 { 82 82 public: 83 84 83 84 85 85 ElevationRange(): 86 86 _cosMinElevation(-1.0f), … … 88 88 _cosMaxElevation(1.0), 89 89 _cosMaxFadeElevation(1.0) {} 90 90 91 91 void setElevationRange(float minElevation,float maxElevation,float fadeAngle=0.0f); 92 92 93 93 float getMinElevation() const; 94 94 … … 115 115 return 1.0f; // fully in sector 116 116 } 117 117 118 118 protected: 119 119 … … 127 127 { 128 128 public: 129 129 130 130 AzimSector(): 131 131 Sector(), 132 132 AzimRange() {} 133 133 134 134 AzimSector(const AzimSector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): 135 135 Sector(copy,copyop), … … 151 151 { 152 152 public: 153 154 153 154 155 155 ElevationSector(): 156 156 Sector(), 157 157 ElevationRange() {} 158 158 159 159 ElevationSector(const ElevationSector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): 160 160 Sector(copy,copyop), 161 161 ElevationRange(copy) {} 162 162 163 163 ElevationSector(float minElevation,float maxElevation,float fadeAngle=0.0f); 164 164 165 165 META_Object(osgSim,ElevationSector); 166 166 167 167 virtual float operator() (const osg::Vec3& eyeLocal) const; 168 168 169 169 protected: 170 170 … … 176 176 { 177 177 public: 178 178 179 179 AzimElevationSector(): 180 180 Sector(), 181 181 AzimRange(), 182 182 ElevationRange() {} 183 183 184 184 AzimElevationSector(const AzimElevationSector& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): 185 185 Sector(copy,copyop), … … 202 202 { 203 203 public: 204 204 205 205 ConeSector(): 206 206 Sector(), … … 220 220 221 221 void setAxis(const osg::Vec3& axis); 222 222 223 223 const osg::Vec3& getAxis() const; 224 224 225 225 void setAngle(float angle,float fadeangle=0.0f); 226 226 227 227 float getAngle() const; 228 228 229 229 float getFadeAngle() const; 230 230 … … 234 234 235 235 virtual ~ConeSector() {} 236 236 237 237 osg::Vec3 _axis; 238 238 float _cosAngle; … … 249 249 { 250 250 public: 251 251 252 252 DirectionalSector(): 253 253 Sector(), … … 274 274 275 275 void setDirection(const osg::Vec3& direction); 276 276 277 277 const osg::Vec3& getDirection() const; 278 278 279 279 void setHorizLobeAngle(float angle); 280 280 281 281 float getHorizLobeAngle() const; 282 282 283 283 void setLobeRollAngle(float angle); 284 284 285 285 float getLobeRollAngle() const; 286 286 287 287 void setVertLobeAngle(float angle); 288 288 289 289 float getVertLobeAngle() const; 290 290 291 291 void setFadeAngle(float angle); 292 292 293 293 float getFadeAngle() const; 294 294 … … 300 300 301 301 virtual ~DirectionalSector() {} 302 302 303 303 osg::Vec3 _direction ; 304 304 float _rollAngle ;
