Saturday, July 11, 2009

the 3dsmax sdk frustration

3dsmax sdk gives me so much love... not. Today found out (the hard way) that their BitArray.EnumSet function is broken in 64 bit...

on a sidenote the SDK states if you want something you draw in viewport to have a fixed nonscaling size, to use
vpt->GetVPWorldWidth(wpt)/360.0f;
however this isnt correct, you want to use
aspect = ((float)gw->getWinSizeX()/(float)gw->getWinSizeY());
aspect = max(aspect,1.0f);

(vpt->GetVPWorldWidth(wpt)*aspect)/(float)gw->getWinSizeX();