本文整理汇总了C++中params::InterfaceGlRef::addSeparator方法的典型用法代码示例。如果您正苦于以下问题:C++ InterfaceGlRef::addSeparator方法的具体用法?C++ InterfaceGlRef::addSeparator怎么用?C++ InterfaceGlRef::addSeparator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类params::InterfaceGlRef
的用法示例。
在下文中一共展示了InterfaceGlRef::addSeparator方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setup
void redEyeApp::setup() {
//-settings
mListener.setup(43334); //osc input port
//--defaults
mHide= false; //also keydown 'i'
mError= "";
mOsc= "";
mMode= 5;
mAmplitude= 0.0f;
mNumSamples= 512;
mDownSample= 0;
mWidth= 1.0f;
mColorBack= ColorA(0.0f, 0.0f, 0.0f, 1.0f);
//mVisible0= mVisible1= true;
mScale0= mScale1= Vec3f(1.0f, 1.0f, 1.0f);
mTranslate0= mTranslate1= Vec3f::zero();
mColor0= ColorA(1.0f, 0.0f, 0.0f, 1.0f);
mColor1= ColorA(0.0f, 1.0f, 0.0f, 1.0f);
//--audio
mInput= audio::Input(); //use default input device
mInput.start(); //start capturing
//--shaders
mPathFrag= getPathDirectory(app::getAppPath().string())+"data/_default_frag.glsl";
mPathVert= getPathDirectory(app::getAppPath().string())+"data/_default_vert.glsl";
//loadShader();
//--parameter window
mParams= params::InterfaceGl::create(getWindow(), "redEye", toPixels(Vec2i(200, 400)));
//mParams->addText("text", ("label=`redEye`"));
mParams->addParam("NumSamples", &mNumSamples, "min=1 max=2048 step=1");
mParams->addParam("DownSample", &mDownSample, "min=0 max=2047 step=1");
mParams->addParam("Width", &mWidth, "min=0 max=1000 step=1");
mParams->addParam("Back color", &mColorBack, "");
mParams->addSeparator();
//mParams->addParam("Visible", &mVisible0);
mParams->addParam("Scale", &mScale0);
mParams->addParam("Rotate", &mRotate0);
mParams->addParam("Translate", &mTranslate0);
mParams->addParam("Color", &mColor0, "");
/*mParams->addSeparator();
mParams->addParam("Visible1", &mVisible1);
mParams->addParam("Scale1", &mScale1);
mParams->addParam("Rotate1", &mRotate1);
mParams->addParam("Translate1", &mTranslate1);
mParams->addParam("Color1", &mColor1, "");*/
//mParams->addParam("Cube Size", &mObjSize, "min=0.1 max=20.5 step=0.5 keyIncr=z keyDecr=Z");
mParams->addSeparator();
mParams->addParam("String00", &mNameFrag, "label=`frag (f):`");
mParams->addParam("String01", &mNameVert, "label=`vert (v):`");
mParams->addParam("String02", &mError, "label=`error:`");
mParams->addParam("String03", &mOsc, "label=`osc:`");
mParams->addParam("String04", &mMode, "label=`mode (m):`");
mParams->addParam("String05", &mFps, "label=`fps:`");
}
示例2: setup
void FlockingApp::setup()
{
mCentralGravity = true;
mFlatten = false;
mZoneRadius = 30.0f;
// SETUP CAMERA
mCameraDistance = 500.0f;
mEye = Vec3f( 0.0f, 0.0f, mCameraDistance );
mCenter = Vec3f::zero();
mUp = Vec3f::yAxis();
mCam.setPerspective( 75.0f, getWindowAspectRatio(), 5.0f, 2000.0f );
// SETUP PARAMS
mParams = params::InterfaceGl::create( "Flocking", Vec2i( 200, 220 ) );
mParams->addParam( "Scene Rotation", &mSceneRotation, "opened=1" );
mParams->addSeparator();
mParams->addParam( "Eye Distance", &mCameraDistance, "min=50.0 max=1500.0 step=50.0 keyIncr=s keyDecr=w" );
mParams->addParam( "Center Gravity", &mCentralGravity, "keyIncr=g" );
mParams->addParam( "Flatten", &mFlatten, "keyIncr=f" );
mParams->addSeparator();
mParams->addParam( "Zone Radius", &mZoneRadius, "min=10.0 max=100.0 step=1.0 keyIncr=z keyDecr=Z" );
// CREATE PARTICLE CONTROLLER
mParticleController.addParticles( NUM_INITIAL_PARTICLES );
}
示例3: createParams
void GeometryApp::createParams()
{
#if ! defined( CINDER_GL_ES )
vector<string> primitives = { "Capsule", "Cone", "Cube", "Cylinder", "Helix", "Icosahedron", "Icosphere", "Sphere", "Teapot", "Torus", "Plane" };
vector<string> qualities = { "Low", "Default", "High" };
vector<string> viewModes = { "Shaded", "Wireframe" };
vector<string> texturingModes = { "None", "Procedural", "Sampler" };
mParams = params::InterfaceGl::create( getWindow(), "Geometry Demo", toPixels( ivec2( 300, 200 ) ) );
mParams->setOptions( "", "valueswidth=160 refresh=0.1" );
mParams->addParam( "Primitive", primitives, (int*) &mPrimitiveSelected );
mParams->addParam( "Quality", qualities, (int*) &mQualitySelected );
mParams->addParam( "Viewing Mode", viewModes, (int*) &mViewMode );
mParams->addParam( "Texturing Mode", texturingModes, (int*) &mTexturingMode );
mParams->addSeparator();
mParams->addParam( "Subdivision", &mSubdivision ).min( 1 ).max( 5 ).updateFn( [this] { createGeometry(); } );
mParams->addSeparator();
mParams->addParam( "Show Grid", &mShowGrid );
mParams->addParam( "Show Normals", &mShowNormals );
mParams->addParam( "Show Colors", &mShowColors ).updateFn( [this] { createGeometry(); } );
mParams->addParam( "Face Culling", &mEnableFaceFulling ).updateFn( [this] { gl::enableFaceCulling( mEnableFaceFulling ); } );
#endif
}
示例4: setParams
void VectorBlur::setParams(params::InterfaceGlRef params)
{
if (params == nullptr) {
printf("hbVectorBlur get no params\n");
return;
}
params->addSeparator();
params->addText("Vector Blur Filter Settings");
params->addParam("Vector Map Kernel", &mVectorMapKernel).min(1).max(5).step(1);
params->addParam("Vector Map Theta", &mTheta).min(0.f).max(360.f).step(0.1f);
params->addParam("Blur Map Kernel", &mSize).min(0).max((float)mSizeMax).step(1);
params->addParam("Blur Map Amplifier", &mAmplifier).min(1.f).max(10.f).step(0.1f);
params->addParam("Vector Blur Kernel", &mVectorBlurKernel).min(0).max(30).step(1);
params->addSeparator();
}
示例5: setup
void ForestApp::setup()
{
mParams = params::InterfaceGl::create( getWindow(), "Forest parameters", toPixels(Vec2i(240, 600)) );
mParams->addButton("Reset", bind( &ForestApp::resetButton, this ), "key=r");
mParams->addButton("Stop sim", bind( &ForestApp::stopButton, this ), "key=s");
mParams->addButton("Write results", bind( &ForestApp::writeButton, this ), "key=w");
mParams->addParam("Sim step #", &mStrandBox.mSimulationStep, "readonly=true");
mParams->addSeparator();
mParams->addParam( "Number of seeds", &mStrandBox.mNumSeeds).min(0).max(16).step(1);
mParams->addParam( "Number of strands", &mStrandBox.mNumStrands).min(0).max(1000).step(1);
mParams->addParam( "Number of dots", &mDots.mNumDots).min(0).max(1000).step(1);
mParams->addParam( "Strand length", &mStrandBox.mStrandLength).min(1).max(1000).step(1);
mParams->addParam( "Growth probability", &mStrandBox.mGrowthProbability).min(0.f).max(1.0f).step(0.001f);
mParams->addParam( "Growth dir Y", &mStrandBox.mGrowthDirection.y).min(-1.f).max(10.f).step(0.01f);
mParams->addSeparator();
mParams->addParam( "Spring length", &mStrandBox.mSpringLength).min(0.0001f).max(0.01f).step(0.0001f);
mParams->addParam( "Spring iters", &mStrandBox.mSpringIterations).min(0).max(10000).step(10);
mParams->addParam( "Spring K", &mStrandBox.mSpringK).min(0.f).max(1.0f).step(0.001f);
mParams->addParam( "Straighten K", &mStrandBox.mStraightenK).min(0.f).max(1.0f).step(0.001f);
mParams->addParam( "Smooth K", &mStrandBox.mSmoothK).min(0.f).max(1.0f).step(0.001f);
mParams->addParam( "Align K", &mStrandBox.mAlignmentK).min(0.f).max(4.0f).step(0.001f);
mParams->addSeparator();
mParams->addParam( "Smallest dot", &mDots.mSmallestDotSize).min(0.f).max(0.2f).step(0.001f);
mParams->addParam( "Largest dot", &mDots.mLargestDotSize).min(0.f).max(0.2f).step(0.001f);
mParams->addParam( "Dot gravity", &mDots.mDotGravity).min(0.f).max(20.0f).step(0.001f);
mParams->addParam( "Dot spacing", &mDots.mDotSpacing).min(0.f).max(20.0f).step(0.001f);
mParams->addSeparator();
mParams->addParam( "Panel edge K", &mPanels.mEdgeK).min(0.f).max(1.0f).step(0.001f);
mParams->addParam( "Panel edge margin", &mPanels.mEdgeMargin).min(0.f).max(1.0f).step(0.001f);
mParams->addSeparator();
mParams->addParam( "Show affinity matrix", &mShowMatrix, "key=m");
mParams->addParam( "Max strands per dot", &mDots.mDotMaxStrands).min(0).max(100).step(1);
mParams->addParam( "Affinity repel K", &mDots.mRepelK).min(0.f).max(1.0f).step(0.001f);
mParams->addParam( "Affinity retain K", &mDots.mRetainK).min(0.f).max(1.0f).step(0.001f);
mParams->addParam( "Affinity decay K", &mDots.mDecayK).min(0.f).max(1.0f).step(0.001f);
mParams->addParam( "Force attract K", &mDots.mAttractK).min(0.f).max(1.0f).step(0.001f);
}
示例6: setup
void MotionBlurVelocityBufferApp::setup()
{
mBackground = gl::Texture::create( loadImage( loadAsset( "background.jpg" ) ) );
mGpuTimer = gl::QueryTimeSwapped::create();
gl::enableVerticalSync();
createGeometry();
createBuffers();
loadShaders();
#if ! defined( CINDER_ANDROID )
mParams = params::InterfaceGl::create( "Motion Blur Options", ivec2( 250, 300 ) );
mParams->addParam( "Average GPU Draw (ms)", &mAverageGpuTime );
mParams->addParam( "Average CPU Draw (ms)", &mAverageCpuTime );
mParams->addSeparator();
mParams->addParam( "Enable Blur", &mBlurEnabled );
mParams->addParam( "Show Velocity Buffers", &mDisplayVelocityBuffers );
mParams->addParam( "Pause Animation", &mPaused );
mParams->addParam( "Animation Speed", &mAnimationSpeed ).min( 0.05f ).step( 0.2f );
mParams->addParam( "Max Samples", &mSampleCount ).min( 1 ).step( 2 );
mParams->addParam( "Blur Noise", &mBlurNoise ).min( 0.0f ).step( 0.01f );
#endif
#if defined( CINDER_COCOA_TOUCH )
getSignalSupportedOrientations().connect( [] { return InterfaceOrientation::LandscapeAll; } );
#endif
}
示例7: setup
void TweakBarApp::setup()
{
mObjSize = 4;
mLightDirection = vec3( 0, 0, -1 );
mColor = ColorA( 0.25f, 0.5f, 1, 1 );
mSomeValue = 2;
// Setup our default camera, looking down the z-axis
mCam.lookAt( vec3( -20, 0, 0 ), vec3( 0 ) );
// Create the interface and give it a name.
mParams = params::InterfaceGl::create( getWindow(), "App parameters", toPixels( ivec2( 200, 400 ) ) );
// Setup the parameters
mParams->addParam( "Cube Size", &mObjSize ).min( 0.1f ).max( 20.5f ).keyIncr( "z" ).keyDecr( "Z" ).precision( 2 ).step( 0.02f );
mParams->addParam( "Cube Rotation", &mObjOrientation );
mParams->addParam( "Cube Color", &mColor );
mParams->addParam( "String ", &mString );
mParams->addSeparator();
// Attach a callback that is fired after a target is updated.
mParams->addParam( "some value", &mSomeValue ).updateFn( [this] { console() << "new value: " << mSomeValue << std::endl; } );
// Add a param with no target, but instead provide setter and getter functions.
std::function<void( vec3 )> setter = std::bind( &TweakBarApp::setLightDirection, this, std::placeholders::_1 );
std::function<vec3 ()> getter = std::bind( &TweakBarApp::getLightDirection, this );
mParams->addParam( "Light Direction", setter, getter );
// Other types of controls that can be added to the interface
mParams->addButton( "Button!", std::bind( &TweakBarApp::button, this ) );
mParams->addText( "text", "label=`This is a label without a parameter.`" );
}
示例8: setup
void WaterSimulationApp::setup(){
boxDimension=Vec3f(30.0f,30.0f,30.0f);
boxCenter=Vec3f(boxDimension)/2.0f;
//Fluid System setup
fluidsys=&stamfluid;
fluidsys->reset(boxDimension);
randomForce=Vec3f(2,3,-1);
randomForceX=boxCenter;
//// setup our default camera, looking down the z-axis
CameraPersp cam;
cam.setEyePoint(Vec3f(200, 50, 50));
cam.setCenterOfInterestPoint(boxCenter);
cam.setPerspective(60.0, getWindowAspectRatio(), 1.0, 1000.0);
mMayaCam.setCurrentCam(cam);
Matrix44f mvM=mMayaCam.getCamera().getModelViewMatrix();
gravity = Vec3f(mvM.m10,mvM.m11,mvM.m12);//col4:camera center, row: right,up,back
gravity*= 9.8f;
// Setup the parameters
mDrawGravity=false;
mAddNewForce=false;
mAnimate =false;
mDrawBox =true;
mParams = params::InterfaceGl::create( getWindow(), "Water Simulation Parameters", toPixels( Vec2i( 250,300 ) ) );
mParams->addParam("Draw Box", &mDrawBox);
mParams->addParam("Draw Grid",&mDrawGrid);
mParams->addParam("Draw Random Force",&mDrawForce);
mParams->addSeparator();
mParams->addParam("External Force Position",&randomForceX);
mParams->addParam("External Force Dir",&randomForce);
mParams->addParam("Draw Gravity",&mDrawGravity);
mParams->addParam("Draw Velocity", &(fluidsys->mDrawVelocity));
mParams->addSeparator();
mParams->addParam("Animate",&mAnimate);
mParams->addText("status","label=` `");
mParams->addParam("Time Elapsed",&(fluidsys->elapsed),"",true);
mParams->addSeparator();
mParams->addParam("Viscosity", &fluidsys->viscosity);
mParams->addParam("Diffusion Rate", &fluidsys->diffusion);
mParams->addParam("Buoyancy Rate",&fluidsys->buoyancy);
}
示例9: setup
void TextboxApp::setup(){
mString = "At NEXT14, great speakers will draw a picture of what ’The New Normal’ will look like in the near future. Join NEXT14 on May 5-6, 2014!";
mTextBox = new next::TextBox();
mTextBox->setFont(Font(app::loadResource(RES_TRANSCRIPT_BOLD),TEXT_BOX_FONT_SIZE * TEXT_BOX_TEXTURE_FONT_SIZE_SCALE));
mTextBox->setFontSize(TEXT_BOX_FONT_SIZE);
mTextBox->setLineHeight(TEXT_BOX_FONT_LINE_HEIGHT);
mTextBox->setColorFont(TEXT_BOX_COLOR_FONT);
mTextBox->setColorUnderline(TEXT_BOX_COLOR_UNDERLINE);
mTextBox->setColorDropShadow(TEXT_BOX_COLOR_DROP_SHADOW);
mTextBox->setDropShadowOffset(TEXT_BOX_DROP_SHADOW_OFFSET);
mTextBox->dropShadow(TEXT_BOX_USE_DROP_SHADOW);
mTextBox->setDropShadowScale(TEXT_BOX_DROP_SHADOW_SCALE);
mTextBox->underline(TEXT_BOX_USE_UNDERLINE);
mTextBox->setUnderlineHeight(TEXT_BOX_UNDERLINE_HEIGHT);
mTextBox->setUnderlineBaselineOffset(TEXT_BOX_UNDERLINE_BASELINE_OFFSET);
mTextBox->setWidth(TEXT_BOX_WIDTH);
mTextBox->setString(mString);
mParams = params::InterfaceGl::create("Controls", Vec2i(200,400));
mParams->addSeparator();
mParams->addParam("Texture Font Scale", &TEXT_BOX_TEXTURE_FONT_SIZE_SCALE, "min=1.0 max=16.0 step=1.0");
mParams->addParam("Font Size", &TEXT_BOX_FONT_SIZE, "min=1.0 max=200.0 step=0.125");
mParams->addParam("Font Line Height", &TEXT_BOX_FONT_LINE_HEIGHT, "min=1.0 max=2.0 step=0.0125");
mParams->addParam("Width", &TEXT_BOX_WIDTH);
mParams->addSeparator();
mParams->addParam("Color Font", &TEXT_BOX_COLOR_FONT);
mParams->addParam("Color Underline", &TEXT_BOX_COLOR_UNDERLINE);
mParams->addParam("Color DropShadow", &TEXT_BOX_COLOR_DROP_SHADOW);
mParams->addSeparator();
mParams->addParam("Use DropShadow", &TEXT_BOX_USE_DROP_SHADOW);
mParams->addParam("DropShadow Offset X", &TEXT_BOX_DROP_SHADOW_OFFSET[0]);
mParams->addParam("DropShadow Offset Y", &TEXT_BOX_DROP_SHADOW_OFFSET[1]);
mParams->addParam("DropShadow Scale", &TEXT_BOX_DROP_SHADOW_SCALE,"min=0.0 max=4.0 step=0.0125");
mParams->addSeparator();
mParams->addParam("Underline Height", &TEXT_BOX_UNDERLINE_HEIGHT, "min=0.0 max=30.0 step=0.0125");
mParams->addParam("Underline Offset", &TEXT_BOX_UNDERLINE_BASELINE_OFFSET, "min=-20.0 max=20.0 step=0.0125");
mParams->addParam("Debug Draw", &TEXT_BOX_DEBUG_DRAW);
}
示例10: setup
void MeshViewApp::setup()
{
loadConfig("configs/gaztank.ini");
setupCamera();
// Create lights
m_light1 = new gl::Light(gl::Light::DIRECTIONAL, 0);
m_light1->setDirection(Vec3f(0, 0, 1).normalized());
m_light1->setAmbient(Color(0.0f, 0.0f, 0.1f));
m_light1->setDiffuse(Color(0.9f, 0.6f, 0.3f));
m_light1->setSpecular(Color(0.9f, 0.6f, 0.3f));
m_light2 = new gl::Light(gl::Light::DIRECTIONAL, 1);
m_light2->setDirection(Vec3f(0, 0, -1).normalized());
m_light2->setAmbient(Color(0.0f, 0.0f, 0.0f));
m_light2->setDiffuse(Color(0.2f, 0.6f, 1.0f));
m_light2->setSpecular(Color(0.2f, 0.2f, 0.2f));
// Setup matrix
m_matrix.setToIdentity();
m_matrix.translate(Vec3f::zero());
m_matrix.rotate(Vec3f::zero());
m_matrix.scale(Vec3f::one());
m_rotateMesh = false;
// Create a parameter window
m_params = params::InterfaceGl::create(getWindow(), "Properties", Vec2i(180, 240));
m_params->addText("LMB + drag - rotate");
m_params->addText("RMB + drag - zoom");
m_params->addSeparator();
m_params->addButton("Full screen", [&] { setFullScreen(!isFullScreen()); });
m_params->addParam("Auto rotate", &m_rotateMesh);
m_params->addSeparator();
m_params->addParam("Diffuse", &m_diffuseEnabled);
m_params->addParam("Normal", &m_normalEnabled);
m_params->addParam("Specular", &m_specularEnabled);
m_params->addParam("AO", &m_aoEnabled);
m_params->addParam("Emissive", &m_emissiveEnabled);
m_params->addSeparator();
m_params->addParam("Gamma", &m_gamma, "min=0.0 max=10.0 step=0.1");
m_time = (float)getElapsedSeconds();
}
示例11: setup
void GeoDeVisualizerApp::setup()
{
// read the initial world
json initJSON;
if (!debug) {
string JSONBuff;
if (mServer.open(DEFAULT_PORT, "localhost")) {
while (!mServer.isReady(JSONBuff)) {};
}
initJSON = json::parse(JSONBuff);
} else {
ifstream inputFile( "../../../resources/test_data.json" );
assert( inputFile.good() );
string JSONBuff(( istreambuf_iterator<char>( inputFile )), ( istreambuf_iterator<char>() ));
initJSON = json::parse(JSONBuff);
}
if (!(isInitialJSON(initJSON) and validateInitialJSON(initJSON))) {
cerr << "Initial JSON was not valid" << endl;
exit(1);
}
// WRITE VERTICES AND FACES TO THE TRIMESH
writeMesh(initJSON);
mWorld.initialize(initJSON);
setupColoniesList();
resourceColors = ResourceColorPicker().getColors(mWorld.numResources());
// SETUP CAMERA
setupCamVars(mCamVars);
mCam.setPerspective(75.0f, getWindowAspectRatio(), 0.5f, 2000.0f );
// SETUP PARAMS
setupParamVars(mCurParams, mPrevParams, mWorld.numResources());
mParams = params::InterfaceGl::create("GeoDe", Vec2i(200, 400));
mParams->addParam("scene rotation", &mCamVars.sceneRotation, "opened=1");
mParams->addParam("eye distance", &mCamVars.cameraDistance, "min=1.0 max=1500.0 step=0.1 keyIncr=s keyDecr=k keyIncr=j");
mParams->addSeparator();
mParams->addParam("time", &mCurParams.timeStep);
mParams->addParam("state", mDisplayModes, &mCurParams.displayMode);
mParams->addSeparator();
}
示例12: setup
void FlockingApp::setup()
{
Rand::randomize();
mCenter = vec3( getWindowWidth() * 0.5f, getWindowHeight() * 0.5f, 0.0f );
mCentralGravity = true;
mFlatten = false;
mSaveFrames = false;
mIsRenderingPrint = false;
mZoneRadius = 80.0f;
mLowerThresh = 0.5f;
mHigherThresh = 0.8f;
mAttractStrength = 0.004f;
mRepelStrength = 0.01f;
mOrientStrength = 0.01f;
// SETUP CAMERA
mCameraDistance = 350.0f;
mEye = vec3( 0.0f, 0.0f, mCameraDistance );
mCenter = vec3::zero();
mUp = vec3::yAxis();
mCam.setPerspective( 75.0f, getWindowAspectRatio(), 5.0f, 5000.0f );
// SETUP PARAMS
mParams = params::InterfaceGl::create( "Flocking", ivec2( 200, 310 ) );
mParams->addParam( "Scene Rotation", &mSceneRotation, "opened=1" );
mParams->addSeparator();
mParams->addParam( "Eye Distance", &mCameraDistance, "min=100.0 max=2000.0 step=50.0 keyIncr=s keyDecr=w" );
mParams->addParam( "Center Gravity", &mCentralGravity, "keyIncr=g" );
mParams->addParam( "Flatten", &mFlatten, "keyIncr=f" );
mParams->addSeparator();
mParams->addParam( "Zone Radius", &mZoneRadius, "min=10.0 max=100.0 step=1.0 keyIncr=z keyDecr=Z" );
mParams->addParam( "Lower Thresh", &mLowerThresh, "min=0.025 max=1.0 step=0.025 keyIncr=l keyDecr=L" );
mParams->addParam( "Higher Thresh", &mHigherThresh, "min=0.025 max=1.0 step=0.025 keyIncr=h keyDecr=H" );
mParams->addSeparator();
mParams->addParam( "Attract Strength", &mAttractStrength, "min=0.001 max=0.1 step=0.001 keyIncr=a keyDecr=A" );
mParams->addParam( "Repel Strength", &mRepelStrength, "min=0.001 max=0.1 step=0.001 keyIncr=r keyDecr=R" );
mParams->addParam( "Orient Strength", &mOrientStrength, "min=0.001 max=0.1 step=0.001 keyIncr=o keyDecr=O" );
// CREATE PARTICLE CONTROLLER
mParticleController.addParticles( NUM_INITIAL_PARTICLES );
mParticleController.addPredators( NUM_INITIAL_PREDATORS );
}
示例13: setupParams
void PinballWarpingApp::setupParams()
{
mParams = params::InterfaceGl::create("params", ivec2(300,300));
mParams->addParam("FPS", &mFps);
mParams->addSeparator();
mParams->addParam("Draw Image", &mDrawImage);
mParams->addParam("Debugging", &mPinball.mDebug);
mParams->addParam("Editing Locations", &mPinball.mIsInEditingMode).updateFn([this] {
if (!mPinball.mDebug)
mPinball.saveJson();
});
}
示例14: setupParams
void PhysicallyBasedShadingApp::setupParams()
{
mParams = params::InterfaceGl::create( "PBR", ivec2( 300, 400 ) );
mParams->minimize();
mParams->addText( "Material" );
mParams->addParam( "Roughness", &mRoughness ).min( 0.0f ).max( 1.0f ).step( 0.01f );
mParams->addParam( "Metallic", &mMetallic ).min( 0.0f ).max( 1.0f ).step( 0.01f );
mParams->addParam( "Specular", &mSpecular ).min( 0.0f ).max( 1.0f ).step( 0.01f );
mParams->addParam( "Base Color", &mBaseColor );
mParams->addSeparator();
mParams->addText( "Light" );
mParams->addParam( "Animation", &mAnimateLight );
mParams->addParam( "Radius", &mLightRadius ).min( 0.0f ).max( 20.0f ).step( 0.1f );
mParams->addParam( "Color", &mLightColor );
mParams->addSeparator();
mParams->addText( "Camera" );
mParams->addParam( "Focal Length", &mFocalLength ).min( 0.0f ).step( 1.0f ).updateFn( [this]() {
if( mFocalLength != sFocalPresetsValues[mFocalLengthPreset] ){
mFocalLengthPreset = 0;
}
} );
mParams->addParam( "Lense", sFocalPresets, &mFocalLengthPreset );
mParams->addParam( "Sensor Size", &mSensorSize ).min( 0.0f ).step( 1.0f ).updateFn( [this]() {
if( mSensorSize != sSensorPresetsValues[mSensorSizePreset] ){
mSensorSizePreset = 0;
}
} );
mParams->addParam( "Film Gate", sSensorPresets, &mSensorSizePreset );
mParams->addParam( "F-Stop", &mFStop ).min( 0.25f ).max( 8.0f ).step( 0.25f ).updateFn( [this]() {
if( mFStop != sFStopPresetsValues[mFStopPreset] ){
mFStopPreset = 0;
}
} );
mParams->addParam( "F-Stop Preset", sFStopPresets, &mFStopPreset );
}
示例15: setupGUI
void PointCloudVAO::setupGUI()
{
mParamStep = 2;
mParamDepthMin = 100.0f;
mParamDepthMax = 1000.0f;
mParamPointSize = 4.0f;
mGUI = params::InterfaceGl::create("Settings", ivec2(300, 200));
mGUI->addSeparator();
mGUI->addParam<int>("paramStep", &mParamStep).optionsStr("label='Spacing'");
mGUI->addParam<float>("paramDepthMin", &mParamDepthMin).optionsStr("label='Min Depth'");
mGUI->addParam<float>("paramDepthMax", &mParamDepthMax).optionsStr("label='Max Depth'");
mGUI->addParam<float>("paramPointSize", &mParamPointSize).optionsStr("label='Point Size'");
}