问题
I would like to know what are the two matrix below and what they are used for :
- placementTransform (1 x 12)
- refPointTransform (1 x 16)
Does anyone know what they are used ? I think it has to do with translation(Tx, Ty, Tz)/rotation (Rx, Ry, Rz) of 3D objects but there are too many parameters in each vector...
回答1:
The placementTransform sets the position-offset and scale of a model during loading. refPointTransform is similar (but contains rotation), but is applied (multiplied) after the placementTransform.
Here is an example and source code, of how to use 'placementTransform': https://github.com/wallabyway/viewer-multimodel-search/blob/1c2e71397a78ab807644f96dfb34b8e578825987/docs/index.html#L61
Take a look at line 61. When I load in the second model, I set the offset and scale of the 3D-building, so that it's positioned above the 3D-hand-saw.
来源:https://stackoverflow.com/questions/49646407/forge-autodesk-models-transform-matrix