asafbibas / jmonkeyengine

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

Emitter editor generates a wrong text for box shapes #481

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When editing a particle emitter from the scene composer, if I put a box emitter 
shape like [Box, -10.0f, -10.0f, -10.0f, 10.0f, -5.0f, 10.0f] the text is 
parsed, but then the property editor generates an invalid string for the parsed 
value (E.g For the given input, the result is [Box, -10.0, -10.0, -10.0, 
-10.020.0, -10.05.0, -10.020.0])

I think the problem is in EmitterShapePropertyEditor.java. The snippet in 
getAsText() for EmitterBoxShape should be:

if (emitter instanceof EmitterBoxShape) {
            EmitterBoxShape shape = (EmitterBoxShape) emitter;
            return "[Box, "
                    + shape.getMin().x
                    + ", "
                    + shape.getMin().y
                    + ", "
                    + shape.getMin().z
                    + ", "
                    + (shape.getMin().x + shape.getLen().x)
                    + ", "
                    + (shape.getMin().x + shape.getLen().y)
                    + ", "
                    + (shape.getMin().x + shape.getLen().z)
                    + "]";
        }

Original issue reported on code.google.com by gotu...@gmail.com on 24 Mar 2012 at 11:51

GoogleCodeExporter commented 8 years ago
This particular issue has to do with how jMP displays the box emitter shape 
properties in the editor.

Original comment by ShadowIs...@gmail.com on 1 Jun 2012 at 4:01