Changeset 13041 for OpenSceneGraph/trunk/include/osg/Material
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/Material (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/Material
r10691 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 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 */ … … 34 34 35 35 Material(); 36 36 37 37 /** Copy constructor using CopyOp to manage deep vs shallow copy. */ 38 38 Material(const Material& mat,const CopyOp& copyop=CopyOp::SHALLOW_COPY): … … 56 56 57 57 META_StateAttribute(osg, Material, MATERIAL); 58 58 59 59 /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ 60 60 virtual int compare(const StateAttribute& sa) const … … 109 109 EMISSION = GL_EMISSION, 110 110 AMBIENT_AND_DIFFUSE = GL_AMBIENT_AND_DIFFUSE, 111 OFF 111 OFF 112 112 }; 113 113 … … 123 123 inline bool getDiffuseFrontAndBack() const { return _diffuseFrontAndBack; } 124 124 125 /** Set specular value of specified face(s) of the material, 125 /** Set specular value of specified face(s) of the material, 126 126 * valid specular[0..3] range is 0.0 to 1.0. 127 127 */ 128 128 void setSpecular( Face face, const Vec4& specular ); 129 129 130 130 /** Get the specular value for specified face. */ 131 131 const Vec4& getSpecular(Face face) const; 132 132 133 133 /** Return whether specular values are equal for front and back faces 134 134 * or not. … … 136 136 inline bool getSpecularFrontAndBack() const { return _specularFrontAndBack; } 137 137 138 /** Set emission value of specified face(s) of the material, 138 /** Set emission value of specified face(s) of the material, 139 139 * valid emission[0..3] range is 0.0 to 1.0. 140 140 */ 141 141 void setEmission( Face face, const Vec4& emission ); 142 142 143 143 /** Get the emission value for specified face. */ 144 144 const Vec4& getEmission(Face face) const; 145 145 146 146 /** Return whether emission values are equal for front and back faces 147 147 * or not. … … 153 153 */ 154 154 void setShininess(Face face, float shininess ); 155 155 156 156 /** Get the shininess value for specified face. */ 157 157 float getShininess(Face face) const; 158 158 159 159 /** Return whether shininess values are equal for front and back faces 160 160 * or not. 161 161 */ 162 162 inline bool getShininessFrontAndBack() const { return _shininessFrontAndBack; } 163 163 164 164 /** Set the alpha value of ambient, diffuse, specular and emission 165 165 * colors of specified face, to 1-transparency.
