
Thanks all. I solved problem.
I got two vertex (leftmost vertex, rightmost vertex) from bounding box, and transform them to 2d coordinate/and pixel width. Then I use 'expect plane width' divide 'pixel width' to get scale. It work but it has minor problem (not exactly expect size, it will project more few pixels). It is not affect my project.
pseduocode: float fscale; float expectwidth = 300; D3DXVECTOR leftvertex, rightvertex; D3DMATRIX matBB; //billboard ..face to screen D3DMATRIX matscale,matworld,mattran;
leftvertex = Get_BoundBox(left,top); rightvertex = Get_BoundBox(right, top); leftvertex = (leftvertex+objpos) * matBB; rightvertex = (rightvertex+objpos) * matBB; leftvertex = transform3dto2d(leftvertex); rightvertex = transform3dto2d(rightvertex); fscale = expectwidth / distance(leftvertex,rightvertex); //make scale matrix matscale.identity(); matscale._11=fscale; matscale._22=fscale;matscale._33=fscale; matworld = matscale * matBB * mattran; transform(WORLD,matworld) done!!!..hehe.. Thank a lot.
