How to get BoundingBox after rotation, scale?

China☆狼群 提交于 2020-01-06 04:56:08

问题


SCNVector3 min, max;
[self getBoundingBoxMin:&min max:&max];

the returned min and max value it's base on raw size


回答1:


You can ask for the bounding box of the parentNode for the node's transform to be taken into account.




回答2:


SCNVector3 min, max;
[self getBoundingBoxMin:&min max:&max];

SCNVector3 cMin = [self convertVector:min toNode:rootNode];
SCNVector3 cMax = [self convertVector:max toNode:rootNode];


来源:https://stackoverflow.com/questions/57470541/how-to-get-boundingbox-after-rotation-scale

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!