Sign in to follow this  

Projected line size in pixels

Recommended Posts

Easiest way would be to use D3DXVec3Project on the end points and find the length of the resulting vector.

edit: Just to clarify, the length in screenspace should be within one pixel of the length in pixels. If you mean the actual number of pixels that make up that line, that is trickier. I suppose you could project the two line endpoints, then simulate drawing it with bresenhams or some such and count the number of pixels it would have plotted.

[Edited by - Kibble on September 21, 2004 2:34:50 AM]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this