[英]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.