?? assemble.java
字號(hào):
import com.cult3d.*;
import com.cult3d.world.*;
import com.cult3d.Cult3DScript;
public class Assemble implements Cult3DScript
{ //這里每個(gè)里面的名字要與在3dsmax中制作的相對(duì)應(yīng)
private CultObject object=new CultObject("Car");//表示object這個(gè)物體就是Car
private CultObject object1=new CultObject("tyre1");
private CultObject object2=new CultObject("tyre2");
private CultObject object3=new CultObject("tyre3");
private CultObject object4=new CultObject("tyre4");
public Assemble() //構(gòu)造函數(shù)
{
}
public void Start(String s)
{
object.translate(0.0f,100.0f,0.0f,20000);//移動(dòng)前三個(gè)是在X、Y、Z三個(gè)方向移動(dòng)的距離,后面一個(gè)是所花費(fèi)的時(shí)間。
object1.rotate(object1.Z,10,200000);//前面一個(gè)參數(shù)是轉(zhuǎn)動(dòng)軸,第二個(gè)是轉(zhuǎn)動(dòng)的弧度,后面一個(gè)是所花費(fèi)的時(shí)間。
object2.rotate(object2.Z,10,200000);
object3.rotate(object3.Z,10,200000);
object3.rotate(object4.Z,10,200000);
}
public void Stop(String s)
{
object.stopTranslation();//停止移動(dòng)
object1.stopTranslation();//停止轉(zhuǎn)動(dòng)
object2.stopTranslation();
object3.stopTranslation();
object3.stopTranslation();
}
public void cult3dDestroy( ) //析構(gòu)函數(shù)
{
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -