Changeset 13041 for OpenSceneGraph/trunk/include/osg/Depth
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/Depth (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/Depth
r11808 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 */ … … 20 20 21 21 /** Encapsulate OpenGL glDepthFunc/Mask/Range functions. 22 */ 22 */ 23 23 class OSG_EXPORT Depth : public StateAttribute 24 24 { 25 25 public : 26 27 26 27 28 28 enum Function 29 29 { … … 40 40 41 41 Depth(Function func=LESS,double zNear=0.0, double zFar=1.0,bool writeMask=true); 42 42 43 43 /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ 44 44 Depth(const Depth& dp,const CopyOp& copyop=CopyOp::SHALLOW_COPY): … … 48 48 _zFar(dp._zFar), 49 49 _depthWriteMask(dp._depthWriteMask) {} 50 51 50 51 52 52 META_StateAttribute(osg, Depth, DEPTH); 53 53 54 54 /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ 55 55 virtual int compare(const StateAttribute& sa) const … … 74 74 } 75 75 76 inline void setFunction(Function func) { _func = func; } 76 inline void setFunction(Function func) { _func = func; } 77 77 inline Function getFunction() const { return _func; } 78 78 79 79 80 80 inline void setRange(double zNear, double zFar) … … 86 86 inline void setZNear(double zNear) { _zNear=zNear; } 87 87 inline double getZNear() const { return _zNear; } 88 88 89 89 inline void setZFar(double zFar) { _zFar=zFar; } 90 90 inline double getZFar() const { return _zFar; } 91 91 92 inline void setWriteMask(bool mask) { _depthWriteMask = mask; } 92 inline void setWriteMask(bool mask) { _depthWriteMask = mask; } 93 93 inline bool getWriteMask() const { return _depthWriteMask; } 94 94 … … 97 97 98 98 protected: 99 99 100 100 virtual ~Depth(); 101 101 102 102 Function _func; 103 103 104 104 double _zNear; 105 105 double _zFar;
