Ejemplo n.º 1
0
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    currentStep1 = 0;
    currentStep2 = 0;

    imageSteps1 << 0;
    imageSteps2 << 0;

//    fp = 0;

    rubberBand1 = new QRubberBand(QRubberBand::Rectangle, ui->imageDisplay);
    rubberBand2 = new QRubberBand(QRubberBand::Rectangle, ui->imageDisplay_2);

    connect(ui->loadButton, SIGNAL(clicked()), this, SLOT(load()));
    connect(ui->analyzeButton, SIGNAL(clicked()), this, SLOT(processImage()));
    connect(ui->nextButton, SIGNAL(clicked()), this, SLOT(nextImage()));
    connect(ui->previousButton, SIGNAL(clicked()), this, SLOT(previousImage()));
    connect(ui->fitnessButton, SIGNAL(clicked()), this, SLOT(showPlot()));
    connect(ui->leftRadioButton, SIGNAL(clicked()), this, SLOT(selectImageLabel()));
    connect(ui->rightRadioButton, SIGNAL(clicked()), this, SLOT(selectImageLabel()));
    connect(ui->deleteStepButton, SIGNAL(clicked()), this, SLOT(removeStep()));
    connect(ui->compareButton, SIGNAL(clicked()), this, SLOT(compareSides()));

    ui->imageDisplay->setMouseTracking(true);
    ui->imageDisplay_2->setMouseTracking(true);
    ui->imageDisplay->installEventFilter(this);
    ui->imageDisplay_2->installEventFilter(this);

    ui->fitnessButton->setEnabled(false);

    selectImageLabel();
}
Ejemplo n.º 2
0
void ObjectManager::update(float time){
	//update objects.
	for(int i=0;i<objects.size();i++){
		if (objects[i] != NULL)
			objects[i]->update(time);
	}
	//update box2D
	float32 timeStep = time;
	int32 velocityIterations = 20;//Higher = more precision.
	int32 positionIterations = 20;//Lower = more speed.
	world->Step(timeStep, velocityIterations, positionIterations);
	removeStep();

	lightsManager->update();
}
Ejemplo n.º 3
0
TargetMarker::
        ~TargetMarker()
{
    Step::ptr step = target_needs_->step().lock();
    if (!step)
        return;

    // Remove all steps than can only be reached from this target.
    auto dag = dag_.write ();
    GraphVertex start = dag->getVertex (step);
    if (!start)
        return;

    std::set<Step::ptr> steps_to_remove = single_paths(start, dag->g ());

    for ( Step::ptr s : steps_to_remove ) {
        dag->removeStep (s);
    }
}