精通Micro3D v3基础技术[4]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

1 简单的显示这是3D模型

下面几行是基本的3D模型和纹理的导入和设置:

figure = new Figure("/example/DemoMIDP/test_model_robo.mbac");
mainTexture = new Texture("/example/DemoMIDP/tex_001.bmp", true);
figure.setTexture(mainTexture);

下面是在Canvas里绘制3D世界

private Graphics3D g3 = new Graphics3D();

protected void paint(Graphics g) {
 ...
  g3.bind(g);
   g3.renderFigure(figure, 0, 0, layout, effect);
    //Flush to screen
    g3.flush();
            //Release the Graphics 3D object
            g3.release(g);

}

2 移动模型

本文关键:精通Micro3D v3基础技术
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top