⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 t55.java

📁 关于VRML的房屋设计
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
                return true;
        }//沙发下
        
        if (event.id == Event.ACTION_EVENT && event.target == Button16) {
                clickedBtnClick16();
                return true;
        }
        
        
        if (event.id == Event.ACTION_EVENT && event.target == Button17) {
                clickedBtnClick17();
                return true;
        }
          if (event.id == Event.ACTION_EVENT && event.target == Button18) {
                clickedBtnClick18();
                return true;
        }
        
        
        if (event.id == Event.ACTION_EVENT && event.target == Button19) {
                clickedBtnClick19();
                return true;
        }
          if (event.id == Event.ACTION_EVENT && event.target == Button20) {
                clickedBtnClick20();
                return true;
        }
        
        
        if (event.id == Event.ACTION_EVENT && event.target == Choice4) {
                chooseBtnClick4();
                return true;
        }//沙发下
        
        if (event.id == Event.ACTION_EVENT && event.target == Button21) {
                clickedBtnClick21();
                return true;
        }
        
        
        if (event.id == Event.ACTION_EVENT && event.target == Button22) {
                clickedBtnClick22();
                return true;
        }
          if (event.id == Event.ACTION_EVENT && event.target == Button23) {
                clickedBtnClick23();
                return true;
        }
        
        
        if (event.id == Event.ACTION_EVENT && event.target == Button24) {
                clickedBtnClick24();
                return true;
        }
          if (event.id == Event.ACTION_EVENT && event.target == Button25) {
                clickedBtnClick25();
                return true;
        }
        
        
        if (event.id == Event.ACTION_EVENT && event.target == Choice5) {
                chooseBtnClick5();
                return true;
        }//电视机
        
         if (event.id == Event.ACTION_EVENT && event.target == Button26) {
                clickedBtnClick26();
                return true;
        }
        
        
        if (event.id == Event.ACTION_EVENT && event.target == Button27) {
                clickedBtnClick27();
                return true;
        }
          if (event.id == Event.ACTION_EVENT && event.target == Button28) {
                clickedBtnClick28();
                return true;
        }
        
        
        if (event.id == Event.ACTION_EVENT && event.target == Button29) {
                clickedBtnClick29();
                return true;
        }
          if (event.id == Event.ACTION_EVENT && event.target == Button30) {
                clickedBtnClick30();
                return true;
        }
        
        
        if (event.id == Event.ACTION_EVENT && event.target == Choice6) {
                chooseBtnClick6();
                return true;
        }//书架
        
        if (event.id == Event.ACTION_EVENT && event.target == Choice10) {
                chooseBtnClick10();
                return true;
        }
        return true;
    }
    
    public void chooseBtnClick10() {
	    int n=Choice10.getSelectedIndex();
         buchang=n+1;
            try{
            	Thread.sleep(200);
            }
            catch(InterruptedException ex){}
           
   }
    
    public void colorChange(){
    	float value1[]={0,1,0};
    	EventInSFColor tar=
            (EventInSFColor)ccolor.getEventIn("set_diffuseColor");
           value1[0]=(float)c1.getValue()/255;value1[1]=(float)c2.getValue()/255;value1[2]=(float)c3.getValue()/255;
            tar.setValue(value1);
            try{
            	Thread.sleep(200);
            }
            catch(InterruptedException ex){}
        }
        
    public void clickedBtnClick31() {
	    
        EventInSFInt32 newwhichChoice=
            (EventInSFInt32)others.getEventIn("set_whichChoice");
           
            newwhichChoice.setValue(1);
            try{
            	Thread.sleep(200);
            }
            catch(InterruptedException ex){}
           }
           
    public void clickedBtnClick32() {
	    
        EventInSFInt32 newwhichChoice=
            (EventInSFInt32)others.getEventIn("set_whichChoice");
           
            newwhichChoice.setValue(0);
            try{
            	Thread.sleep(200);
            }
            catch(InterruptedException ex){}
           }
  
    public void clickedBtnClick33() {
	EventInSFColor trans=(EventInSFColor)ccolor.getEventIn("set_diffuseColor");
    float value1[]={0.4863f,0.4667f,0.4275f};
    trans.setValue(value1);
    }
   
    public void clickedBtnClick1() {
	EventInSFVec3f trans=(EventInSFVec3f)translation1.getEventIn("set_translation");
   
    vcha[0]=51.71f;
   	vcha[1]=8.779f;  
   	vcha[2]=24f;
   
   	trans.setValue(vcha);
   	 EventInSFRotation ro=(EventInSFRotation)rotation1.getEventIn("set_rotation");
	rcha[3]=0;
    ro.setValue(rcha);
    try{
   		Thread.sleep(100);
   	}
   	catch(InterruptedException ex){}
   }
   

   public void clickedBtnClick2() {
	EventInSFVec3f trans=(EventInSFVec3f)translation1.getEventIn("set_translation");
	float[] value1=new float[3];
	if(vcha[0]>=-86.29)
	{
	value1[0]=vcha[0]-buchang; vcha[0]=value1[0];
   	value1[1]=vcha[1]; vcha[1]=value1[1];
   	value1[2]=vcha[2]; vcha[2]=value1[2];
   }
  else value1[0]=vcha[0];value1[1]=vcha[1];value1[2]=vcha[2];
   	trans.setValue(value1);
   
   	try{
   		Thread.sleep(100);
   	}
   	catch(InterruptedException ex){}
   	
   }
    public void clickedBtnClick3() {
	EventInSFVec3f trans=(EventInSFVec3f)translation1.getEventIn("set_translation");
	float[] value1=new float[3];
	if(vcha[0]<=77.71)
	{
	value1[0]=vcha[0]+buchang; vcha[0]=value1[0];
   	value1[1]=vcha[1]; vcha[1]=value1[1];
   	value1[2]=vcha[2]; vcha[2]=value1[2];
    
   }
   else value1[0]=vcha[0];value1[1]=vcha[1];value1[2]=vcha[2];
   	trans.setValue(value1);
   	try{
   		Thread.sleep(100);
   	}
   	catch(InterruptedException ex){}
   }
   public void clickedBtnClick4() {
	EventInSFVec3f trans=(EventInSFVec3f)translation1.getEventIn("set_translation");
	float[] value1=new float[3];
	if(vcha[2]>=-46)
	{
	value1[0]=vcha[0]; vcha[0]=value1[0];
   	value1[1]=vcha[1]; vcha[1]=value1[1];
   	value1[2]=vcha[2]-buchang; vcha[2]=value1[2];
  }
   
  else value1[0]=vcha[0];value1[1]=vcha[1];value1[2]=vcha[2];
   	trans.setValue(value1);
   	try{
   		Thread.sleep(100);
   	}
   	catch(InterruptedException ex){}
   	
   }
    public void clickedBtnClick5() {
	EventInSFVec3f trans=(EventInSFVec3f)translation1.getEventIn("set_translation");
	float[] value1=new float[3];
	if(vcha[2]<=140)
	{
	value1[0]=vcha[0]; vcha[0]=value1[0];
   	value1[1]=vcha[1]; vcha[1]=value1[1];
   	value1[2]=vcha[2]+buchang; vcha[2]=value1[2];
  }
   
   else value1[0]=vcha[0];value1[1]=vcha[1];value1[2]=vcha[2];
   	trans.setValue(value1);
   	try{
   		Thread.sleep(100);
   	}
   	catch(InterruptedException ex){}
   }
   
    public void chooseBtnClick1() {
	    int n=Choice1.getSelectedIndex();
        EventInSFInt32 newwhichChoice=
            (EventInSFInt32)switch1.getEventIn("set_whichChoice");
           
            newwhichChoice.setValue(n);
            try{
            	Thread.sleep(200);
            }
            catch(InterruptedException ex){}
           
   }//茶几
   
   public void clickedBtnClick6() {
	EventInSFVec3f trans=(EventInSFVec3f)translation2.getEventIn("set_translation");
  
    vsha1[0]=51.71f;
   	vsha1[1]=8.779f;
   	vsha1[2]=-4f;
   
   	trans.setValue(vsha1); 
   	 EventInSFRotation ro=(EventInSFRotation)rotation2.getEventIn("set_rotation");
	rsha1[3]=0;
    ro.setValue(rsha1);
   	try{
   		Thread.sleep(100);
   	}
   	catch(InterruptedException ex){}
   }
   

   public void clickedBtnClick7() {
	EventInSFVec3f trans=(EventInSFVec3f)translation2.getEventIn("set_translation");
	float[] value1=new float[3];
	if(vsha1[0]>=-59.29)
	{
	value1[0]=vsha1[0]-buchang; vsha1[0]=value1[0];
   	value1[1]=vsha1[1]; vsha1[1]=value1[1];
   	value1[2]=vsha1[2]; vsha1[2]=value1[2];
   }
    else value1[0]=vsha1[0];value1[1]=vsha1[1];value1[2]=vsha1[2];
   
   
   	trans.setValue(value1);
   	try{
   		Thread.sleep(100);
   	}
   	catch(InterruptedException ex){}
   	
   }
    public void clickedBtnClick8() {
	EventInSFVec3f trans=(EventInSFVec3f)translation2.getEventIn("set_translation");
	float[] value1=new float[3];
	if(vsha1[0]<=57.71)
	{
    value1[0]=vsha1[0]+buchang; vsha1[0]=value1[0];
   	value1[1]=vsha1[1]; vsha1[1]=value1[1];
   	value1[2]=vsha1[2]; vsha1[2]=value1[2];
  }
    else value1[0]=vsha1[0];value1[1]=vsha1[1];value1[2]=vsha1[2];
   	trans.setValue(value1);
   	try{
   		Thread.sleep(100);
   	}
   	catch(InterruptedException ex){}
   }
   public void clickedBtnClick9() {
	EventInSFVec3f trans=(EventInSFVec3f)translation2.getEventIn("set_translation");
	float[] value1=new float[3];
	if(vsha1[2]>=-44)
	{
   value1[0]=vsha1[0]; vsha1[0]=value1[0];
   	value1[1]=vsha1[1]; vsha1[1]=value1[1];
   	value1[2]=vsha1[2]-buchang; vsha1[2]=value1[2];
  }
   else value1[0]=vsha1[0];value1[1]=vsha1[1];value1[2]=vsha1[2];
   
   
   	trans.setValue(value1);
   	try{
   		Thread.sleep(100);
   	}
   	catch(InterruptedException ex){}
   	
   }
    public void clickedBtnClick10() {
	EventInSFVec3f trans=(EventInSFVec3f)translation2.getEventIn("set_translation");
	float[] value1=new float[3];
	if(vsha1[2]<=136)
	{
  value1[0]=vsha1[0]; vsha1[0]=value1[0];
   	value1[1]=vsha1[1]; vsha1[1]=value1[1];
   	value1[2]=vsha1[2]+buchang; vsha1[2]=value1[2];;
  }
   else value1[0]=vsha1[0];value1[1]=vsha1[1];value1[2]=vsha1[2];
   
   	trans.setValue(value1);
   	try{
   		Thread.sleep(100);
   	}
   	catch(InterruptedException ex){}
   }
   
    public void chooseBtnClick2() {
	    int n=Choice2.getSelectedIndex();
        EventInSFInt32 newwhichChoice=
            (EventInSFInt32)switch2.getEventIn("set_whichChoice");
           
            newwhichChoice.setValue(n);
            try{
            	Thread.sleep(200);
            }
            catch(InterruptedException ex){}
           
   }//沙发上
   
   public void clickedBtnClick11() {
	EventInSFVec3f trans=(EventInSFVec3f)translation3.getEventIn("set_translation");
    
     vsha2[0]=51.71f;
   	vsha2[1]=8.779f;
   	vsha2[2]=52;;
   
   	trans.setValue(vsha2);
   	EventInSFRotation ro=(EventInSFRotation)rotation3.getEventIn("set_rotation");
	rsha2[3]=-3.142f;
    ro.setValue(rsha2);
   	try{
   		Thread.sleep(100);
   	}
   	catch(InterruptedException ex){}
   }
   

   public void clickedBtnClick12() {
	EventInSFVec3f trans=(EventInSFVec3f)translation3.getEventIn("set_translation");
	float[] value1=new float[3];
	if(vsha2[0]>=-59.29)
	{
	value1[0]=vsha2[0]-buchang; vsha2[0]=value1[0];
   	value1[1]=vsha2[1]; vsha2[1]=value1[1];
   	value1[2]=vsha2[2]; vsha2[2]=value1[2];
   }
    else value1[0]=vsha2[0];value1[1]=vsha2[1];value1[2]=vsha2[2];
   
   
   	trans.setValue(value1);
   	try{
   		Thread.sleep(100);
   	}
   	catch(InterruptedException ex){}
   	
   }
    public void clickedBtnClick13() {
	EventInSFVec3f trans=(EventInSFVec3f)translation3.getEventIn("set_translation");
	float[] value1=new float[3];
	if(vsha2[0]<=57.71)
	{
    value1[0]=vsha2[0]+buchang; vsha2[0]=value1[0];
   	value1[1]=vsha2[1]; vsha2[1]=value1[1];
   	value1[2]=vsha2[2]; vsha2[2]=value1[2];
  }
      else value1[0]=vsha2[0];value1[1]=vsha2[1];value1[2]=vsha2[2];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -