Ejemplo n.º 1
0
void MarionetteZooApp::mouseDrag( MouseEvent event )
{
	if ( mCameraLock )
		mBulletWorld->mouseDrag( event, mMayaCam.getCamera() );
	else
		mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
Ejemplo n.º 2
0
void ObjLoaderApp::mouseDrag( MouseEvent event )
{
	if( event.isAltDown() )
		mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
	else
		mArcball.mouseDrag( event.getPos() );
}
Ejemplo n.º 3
0
void ProceduralAnimApp::mouseDrag( MouseEvent event )
{
	// Added support for international mac laptop keyboards.
	bool middle = event.isMiddleDown() || ( event.isMetaDown() && event.isLeftDown() );
	bool right = event.isRightDown() || ( event.isControlDown() && event.isLeftDown() );
	mMayaCam.mouseDrag( event.getPos(), event.isLeftDown() && !middle && !right, middle, right );
}
void ThisFloatingTrackerApp::mouseDrag(MouseEvent event)
{
    updateMouseGlobals(event);
    if (g.enable3dView)
    {
        g.cam3d.mouseDrag(event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown());
    }
}
Ejemplo n.º 5
0
void _TBOX_PREFIX_App::mouseDrag( MouseEvent event )
{
	mMousePos = event.getPos();
	
	// Added/hacked support for international mac laptop keyboards.
	bool middle = event.isMiddleDown() || ( event.isMetaDown() && event.isLeftDown() );
	bool right = event.isRightDown() || ( event.isControlDown() && event.isLeftDown() );
	mMayaCam.mouseDrag( event.getPos(), event.isLeftDown() && !middle && !right, middle, right );}
Ejemplo n.º 6
0
void FadeCandyClientApp::mouseDrag( MouseEvent event )
{
	// keep track of the mouse
	mMousePos = event.getPos();

	// let the camera handle the interaction
	mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
Ejemplo n.º 7
0
void NanoApp::mouseDrag (MouseEvent event)
{
   mousePos = event.getPos();
   // don't update cameraUI if we're using the gui
   if (!usingGui)
      cameraUI.mouseDrag (event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown());
   gui->mouseDrag (event);
}
Ejemplo n.º 8
0
void StereoscopicRenderingApp::mouseDrag( MouseEvent event )
{
	// handle camera
	mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
	
	// update stereoscopic camera
	mCamera.setEyePoint( mMayaCam.getCamera().getEyePoint() );
	mCamera.setCenterOfInterestPoint( mMayaCam.getCamera().getCenterOfInterestPoint() );
}
void GeometryPlotterApp::mouseDrag (MouseEvent event)
{
    m_mousePos = event.getPos ();

    if (!m_gui.isMouseOver ())
    {
        m_mayaCam.mouseDrag (event.getPos (), event.isLeftDown (), event.isMiddleDown (), event.isRightDown ());
    }
}
Ejemplo n.º 10
0
void StarsApp::mouseDrag( MouseEvent event )
{
	mCursorPos += event.getPos() - mCursorPrevious;
	mCursorPrevious = event.getPos();

	constrainCursor( event.getPos() );

	// allow user to control camera
	mCamera.mouseDrag( mCursorPos, event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
void wellingtonModelApp::mouseDrag(MouseEvent event)
{
//    /*
    mouseMove(event);
    
    if( event.isAltDown() )
		mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
	else
		mArcball.mouseDrag( event.getPos() );
//     */
}
Ejemplo n.º 12
0
	void mouseDrag( MouseEvent event ) 
	{
		if (mEditMode == EditMode_RECORD) return;

		// 制御点の選択を行う
		if (event.isLeftDown()) {
			if (mSelectionMode == 0) return;

			float x1 = mSelectRegion.getX1();
			float y1 = mSelectRegion.getY1();
			mSelectRegion.set(x1, y1, event.getX()+5, event.getY()+5);

			for (int k = 0; k < mCtrlPointsNum; ++k) {
				if (mSelectRegion.contains(mCtrlPoints[k].pos)) {
					mCtrlPoints[k].isSelected = true;
				} else {
					mCtrlPoints[k].isSelected = false;
				}
			}
		}

		Vec2f d = event.getPos() - mMPPrev;	

		if (event.isRightDown()) {
			for (int k = 0; k < mCtrlPointsNum; ++k) {
				if (mCtrlPoints[k].isSelected) {
					mCtrlPoints[k].mag += d;
				}
			}
		}

		if (event.isMiddleDown()) {
			int ci = -1;
			int cj = -1;
			float nearest = 1.e+10;
			for (int j = 0; j < 2; ++j) {	
				for (int i = 0; i < 2; ++i) {
					Vec2f cp(distpoints[j][i][0], distpoints[j][i][1]);
					float dist = event.getPos().distance(cp);
					if (dist < nearest) {
						ci = i;
						cj = j;
						nearest = dist;
					}
				}
			}

			if (ci > -1 &&  cj > -1) {
				distpoints[cj][ci][0] += d.x;
				distpoints[cj][ci][1] += d.y;
			}
		}
		mMPPrev = event.getPos();
	}
Ejemplo n.º 13
0
//----------------------------------------------------------------------------------------------------------------------
void View::mouseDrag(MouseEvent event)
{
  // gui
  //if(!gui.isOn())
  {
    // keep track of the mouse
    m_mouse = event.getPos();

    // let the camera handle the interaction
    m_cam3d.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() ); 
  }
  
  m_scene2d.onMouseDrag(event);  
}
void ThisFloatingTrackerApp::updateMouseGlobals(MouseEvent event)
{
    g.mouseLeft = event.isLeftDown();
    g.mouseMiddle = event.isMiddleDown();
    g.mouseRight = event.isRightDown();
    g.mouseDeltaWindowCoordinates = event.getPos() - g.mouseWindowCoordinates;
    g.mouseWindowCoordinates = event.getPos();
    float mx = event.getX() / float(getWindowWidth());
    float my = event.getY() / float(getWindowHeight());
    g.dmx = (g.mx - mx) / g.dt;
    g.dmy = (g.my - my) / g.dt;
    g.mx = mx;
    g.my = my;

}
Ejemplo n.º 15
0
void VoronoiGpuApp::mouseDrag( MouseEvent event )
{
	if ( event.isMiddleDown() )
	{
		vector< Vec2i >::iterator it;

		it = find_if( mPoints.begin(), mPoints.end(),
				closePoint( event.getPos() ) );
		if ( it != mPoints.end() )
		{
			it->set( event.getPos() );
			mPointMovedIt = it;
		}
		else if ( mPointMovedIt != mPoints.end() )
		{
			mPointMovedIt->set( event.getPos() );
		}
	}

	calculateVoronoiTexture();
}
Ejemplo n.º 16
0
void Calibrate::mouseDrag( MouseEvent event )
{
	Vec2i mousePosAct = event.getPos();

	if( event.isLeftDown())
	{
		mTranslateX  = math<float>::min( math<float>::max( mTranslateX + ( mousePosAct.x - mMousePos.x ) * STEP_TRANSLATE, MIN_TRANSLATE ), MAX_TRANSLATE );
		mTranslateY  = math<float>::min( math<float>::max( mTranslateY + ( mousePosAct.y - mMousePos.y ) * STEP_TRANSLATE, MIN_TRANSLATE ), MAX_TRANSLATE );
	}
	else if( event.isRightDown())
	{
		mScaleX      = math<float>::min( math<float>::max( mScaleX     + ( mousePosAct.x - mMousePos.x ) * STEP_SCALE    , MIN_SCALE     ), MAX_SCALE     );
		mScaleY      = math<float>::min( math<float>::max( mScaleY     + ( mousePosAct.y - mMousePos.y ) * STEP_SCALE    , MIN_SCALE     ), MAX_SCALE     );
	}
	else if( event.isMiddleDown())
	{
		mCoverLeft   = math< float >::clamp( mCoverLeft  + ( mousePosAct.x - mMousePos.x ) * STEP_COVER    , MIN_COVER, MAX_COVER     );
		mCoverRight  = mCoverLeft;
		mCoverTop    = math< float >::clamp( mCoverTop   + ( mousePosAct.y - mMousePos.y ) * STEP_COVER    , MIN_COVER, MAX_COVER     );
		mCoverBottom = mCoverTop;
	}

	mMousePos = mousePosAct;
}
Ejemplo n.º 17
0
void cApp::mouseDrag( MouseEvent event ){
    camUi.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
void SmoothDisplacementMappingApp::mouseDrag( MouseEvent event )
{
	// handle user input
	mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
	mCamera = mMayaCam.getCamera();
}
void WaterSimulationApp::mouseDrag(MouseEvent event){
	mMayaCam.mouseDrag(event.getPos(),event.isLeftDown(),event.isMiddleDown(),event.isRightDown());
	Matrix44f mvM=mMayaCam.getCamera().getModelViewMatrix();
	gravity = Vec3f(mvM.m10,mvM.m11,mvM.m12);//col4:camera center, row: right,up,back
	gravity*= 9.8f;
}
Ejemplo n.º 20
0
void cApp::mouseDrag( MouseEvent event ){
    for( int i=0; i<6; i++ ){
        camUis[i].mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
    }
}
Ejemplo n.º 21
0
void HexagonMirrorApp::mouseDrag( MouseEvent event )
{
    mCamera.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
Ejemplo n.º 22
0
void rayMarcherApp::mouseDrag( MouseEvent event )
{
    mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
    mCurrentLine = 0;
}
Ejemplo n.º 23
0
void FastTrailsApp::mouseDrag( MouseEvent event )
{
	mCamera.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
Ejemplo n.º 24
0
void AudioObjApp::mouseDrag( MouseEvent event )
{
    if( event.isAltDown() )
		mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
Ejemplo n.º 25
0
void ArmyDemoApp::mouseDrag( MouseEvent event )
{
	mCamUi.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
Ejemplo n.º 26
0
 // マウスのドラッグ
 void mouseDrag( MouseEvent event )
 {
   mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(),
     event.isMiddleDown(), event.isRightDown() );
 }
Ejemplo n.º 27
0
void StarsApp::mouseDrag( MouseEvent event )
{
	// allow user to control camera
	mCamera.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
void PhysicallyBasedShadingApp::mouseDrag( MouseEvent event )
{
	mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
Ejemplo n.º 29
0
void AudioVisualizerApp::mouseDrag( MouseEvent event )
{
	// handle mouse drag
	mCameraUi.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
Ejemplo n.º 30
0
void DeferredRenderingApp::mouseDrag( MouseEvent event )
{
    if( event.isAltDown() ) {
		mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
    }
}