asafbibas / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

Easy way to create meshes and materials #204

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It is sometimes neccessary to create meshes and materials at run-time, there 
should be utility classes that facilitate this kind of use.
E.g:

MeshBuilder mb = new MeshBuilder();
mb.addPosition( ... )
mb.addNormal( ... )
mb.pushTriangle();
// ...
Mesh mesh = mb.finish();

For materials:

MaterialBuilder mb = new MaterialBuilder();
mb.setDiffuseMap("Textures/color.png");
mb.setNormalMap("Textures/normals.png");
mb.setDiffuseColor(ColorRGBA.DarkGray);
Material mat = mb.finish();

Original issue reported on code.google.com by ShadowIs...@gmail.com on 28 Sep 2010 at 2:37

GoogleCodeExporter commented 8 years ago

Original comment by ShadowIs...@gmail.com on 6 Sep 2012 at 5:33