x3dom / apps-modeling

Publicly Available Applications
Other
3 stars 3 forks source link

Switch Z and Y parameters for Box primitive #89

Closed tpaviot closed 10 years ago

tpaviot commented 10 years ago

For a box, changing the Z parameter should change the dimension along the up axis.

mlimper commented 10 years ago

This affects the component implementatio, which was performed by @yjung and @menglert11487 - can one of you look into this? Thanks in advance!

yjung commented 10 years ago

This was consistent before your coordinate system UI remapping, therefore this should be done by @mlimper and @menglert11487 together, as it requires special handling.

mlimper commented 10 years ago

We definitely shouldn't clutter the code with another

"if (primtype == "box") { ... }"

or so, if you mean that with "special handling"... why don't we just adapt the box primitive? For a box, that doesn't sound so complicated.

yjung commented 10 years ago

Then simply check the code, then you'll see what I mean.

mlimper commented 10 years ago

This is inconsistent with the "Snout" and "Pyramid" primitives: For both of them, specifying "X" and "Y" parameters works in the "re-interpreted" coordinate system.

This is due to the different implementation of the Box primitive (was existing before, using Y up) and the Snout and Pyramid primitives (new, using Z up), correct?

yjung commented 10 years ago

No, that's not the reason, the Box internally just has an vec3 field "size", so we already do a remapping, but the function is the same for vec2 and vec3. Thus, we must take care not to break vec2, or generally cases, where vec3 is not a 3d coordinate. If "size" was the only field with such vec3 property, then everything is fine and remapping works like all the other UI remapping stuff. Check out the first entry of the PrimitiveParameterMap and the function vecProperty in UI.js.

yjung commented 10 years ago

@menglert11487 Could you please have a look if this can be fixed without breaking subdivision and similar fields? Please ask @mlimper how he changed the UI coordinate system.