//Draw void OsgMainApp::draw(){ //Every load o remove has to be done before any drawing //LOGI ("OsgMainApp::draw 1"); loadModels(); deleteModels(); if(_trans) { static double angle = 0; _trans->setMatrix(osg::Matrix::rotate(osg::DegreesToRadians(angle),1,0,0) * osg::Matrix::scale(_lodScale, _lodScale, _lodScale) * osg::Matrix::translate(_xTrans * _xFactor, 0, -_yTrans * _xFactor) ); angle += 0.3; LOGI ("angle = %f, _xFactor = %f", angle, _xFactor); } // // // 创建矩阵,指定到视点的距离。 // osg::Matrix trans; // trans.makeTranslate( 0., 0., -12. ); _viewer->frame(); }
//Draw void OsgMainApp::draw(){ //Every load o remove has to be done before any drawing loadModels(); deleteModels(); _viewer->frame(); }
//Draw void OsgMainApp::draw( int step,int isFromPic ){ loadModelFile( step, isFromPic); deleteModels(); if (_viewer != NULL) { _viewer->frame(); } }
Adaptor::~Adaptor() { deleteModels(); }
void dWMShop_c::endState_HideWait() { deleteModels(); visible = false; }
int dWMShop_c::onDelete() { deleteModels(); return layout.free(); }