void EnvironmentTestApp::mouseWheel(MouseEvent event) {
  mDistanceTarget += event.getWheelIncrement();
  mDistanceTarget = max(0.9f, min(4.0f, mDistanceTarget));
  
#ifdef USE_ZBUFFER_DEPTH
  mFocalDepth -= event.getWheelIncrement() * 0.05;
  mFocalDepth = max(0.3f, min(1.0f, mFocalDepth));
#else
  mFocalDepth -= event.getWheelIncrement() * 0.5;
  mFocalDepth = max(0.0f, min(200.0f, mFocalDepth));
#endif
}
void CinderProjectionTestApp::mouseWheel (MouseEvent event)
{
	if ( mActiveCam == CAM_LOOK )
	{
		mLookDistance -= event.getWheelIncrement() ;
	}
}
Ejemplo n.º 3
0
void VboMeshSampleApp::mouseWheel( MouseEvent event )
{
	// Zoom in/out with mouse wheel
	Vec3f eye = mCamera.getEyePoint();
	eye.z += event.getWheelIncrement() * 0.1f;
	mCamera.setEyePoint( eye );
}
Ejemplo n.º 4
0
bool QTimeline::mouseWheel( MouseEvent event )
{
    if ( !event.isAltDown() )
        return false;
    
    // update zoom
    float incr  = ( event.getWheelIncrement() > 0 ) ? 0.05f : -0.05f;
    mZoom       = (int)( ( mZoom + incr ) * 100.0f + 0.5f ) / 100.0f;   // +0.5f fix floating point madness
    mZoom       = math<float>::clamp( mZoom, 0.25f, 4.0f );
    
    // update items labels
    vector<QTimelineItemRef> items;
    for( size_t k=0; k < mTracks.size(); k++ )
    {
        items = mTracks[k]->getItems();
        for( size_t j=0; j<items.size(); j++ )
            items[j]->updateLabel();
    }
    
    // update cue list labels
    vector<QTimelineCueRef> cueList = mCueManager->getCueList();
    for( size_t k=0; k < cueList.size(); k++ )
        cueList[k]->updateLabel();
    
    return false;
}
Ejemplo n.º 5
0
void WorldUIView::mouseWheel(MouseEvent &event){				
	float _zoom = zoom+event.getWheelIncrement()*.1;
	_zoom = _zoom<=minZoom?minZoom:_zoom;
	_zoom = _zoom>=maxZoom?maxZoom:_zoom;

	xOffset = ((float)xOffset)*(((float)sbDefaultSize*_zoom)/sbSize);
	yOffset = ((float)yOffset)*(((float)sbDefaultSize*_zoom)/sbSize);

	if(event.getWheelIncrement() > 0){
		xOffset += .1*((float) (lastMoveX - (rect.x +rect.width/2)))*(_zoom*sbDefaultSize)/sbSize;
		yOffset += .1*((float) (lastMoveY - (rect.y +rect.height/2)))*(_zoom*sbDefaultSize)/sbSize;
	}
	

	setZoom(_zoom);
}
Ejemplo n.º 6
0
void fsExperiments::mouseWheel ( MouseEvent event )
{
	float w = event.getWheelIncrement();

	if ( w < 0 )
		mEyeDistance *= ( 1.1 + .5 * w );
	else
		mEyeDistance /= ( 1.1 - .5 * w );
}
Ejemplo n.º 7
0
void TerrainApp::mouseWheel( MouseEvent event )
{
	float dWheel	= event.getWheelIncrement();
	
	if( event.isShiftDown() ){
		mZoomMultiDest += dWheel * 0.001f;
		mZoomMultiDest = constrain( mZoomMultiDest, 0.1f, 1.0f );
	} else {
		mRoom.adjustTimeMulti( dWheel );
	}
}
void PaintingBeingsApp::mouseWheel(MouseEvent event)
{
	if (_launchAlgoGen)
	{
		Vec3f eye = _camera.getEyePoint();
		eye.z -= event.getWheelIncrement() * 1.5f;

		float eyeMaxZ = static_cast<float>(_image.getMiniatureSize()) * 10.0f;

		if (eye.z > 1.0f && eye.z < eyeMaxZ)
			_camera.setEyePoint(eye);
	}
}
Ejemplo n.º 9
0
void RepulsionApp::mouseWheel( MouseEvent event )
{
	float dWheel	= event.getWheelIncrement();
	mRoom.adjustTimeMulti( dWheel );
}
void BubbleChamberApp::mouseWheel( MouseEvent event )
{
	float dWheel	= event.getWheelIncrement();
	mRoom.adjustTimeMulti( dWheel );
}
Ejemplo n.º 11
0
void EarthquakeApp::mouseWheel( MouseEvent event )
{
	mPov.adjustDist( event.getWheelIncrement() * -2.0f );
}
Ejemplo n.º 12
0
void CatalogApp::mouseWheel( MouseEvent event )
{
	float dWheel	= event.getWheelIncrement();
	mScaleDest		= constrain( mScaleDest - dWheel, 0.2f, mMaxScale );
}
Ejemplo n.º 13
0
	void mouseWheel( MouseEvent event )
	{
		mScale += event.getWheelIncrement()*0.1f;
		constrain(mScale, 0.5f, 5.0f);
	}
Ejemplo n.º 14
0
void GpGpuApp::mouseWheel( MouseEvent event )
{
	mEyePoint.z += -event.getWheelIncrement() * 5.0f;
}
void ThisFloatingTrackerApp::mouseWheel(MouseEvent event)
{
    g.mouseWheel = event.getWheelIncrement();
}
Ejemplo n.º 16
0
void BulletTestApp::mouseWheel( MouseEvent event )
{
	mCamera.setEyePoint( mCamera.getEyePoint() + Vec3f( 0.0f, 0.0f, event.getWheelIncrement() * 20.0f ) );
}
Ejemplo n.º 17
0
void RodSoundApp::mouseWheel(MouseEvent event) {
  real scroll = event.getWheelIncrement();
  eyePos += (targetPos - eyePos).normalized() * scroll;
  cam.lookAt(eyePos, targetPos);
}
Ejemplo n.º 18
0
void planetsApp::mouseWheel(MouseEvent event) {
	mCam.mouseWheel(event.getWheelIncrement());
}
Ejemplo n.º 19
0
void EditorState::mouseWheel(MouseEvent event)
{
    Vec3f cameraTo = GG.hexRender.getCameraTo();
    cameraTo.z = cameraTo.z - event.getWheelIncrement() * 5.0f;
    GG.hexRender.setCameraTo(cameraTo);
}