khaledosman / terasoft-12

Automatically exported from code.google.com/p/terasoft-12
0 stars 0 forks source link

Button design proposal #251

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
you can split your work to 3 classes

Hand {
   Vector2 position;
   Update() //keep track of user's hand joint
   Draw() //draw the hand
}

Button {
   Update(Vector position) //position of user's hand or the mouse location
   Draw() //draw the button
}

KinectButton : Button {
   static Hand hand;
   Update() //calls the base class update passing the hands position
}

Original issue reported on code.google.com by bishoyba...@gmail.com on 19 May 2012 at 10:16

GoogleCodeExporter commented 9 years ago
which part of "Don't put me in the CC" didn't you understand.

Original comment by ahmedt...@gmail.com on 19 May 2012 at 10:24

GoogleCodeExporter commented 9 years ago
We all have agreed that creating class hand is the most efficient way. But
we also agreed that it is not worth it to complicate the project with using
the buttons. The usage of the button is not that complex in our project.
Efforts to fix the button will make an overload on the implementer an who
uses it.

Your proposal still didn't solve the complexity of multiple users which
occurs in experiment 1. If we will handle such case, we will need to add an
extra static hand, which is not efficient to add line to the code if we
would like to track an another user's hand.

So, it still adds extra complexity, which if we are going to take
into consideration we would implement it the old good way.

P.S. the existing implementation works fine with no delay or overloading to
the project.

Original comment by ahmedheg...@gmail.com on 20 May 2012 at 10:45