Changeset 13041 for OpenSceneGraph/trunk/include/osg/Light
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/Light (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/Light
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 */ … … 59 59 _spot_exponent(light._spot_exponent), 60 60 _spot_cutoff(light._spot_cutoff) {} 61 61 62 62 virtual osg::Object* cloneType() const { return new Light(_lightnum); } 63 63 virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new Light(*this,copyop); } … … 97 97 return true; 98 98 } 99 100 99 100 101 101 102 102 /** Set which OpenGL light to operate on. */ 103 103 void setLightNum(int num); 104 104 105 105 /** Get which OpenGL light this osg::Light operates on. */ 106 106 int getLightNum() const { return _lightnum; } … … 124 124 inline const Vec4& getSpecular() const { return _specular; } 125 125 126 /** Set the position of the light. */ 126 /** Set the position of the light. */ 127 127 inline void setPosition( const Vec4& position ) { _position = position; } 128 128 129 /** Get the position of the light. */ 129 /** Get the position of the light. */ 130 130 inline const Vec4& getPosition() const { return _position; } 131 131 132 /** Set the direction of the light. */ 132 /** Set the direction of the light. */ 133 133 inline void setDirection( const Vec3& direction ) { _direction = direction; } 134 134 135 /** Get the direction of the light. */ 135 /** Get the direction of the light. */ 136 136 inline const Vec3& getDirection() const { return _direction; } 137 137 … … 175 175 176 176 protected : 177 177 178 178 virtual ~Light(); 179 179
