Changeset 13041 for OpenSceneGraph/trunk/src/osgPlugins/geo/geoActions.cpp
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/geo/geoActions.cpp
r12350 r13041 298 298 float v=*in; 299 299 *out=rangelist.begin()->getVal(); 300 for (std::vector<geoRange>::const_iterator itr=rangelist.begin(); 300 for (std::vector<geoRange>::const_iterator itr=rangelist.begin(); 301 301 itr<rangelist.end(); itr++) { 302 302 if (v>=itr->getMin() && v<=itr->getMax()) *out=itr->getVal(); … … 357 357 case DB_DSK_ROTATE_ACTION: 358 358 //std::cout << node->getName() << " v: " << getVar() << " rotion " << DEG2RAD(getValue()) << std::endl; 359 mtr->preMult( osg::Matrix::translate(-centre)* 359 mtr->preMult( osg::Matrix::translate(-centre)* 360 360 osg::Matrix::rotate(DEG2RAD(getValue()),axis)* // nov 2003 negative rotation convention 361 361 osg::Matrix::translate(centre)); … … 394 394 } 395 395 } 396 } else if (act==DB_DSK_TRANSLATE_ACTION) { 396 } else if (act==DB_DSK_TRANSLATE_ACTION) { 397 397 const geoField *gfd=grec->getField(GEO_DB_TRANSLATE_ACTION_INPUT_VAR); 398 398 if (gfd) { … … 414 414 } 415 415 } 416 } else if (act==DB_DSK_SCALE_ACTION) { // Nov 2002 not yet implemented in the modeller! 416 } else if (act==DB_DSK_SCALE_ACTION) { // Nov 2002 not yet implemented in the modeller! 417 417 } 418 418 return ok; … … 430 430 case DB_DSK_ROTATE_ACTION: 431 431 //std::cout << dr->getName() << " v: " << getVar() << " rotion " << DEG2RAD(getValue()) << std::endl; 432 *mtr = (*mtr)*osg::Matrix::translate(-getCentre())* 433 osg::Matrix::rotate(DEG2RAD(getValue()),getAxis())* 432 *mtr = (*mtr)*osg::Matrix::translate(-getCentre())* 433 osg::Matrix::rotate(DEG2RAD(getValue()),getAxis())* 434 434 osg::Matrix::translate(getCentre()); 435 435 break; … … 464 464 } 465 465 } 466 } else if (act==DB_DSK_TRANSLATE_ACTION) { 466 } else if (act==DB_DSK_TRANSLATE_ACTION) { 467 467 const geoField *gfd=grec->getField(GEO_DB_TRANSLATE_ACTION_INPUT_VAR); 468 468 if (gfd) { … … 484 484 } 485 485 } 486 } else if (act==DB_DSK_SCALE_ACTION) { // Nov 2002 not yet implemented in the modeller! 486 } else if (act==DB_DSK_SCALE_ACTION) { // Nov 2002 not yet implemented in the modeller! 487 487 } 488 488 return ok; … … 548 548 } 549 549 550 void geoStrContentBehaviour::doaction(osg::Drawable* /*node*/) 550 void geoStrContentBehaviour::doaction(osg::Drawable* /*node*/) 551 551 { // do new text 552 552 #ifdef USETEXT // buggy text feb 2003 … … 688 688 } 689 689 } 690 } 690 } 691 691 if (newpos) { 692 692 osg::Vec3Array* vtxa = dynamic_cast<osg::Vec3Array*>(gm->getVertexArray());
