bool GeometryCorrection::ShowColorImage() { if (treeBaseItem==treeWidget->currentItem()) { //to show base image in gray; //firstly, show overview, creat a qimage; pShowimagebaseUI=new ShowImageBase1(0,pBaseFileDataset); connect(pShowimagebaseUI,SIGNAL(ReportPosition(QPoint)),this,SLOT(GetBasePosition(QPoint))); pShowimagebaseUI->ShowOverviewColor(nRGBofBase); } return true; }
bool GeometryCorrection::ShowGrayImage() { //firstly show a gray image: base image ; //check if the file has been selected; if (treeBaseItem==treeWidget->currentItem()) { //to show base image in gray; //firstly, show overview, creat a qimage; pShowimagebaseUI=new ShowImageBase1(0,pBaseFileDataset); connect(pShowimagebaseUI,SIGNAL(ReportPosition(QPoint)),this,SLOT(GetBasePosition(QPoint))); connect(this,SIGNAL(ReportCloseWindows()),pShowimagebaseUI,SLOT(close())); pShowimagebaseUI->ShowOverviewGray(); } return true; }
bool DSManager::IsValidCellForThisItem(const LPITEM pItem, const TItemPos& Cell) const { if (NULL == pItem) return false; WORD wBaseCell = GetBasePosition(pItem); if (WORD_MAX == wBaseCell) return false; if (Cell.window_type != DRAGON_SOUL_INVENTORY || (Cell.cell < wBaseCell || Cell.cell >= wBaseCell + DRAGON_SOUL_BOX_SIZE)) { return false; } else return true; }
int hgemitter::Emit( hgdx *hg, VECTOR *in ) { int i,n,total,type; int id,modelid,eventid; float rot,prot; short df; VECTOR vec; hgobj *obj; total = 0; type = mode & 3; if ( type == EMITMODE_NONE ) return 0; n = out_num; if ( out_numopt > 0 ) n += rand()%out_numopt; if ( n <= 0 ) return 0; if ( type == EMITMODE_CIRCLE ) { rot = 0.0f; prot = PI2 / (float)n; } for(i=0;i<n;i++) { modelid = out_model; if ( out_modelnum > 0 ) { modelid += rand()%out_modelnum; //AlertMsgf( "%d===%d",out_modelnum,modelid ); } id = hg->AddObjWithModel( modelid ); if ( id < 0 ) break; obj = hg->GetObj( id ); df = obj->model->GetFlag(); obj->mode |= objmode; obj->SetEfx( (float)out_efx, 0.0f, 0.0f ); GetBasePosition( obj->GetPos(), in ); switch( type ) { case EMITMODE_CIRCLE: GetCircleAngle( &vec, rot ); SetDirectionFromAngle( df, obj->GetDir(), &vec ); rot += prot; break; case EMITMODE_RANDOM: GetAngle( &vec ); SetDirectionFromAngle( df, obj->GetDir(), &vec ); break; default: break; } if ( mode & EMITMODE_LOOKAT ) { CopyVector( obj->GetRot(), &vec ); } if ( out_event >= 0 ) { eventid = out_event; if ( out_eventnum > 0 ) eventid += rand()%out_eventnum; obj->SetEvent( hg->GetEvent(eventid) ,-1 ); } obj->SetColiGroup( mygroup, enegroup ); total++; } return total; }