none
Bouger un Objet 3D avec le Keyboard RRS feed

  • Question

  • Dear All,

     

    I am trying to rotate my 3D object  using the keyboard up and down keys.  I am working on a WPF project , on Visual Studio 2005 , using .Net Framework 3.0.

     

     

    My Solution is composed of 2 projects, Robot3D ( my project ) and 3DTools project. I have included the 3DTools reference in the Robot3D project.

     

    I have added the following code, to make a small test,  in the  TrackballDecorator.cs file of the 3DTools project:

     

    protected override void OnKeyDown(KeyEventArgs e)
            {


                base.OnKeyDown(e);
                if (e.Key == Key.A)
                {
                    yValue = yValue - 10;
                    Point currentPosition = new Point(222, yValue);

                    
                    Track(currentPosition);

                }

            }

     

     I have compiled the file and i have noticed that the cursor doesn't even get inside this function on debug and i don't know why.


     

    So, is it possible to make changes in the TrackballDecorator.cs for it to be considered in my project?


    Thanks,

    Sondos

    NB:
      3DTools is the code Of Daniel Lehenbauer (http://www.codeplex.com/3DTools)



    vendredi 25 juillet 2008 12:58