Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMF: instance subelements don't respect specified float64 format/precision #13

Open
HuguesDelorme opened this issue Jan 26, 2021 · 0 comments
Assignees
Labels
Milestone

Comments

@HuguesDelorme
Copy link
Member

When exporting AMF contents the deltax, deltay, .... subelements values don't respect the float64 precision indicated in gmio_amf_write_options::float64_prec

Example :
float64_prec = 4

<?xml version="1.0" encoding="UTF-8"?>
<amf unit="millimeter" version="1.2">
<material id="0">
<color><r>1.0000</r><g>1.0000</g><b>1.0000</b><a>0.0000</a></color>
</material>
<material id="1">
<color><r>1.0000</r><g>0.0000</g><b>0.0000</b><a>0.0000</a></color>
</material>
...
<constellation id="0">
<instance objectid="0"><deltax>175.0000000000000</deltax><deltay>67.50000000000000</deltay><deltaz>70.00000000000000</deltaz><rx>0.000000000000000</rx><ry>90.00000000000000</ry><rz>0.000000000000000</rz></instance>
<instance objectid="0"><deltax>2.000000000000000</deltax><deltay>67.50000000000000</deltay><deltaz>70.00000000000000</deltaz><rx>0.000000000000000</rx><ry>90.00000000000000</ry><rz>0.000000000000000</rz></instance>
...

Early investigation shows this is caused by the call to gmio_ostringstream_write_xmlelt_f64() which internally passes NULL to gmio_ostringstream_write_f64().

@HuguesDelorme HuguesDelorme added this to the version/0.4.2 milestone Jan 26, 2021
@HuguesDelorme HuguesDelorme self-assigned this Jan 26, 2021
@HuguesDelorme HuguesDelorme changed the title AMF: instance subelements don't respect specified float64 precision AMF: instance subelements don't respect specified float64 format/precision Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant