예제 #1
0
void ArcballTestApp::mouseDown( MouseEvent event )
{
	if( mUsingCameraUi )
		mCamUi.mouseDown( event.getPos() );
	else
		mArcball.mouseDown( event.getPos(), getWindowSize() );
}
예제 #2
0
void ObjLoaderApp::mouseDown( MouseEvent event )
{
    if( event.isMetaDown() )
        mCamUi.mouseDown( event );
    else
        mArcball.mouseDown( event );
}
예제 #3
0
void ObjLoaderApp::mouseDown( MouseEvent event )
{
	if( event.isAltDown() )
		mMayaCam.mouseDown( event.getPos() );
	else
		mArcball.mouseDown( event.getPos() );
}
예제 #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() );
}
예제 #7
0
void fsExperiments::mouseDown( MouseEvent event )
{
	mArcball.mouseDown( event.getPos() );
}
예제 #8
0
void BasicApp::mouseDown( MouseEvent event )
{
	mArcball.mouseDown( event.getPos() );
}
예제 #9
0
void ArcballDemoApp::mouseDown( MouseEvent event )
{
	mArcball.mouseDown( event.getPos() );
	mCurrentMouseDown = mInitialMouseDown = event.getPos();
}
예제 #10
0
파일: gpuPSApp.cpp 프로젝트: flcc/gpuPS
void gpuPSApp::mouseDown( MouseEvent event )
{
    mArcball.mouseDown( event.getPos() );
}
void CinderProjectionTestApp::mouseDown( MouseEvent event )
{
	mArcball.mouseDown( event.getPos() );
}