JME3中级手册一API特征映射2
创建和操作物体
How do I…? | Use this JME 3 Feature! | Learn more here… |
---|---|---|
制作简单形状像立方体,球体 | com.jme3.scene.Geometry, com.jme3.scene.shape.* | Hello Node, Shape TestCylinder.java, TestBox.java,TestSphere.java |
创建3D模型 | Create the model in a 3-D mesh editor (for example Blender) and export it as Ogre XMLmesh. | Download Blender, Blender tutorial,Blender-to-Ogre plugin 3D Models |
加载3D模型 | Import asset as Ogre XML mesh. jMonkeyPlatform: Converting Ogre to j3o binary format speeds up model loading. AssetManager, com.jme3.scene.plugins.ogre.*, com.jme3.scene.Geometry |
Hello Asset jMonkeyPlatform j3o converter TestOgreLoading.java,TestOgreConvert.java |
移动旋转和调整物体 | Use transformations: geo.setLocalTranslation(), geo.rotate(), geo.scale() geo.updateGeometricState(); |
Hello Node Spatial |
Concatenate transformations (e.g. rotations around several axes in one step)(联合转换) | com.jme3.math.Quaternion, slerp() com.jme3.math.Transform, interpolateTransforms() |
rotate, rotate_about_a_point, quaternion,math_for_dummies |
制作物体自身移动 | Change the geo's translation in the update phase of the main loop. Or remote-control the motion using cinematics. com.jme3.scene.Geometry, setLocalTranslation(), setWalkDirection() for physical objects. |
Hello Loop Update Loop Custom Controls Cinematics TestBumpModel.java,TestOgreLoading.java |
操作物体的颜色或光泽 | Materials, AssetManager | Hello Material Materials Overview TestNormalMapping.java, TestSphere.java |
操作物体材质 | Textures, AssetManager. | Hello Material Materials Overview TestSimpleBumps.java Blender: Creating Bump Maps and Normal maps |
给物体制作阴影 | com.jme3.shadow.BasicShadowRenderer, com.jme3.light.DirectionalLight setShadowMode() |
Light and Shadow TestEverything.java, TestShadow.java |
渲染透明物体(杯子,窗户玻璃,水,树叶) | Assign a transparent texture to the Material and set material.getAdditionalRenderState().setBlendMode(BlendMode.Alpha); | Hello Material Materials Overview |
强制或关闭背面剔除 | com.jme3.material.RenderState.FaceCullMode: Back, Front, FrontAndBack, Off e.g. material.getAdditionalRenderState(). setFaceCullMode(FaceCullMode.FrontAndBack); |
N/A |
制作程序或自定义形状 | com.jme3.scene.Mesh | Custom Meshes |
保持模型纹理声音文件调用 | Put all assets in subdirectories of a project directory named assets and use the assetManager to load them. |
Hello Asset, Asset Manager |
在模型中的子对象的标识名称 | Geometry result = spatial.getName().startsWith(name); | Spatial |
posted on 2011-08-12 11:35 苏桓(osbert) 阅读(580) 评论(0) 编辑 收藏 举报