繁体   English   中英

在3ds max中将3D坐标转换为2D

[英]Converting 3D coordinates to 2D in 3ds max

我正在尝试考虑视口的宽度和高度将平面对象中点的3D坐标转换为2D坐标。 我正在用C ++编写代码。

在浏览3Ds max文档时,我发现了函数“ MapViewToScreen”,这个函数足够吗? 如果是这样,如何执行它。 如果还有其他方法,请提出建议。

检查链接地图世界点到视口坐标

基本上你需要做的是

//get Transfromation matrix of the plane
Matrix3 tmMatrix = inode->GetObjectTM( GetCOREInterface()->GetTime() );

ViewExp& vpt = GetCOREInterface()->GetActiveViewExp();
GraphicsWindow *gwindow= vpt.getGW();
gwindow->setTransform( Matrix3(1) );

//Your required point, consider only the X and Y part
IPoint3 out; // X and Y from the bottom left corner
Point3 in( your_3d_point * tmMatrix );
gwindow->hTransPoint(&in, &out);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM