Ejemplo n.º 1
0
void FxApp::setupParams()
{
	mParams.clear();

	mParams.addParam( "Effect", mEffectNames, &mCurrentEffect );

	mParams.addSeparator();

	mParams.addText( mEffects[ mCurrentEffect ]->getName() );
	mEffects[ mCurrentEffect ]->addToParams( mParams );

	mParams.addSeparator();
	mParams.addParam( "Fps", &mFps, "", true );
}
void PaintingBeingsApp::updateInterface(bool readOnlyAlgoGenParams)
{
	_params.clear();

	// FrameRate
	_params.addParam("Frame rate", &_frameRate, "", true);

	// Taille de l'image miniature à recréer
	_params.addParam("Image size", &(_image.getMiniatureSize()), "min=10 max=100 step=5", readOnlyAlgoGenParams);

	// Taille de la population de l'algo gen
	_params.addParam("Population size", &(_algoGen.getPopulationSize()), "min=10 max=100 step=5", readOnlyAlgoGenParams);

	// Pourcentage pour l'algo gen
	_params.addParam("% Survivor", &(_algoGen.getThresholdSurvivor()), "min=5 max=50 step=1", readOnlyAlgoGenParams);
	_params.addParam("% Crossover", &(_algoGen.getThresholdCrossover()), "min=5 max=50 step=1", readOnlyAlgoGenParams);
	_params.addParam("% Mutation", &(_algoGen.getThresholdMutation()), "min=5 max=50 step=1", readOnlyAlgoGenParams);
	_params.addParam("% Leftover", &(_algoGen.getThresholdNewPopulation()), "min=5 max=50 step=1", readOnlyAlgoGenParams);

	// Resolution des Beings
	_params.addParam("Resolution", &(_imageBeing.getResolution()), "min=1 max=10 step=1", readOnlyAlgoGenParams);


	// Espacement entre cube de l'image Being
	_params.addParam("Spacing", &(_imageBeing.getSpacing()), "min=0 max=20 step=0.1", false);

	// Frequence du twist pour la déformation GLSL
	_params.addParam("Angle Max Twist", &(_imageBeing.getAngleMax()), "min=1.0 max=360.0 step=1.0", false);


	// Bouton capturant une image de la webCam
	_params.addButton("Webcam Shot", bind(&PaintingBeingsApp::captureCamera, this));
	// Bouton pour faire un screen shot de l'image Being
	_params.addButton("Save image Being", bind(&PaintingBeingsApp::screenShot, this));

	// Bouton pour modifier l'état de l'application
	_params.addButton("Play", bind(&PaintingBeingsApp::setPlay, this));
	_params.addButton("Pause", bind(&PaintingBeingsApp::setPause, this));
	_params.addButton("Stop", bind(&PaintingBeingsApp::setStop, this));

	// Option interface
	_params.addButton("Switch Image/Being", bind(&PaintingBeingsApp::setDisplayBeing, this));
	_params.addButton("Wireframe", bind(&PaintingBeingsApp::setShowWireFrame, this));

	// Reset position camera
	_params.addButton("Reset Camera", bind(&PaintingBeingsApp::resetCamera, this));

	_params.addButton("Quit", bind(&PaintingBeingsApp::closeApp, this));
}