Closed eisoku9618 closed 1 year ago
I just noticed this. If possible, let's serialize to halfExtents, that is more standard
@eisoku9618 that scene was ok to load.
@eisoku9618 sorry, this pull request is blocking testplanningcommon. Please talk with @yoshikikanemoto (and @kanbouchou) for serialization format.
@rdiankov there was old scenes that use "pose" and "halfExtents" instead of "transform" and "extents". this change is just to support loading those old scenes.
@yoshikikanemoto so we will use "transform" and "extents" as default. Thank you for clarification.
If possible, let's serialize to halfExtents, that is more standard
Since many code use extents
e.g. RaveOrientedBox / RaveAxisAlignedBox / PyOrientedBox / PyAABB so it takes some time to change all of them to halfExtents
... :cry:
I agree that the C++ variable name and the serialization key should be the same.
Geometry already serializes to "halfExtents", so let's be consistent with the serialization, even if the variable names are not:
case GT_Box:
orjson::SetJsonValueByKey(rGeometryInfo, "halfExtents", _vGeomData*fUnitScale, allocator);
break;
@rdiankov @cielavenir Sure, I changed to be consistent with the serialization at least.
Here is the situation with this MR.
RaveOrientedBox
/ GeometryInfo
TO rapidjson::Value
: all the codes use halfExtents
as a keyrapidjson::Value
TO RaveOrientedBox
/ GeometryInfo
: all the codes use halfExtents
as a key
extents
can be accepted to RaveOrientedBox
as backward compatibilityPyOrientedBox
/ PyAABB
TO python dict: all the codes use extents
as a keyextents
test failed. checking.
@rdiankov Could you review this MR again? We also need to merge one internal repository together with this change.
Pipeline #579242
thanks~
In the past, RaveOrientedBox was serialized with
halfExtents
/pose
keywords.