Changeset 13041 for OpenSceneGraph/trunk/include/osg/Scissor
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/Scissor (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/Scissor
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 */ … … 19 19 namespace osg { 20 20 21 /** Encapsulate OpenGL glScissor. */ 21 /** Encapsulate OpenGL glScissor. */ 22 22 class OSG_EXPORT Scissor : public StateAttribute 23 23 { 24 24 public : 25 25 Scissor(); 26 26 27 27 Scissor(int x,int y,int width,int height): 28 28 _x(x), … … 30 30 _width(width), 31 31 _height(height) {} 32 32 33 33 34 34 /** Copy constructor using CopyOp to manage deep vs shallow copy. */ … … 41 41 42 42 META_StateAttribute(osg, Scissor, SCISSOR); 43 43 44 44 /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ 45 45 virtual int compare(const StateAttribute& sa) const … … 54 54 COMPARE_StateAttribute_Parameter(_width) 55 55 COMPARE_StateAttribute_Parameter(_height) 56 56 57 57 return 0; // passed all the above comparison macros, must be equal. 58 58 } … … 72 72 _height = height; 73 73 } 74 74 75 75 void getScissor(int& x,int& y,int& width,int& height) const 76 76 { … … 83 83 inline int& x() { return _x; } 84 84 inline int x() const { return _x; } 85 85 86 86 inline int& y() { return _y; } 87 87 inline int y() const { return _y; } … … 96 96 97 97 protected: 98 98 99 99 virtual ~Scissor(); 100 100
