Changeset 13041 for OpenSceneGraph/trunk/include/osg/CullSettings
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/CullSettings (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/CullSettings
r12805 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 */ … … 45 45 46 46 virtual ~CullSettings() {} 47 47 48 48 CullSettings& operator = (const CullSettings& settings) 49 49 { … … 56 56 virtual void setDefaults(); 57 57 58 58 59 59 enum VariablesMask 60 60 { … … 90 90 /** Get the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object.*/ 91 91 InheritanceMask getInheritanceMask() const { return _inheritanceMask; } 92 92 93 93 /** Set the local cull settings values from specified CullSettings object.*/ 94 94 void setCullSettings(const CullSettings& settings); … … 112 112 DO_NOT_MODIFY_INHERITANCE_MASK 113 113 }; 114 114 115 115 void setInheritanceMaskActionOnAttributeSetting(InheritanceMaskActionOnAttributeSetting action) { _inheritanceMaskActionOnAttributeSetting = action; } 116 116 InheritanceMaskActionOnAttributeSetting getInheritanceMaskActionOnAttributeSetting() const { return _inheritanceMaskActionOnAttributeSetting; } … … 166 166 }; 167 167 168 void setComputeNearFarMode(ComputeNearFarMode cnfm) { _computeNearFar=cnfm; applyMaskAction(COMPUTE_NEAR_FAR_MODE); } 169 ComputeNearFarMode getComputeNearFarMode() const { return _computeNearFar;} 168 void setComputeNearFarMode(ComputeNearFarMode cnfm) { _computeNearFar=cnfm; applyMaskAction(COMPUTE_NEAR_FAR_MODE); } 169 ComputeNearFarMode getComputeNearFarMode() const { return _computeNearFar;} 170 170 171 171 void setNearFarRatio(double ratio) { _nearFarRatio = ratio; applyMaskAction(NEAR_FAR_RATIO); } … … 193 193 CLUSTER_CULLING 194 194 }; 195 195 196 196 typedef int CullingMode; 197 197 198 198 /** Set the culling mode for the CullVisitor to use.*/ 199 199 void setCullingMode(CullingMode mode) { _cullingMode = mode; applyMaskAction(CULLING_MODE); } 200 200 201 201 /** Returns the current CullingMode.*/ 202 202 CullingMode getCullingMode() const { return _cullingMode; } … … 214 214 /** Set the LOD bias for the CullVisitor to use.*/ 215 215 void setLODScale(float scale) { _LODScale = scale; applyMaskAction(LOD_SCALE); } 216 216 217 217 /** Get the LOD bias.*/ 218 218 float getLODScale() const { return _LODScale; } … … 235 235 virtual bool clampProjectionMatrixImplementation(osg::Matrixd& projection, double& znear, double& zfar) const = 0; 236 236 }; 237 237 238 238 /** set the ClampProjectionMatrixCallback.*/ 239 239 void setClampProjectionMatrixCallback(ClampProjectionMatrixCallback* cpmc) { _clampProjectionMatrixCallback = cpmc; applyMaskAction(CLAMP_PROJECTION_MATRIX_CALLBACK); } … … 262 262 bool _depthSortImpostorSprites; 263 263 float _impostorPixelErrorThreshold; 264 int _numFramesToKeepImpostorSprites; 264 int _numFramesToKeepImpostorSprites; 265 265 266 266 Node::NodeMask _cullMask; 267 267 Node::NodeMask _cullMaskLeft; 268 268 Node::NodeMask _cullMaskRight; 269 269 270 270 271 271 };
