Sign in to follow this  
afsajghfd

Handling 3D objects

Recommended Posts

afsajghfd    100
Hi, I'm working with some 3D objects (box, cylinder) and i would like to emulate the object handle like most of graphics software, so when i do click on one object appears four or six points to stretch or translate the selected object ex: http://img215.imageshack.us/img215/5261/asideroiq5.jpg if there are some technique to find and implement i'm using vb.net and dx9 but help in any other languaje are welcome too :) thanks in advance

Share this post


Link to post
Share on other sites
webjeff    241
I'd start simple. First, draw your lines when a user clicks/un clicks on the screen.

1) If User Clicks, start point = x,y;
2) OnMouseMove, endpoint = current mouse x,y;
3) When User lets go, you now have start x,y & end x,y;
4) project those as rays into your 3d scene.
5) Test geometry against that frustum and see if they are within over 50%
6) if so, store it has selected!

Jeff.

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