Changeset 13041 for OpenSceneGraph/trunk/src/osgVolume/Property.cpp
- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osgVolume/Property.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgVolume/Property.cpp
r12878 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 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 */ … … 134 134 void AlphaFuncProperty::setValue(float v) 135 135 { 136 _uniform->set(v); 136 _uniform->set(v); 137 137 _alphaFunc->setReferenceValue(v); 138 138 } … … 219 219 220 220 void PropertyVisitor::apply(CompositeProperty& cp) 221 { 221 { 222 222 for(unsigned int i=0; i<cp.getNumProperties(); ++i) 223 223 { … … 227 227 228 228 void PropertyVisitor::apply(SwitchProperty& sp) 229 { 229 { 230 230 if (_traverseOnlyActiveChildren) 231 231 { … … 269 269 { 270 270 public: 271 271 272 272 CycleSwitchVisitor(int delta): 273 273 PropertyVisitor(false), 274 274 _delta(delta), 275 275 _switchModified(true) {} 276 276 277 277 virtual void apply(SwitchProperty& sp) 278 278 { … … 290 290 sp.setActiveProperty(0); 291 291 } 292 292 293 293 _switchModified = true; 294 294 } … … 308 308 } 309 309 } 310 310 311 311 PropertyVisitor::apply(sp); 312 312 } 313 313 314 314 int _delta; 315 315 bool _switchModified; … … 355 355 356 356 bool passOnUpdates = false; 357 357 358 358 switch(ea.getEventType()) 359 359 { … … 395 395 float v = (ea.getY()-ea.getYmin())/(ea.getYmax()-ea.getYmin()); 396 396 if (ea.getMouseYOrientation()==osgGA::GUIEventAdapter::Y_INCREASING_DOWNWARDS) v = 1.0f-v; 397 397 398 398 float v2 = v*v; 399 399 float v4 = v2*v2;
