Esempio n. 1
0
void ArcballTestApp::mouseDown( MouseEvent event )
{
	if( mUsingCameraUi )
		mCamUi.mouseDown( event.getPos() );
	else
		mArcball.mouseDown( event.getPos(), getWindowSize() );
}
Esempio n. 2
0
void ObjLoaderApp::mouseDown( MouseEvent event )
{
    if( event.isMetaDown() )
        mCamUi.mouseDown( event );
    else
        mArcball.mouseDown( event );
}
Esempio n. 3
0
void ObjLoaderApp::mouseDown( MouseEvent event )
{
	if( event.isAltDown() )
		mMayaCam.mouseDown( event.getPos() );
	else
		mArcball.mouseDown( event.getPos() );
}
Esempio n. 4
0
void MemExploreApp::update()
{
  Vec2f center = getWindowCenter();

  mCameraArcball.resetQuat();
  mCameraArcball.mouseDown(center);
  mCameraArcball.mouseDrag(getWindowSize() - mMousePos);
  mCamera.setOrientation(mCameraArcball.getQuat() * mCamera.getOrientation());

  // Reset mouse position to center of screen
  if(mIsFullscreen) {
    Vec2f center = getWindowCenter();
    CGSetLocalEventsSuppressionInterval(0.0);
    CGWarpMouseCursorPosition(CGPointMake(center.x, center.y));
    mMousePos = center;
  }

  float speed = 0.01f;
  Vec3f camX = mCamera.getOrientation() * Vec3f::xAxis() * speed;
  Vec3f camY = mCamera.getOrientation() * Vec3f::yAxis() * speed;
  Vec3f camZ = mCamera.getOrientation() * Vec3f::zAxis() * speed;
  
  if(mKeysDown.count('w')) mCameraAcc -= camZ;
  if(mKeysDown.count('a')) mCameraAcc -= camX;
  if(mKeysDown.count('s')) mCameraAcc += camZ;
  if(mKeysDown.count('d')) mCameraAcc += camX;
  if(mKeysDown.count('q')) mCameraAcc += camY;
  if(mKeysDown.count('e')) mCameraAcc -= camY;

  mCameraVel += mCameraAcc;
  mCamera.setEyePoint(mCamera.getEyePoint() + mCameraVel);
  mCameraVel *= 0.975f;
  mCameraAcc *= 0.8f;
}
void wellingtonModelApp::mouseDown( MouseEvent event )
{
//    /*
    if( event.isAltDown() )
		mMayaCam.mouseDown( event.getPos() );
	else
		mArcball.mouseDown( event.getPos() );
//     */
}
void ImageHFApp::mouseDown( MouseEvent event )
{
    mArcball.mouseDown( event.getPos() );
}
Esempio n. 7
0
void fsExperiments::mouseDown( MouseEvent event )
{
	mArcball.mouseDown( event.getPos() );
}
Esempio n. 8
0
void BasicApp::mouseDown( MouseEvent event )
{
	mArcball.mouseDown( event.getPos() );
}
Esempio n. 9
0
void ArcballDemoApp::mouseDown( MouseEvent event )
{
	mArcball.mouseDown( event.getPos() );
	mCurrentMouseDown = mInitialMouseDown = event.getPos();
}
Esempio n. 10
0
void gpuPSApp::mouseDown( MouseEvent event )
{
    mArcball.mouseDown( event.getPos() );
}
void CinderProjectionTestApp::mouseDown( MouseEvent event )
{
	mArcball.mouseDown( event.getPos() );
}