You have to capture mouse events just by attaching mouse events and then apply the transformation to the object you want.
These are the events I've made to rotate my view around the object. Should be easy to rewrite it to your needs.
glControl.MouseMove += new MouseEventHandler(glControl_MouseMove);
glControl.MouseDown += new MouseEventHandler(glControl_MouseDown);
glControl.MouseUp += new MouseEventHandler(glControl_MouseUp);
Similar with moving objects...
Then you should apply the transforms for every object you want, of course with Push & Pop matrices of transforms...
This should help. Most of it I have taken from the examples, so try to read them for yourself.
Comments
Re: How to zoom, move and rotate the moedl by ...
You have to capture mouse events just by attaching mouse events and then apply the transformation to the object you want.
These are the events I've made to rotate my view around the object. Should be easy to rewrite it to your needs.
Now you need to attach them to e.g.
glControl:Similar with moving objects...
Then you should apply the transforms for every object you want, of course with Push & Pop matrices of transforms...
This should help. Most of it I have taken from the examples, so try to read them for yourself.
Re: How to zoom, move and rotate the moedl by ...
Thank you very much szamil!!
i have the question yet, beacause i use the windows forms application, i don't kown how to change you code in the windows forms application.
for exemple, the windows forms application cannot kows the key word "as", how can i do?
Re: How to zoom, move and rotate the moedl by ...
Thank you very much szamil!!
I make it!