示例#1
0
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);
	}

}
示例#2
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;
}
示例#3
0
void ObjLoaderApp::mouseDrag( MouseEvent event )
{
	if( event.isAltDown() )
		mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
	else
		mArcball.mouseDrag( event.getPos() );
}
示例#4
0
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() );
//     */
}
示例#7
0
void EnhanceApp::mouseDown( MouseEvent event )
{

    mClickDown = event.getPos();
    if( event.isAltDown() ){
        mAltLockDown = true;

    }
    if( event.isControlDown() ){
        mCtlDown = true;
    }

}
示例#8
0
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() );
    }
}
示例#11
0
void HiKinectApp::mouseDrag( MouseEvent event ) {
	mouseMove( event );
	mCamUI.mouseDrag(event.getPos(), event.isLeftDown(), event.isControlDown(), event.isAltDown());
}
示例#12
0
void AudioObjApp::mouseDrag( MouseEvent event )
{
    if( event.isAltDown() )
		mMayaCam.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
示例#13
0
void AudioObjApp::mouseDown( MouseEvent event )
{
    if( event.isAltDown() )
		mMayaCam.mouseDown( event.getPos() );
}
示例#14
0
void ssaoApp::mouseDown( MouseEvent event )
{
    if( event.isAltDown() ) {
        mMayaCam.mouseDown( event.getPos() );
    }
}
示例#15
0
void GizmoSampleApp::mouseDrag( MouseEvent event ){
	if( event.isAltDown() )
		mCamUI.mouseDrag( event.getPos(), event.isLeftDown(), event.isMiddleDown(), event.isRightDown() );
}
示例#16
0
void GizmoSampleApp::mouseDown( MouseEvent event ){
	if( event.isAltDown() )
		mCamUI.mouseDown( event.getPos() );
}