void winBodiesApp::mouseDown( MouseEvent event ) { if( event.isLeftDown() && !event.isAltDown() ) { int sizex = (rand()%49)+30; int sizey = (rand()%49)+30; int sizez = (rand()%49)+30; int height = (rand()%200)+300; int xoff = (rand()%10)-5; int zoff = (rand()%10)-5; Vec3f dimensions = Vec3f(sizex,sizey,sizez); btRigidBody *body = bullet::createBox(m_dynamicsWorld, dimensions, Quatf(), Vec3f((float)xoff, height, (float)zoff)); std::shared_ptr<RigidObject> c( new RigidCube(body, dimensions, m_dynamicsWorld) ); mObjects.push_back(c); } if (event.isLeftDown() && event.isAltDown()) { int radius = (rand()%29)+15; int height = (rand()%200)+300; int xoff = (rand()%10)-5; int zoff = (rand()%10)-5; float fradius = (float) radius; btRigidBody *body = bullet::createSphere(m_dynamicsWorld, fradius, Quatf(), Vec3f(float(xoff), height,float(zoff))); std::shared_ptr<RigidObject> s( new RigidSphere(body, fradius, m_dynamicsWorld) ); mObjects.push_back(s); } }
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; }
void ObjLoaderApp::mouseDrag( MouseEvent event ) { if( event.isAltDown() ) mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() ); else mArcball.mouseDrag( event.getPos() ); }
void ObjLoaderApp::mouseDown( MouseEvent event ) { if( event.isAltDown() ) mMayaCam.mouseDown( event.getPos() ); else mArcball.mouseDown( event.getPos() ); }
void wellingtonModelApp::mouseDown( MouseEvent event ) { // /* if( event.isAltDown() ) mMayaCam.mouseDown( event.getPos() ); else mArcball.mouseDown( event.getPos() ); // */ }
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() ); // */ }
void EnhanceApp::mouseDown( MouseEvent event ) { mClickDown = event.getPos(); if( event.isAltDown() ){ mAltLockDown = true; } if( event.isControlDown() ){ mCtlDown = true; } }
void triMeshApp::mouseDown( MouseEvent event ) { if( event.isLeftDown() && !event.isAltDown() ) { int sizex = (rand()%49)+30; int sizey = (rand()%49)+30; int sizez = (rand()%49)+30; int height = (rand()%200)+300; int xoff = (rand()%1000)-500; int zoff = (rand()%1000)-500; Vec3f dimensions = Vec3f(sizex,sizey,sizez); btRigidBody *body = bullet::createBox(m_dynamicsWorld, dimensions, Quatf(), Vec3f((float)xoff, height, (float)zoff)); shared_ptr<RigidObject> c( new RigidCube(body, dimensions, m_dynamicsWorld) ); mObjects.push_back(c); } }
void DeferredRenderingApp::mouseDrag( MouseEvent event ) { if( event.isAltDown() ) { mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() ); } }
void DeferredRenderingApp::mouseDown( MouseEvent event ) { if( event.isAltDown() ) { mMayaCam.mouseDown( event.getPos() ); } }
void HiKinectApp::mouseDrag( MouseEvent event ) { mouseMove( event ); mCamUI.mouseDrag(event.getPos(), event.isLeftDown(), event.isControlDown(), event.isAltDown()); }
void AudioObjApp::mouseDrag( MouseEvent event ) { if( event.isAltDown() ) mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() ); }
void AudioObjApp::mouseDown( MouseEvent event ) { if( event.isAltDown() ) mMayaCam.mouseDown( event.getPos() ); }
void ssaoApp::mouseDown( MouseEvent event ) { if( event.isAltDown() ) { mMayaCam.mouseDown( event.getPos() ); } }
void GizmoSampleApp::mouseDrag( MouseEvent event ){ if( event.isAltDown() ) mCamUI.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() ); }
void GizmoSampleApp::mouseDown( MouseEvent event ){ if( event.isAltDown() ) mCamUI.mouseDown( event.getPos() ); }