title: How do you check if mouse was clicked inside a triangle area in freeglut?
body: <p>I have a problem whit my little Opengl/freeglut/c++ 2D editor project.</p>
  
  <p>the editor allows you to draw a quad or a triangle(Object). You can resize the object by draging a corner of the object where ever you want. 
  you can also move the object around the screen if the object is active (you click on a object to make it active).</p>
  
  <p>Now the problem that I'm having is to do whit the area that you click on to make the object active. The activation area used to be just a quad around the object (get the width and height of the object and so on) (Blue dots on the Picture show the activation area borders)</p>
  
  <p><a href="http://i48.tinypic.com/muyh41.png" rel="nofollow">http://i48.tinypic.com/muyh41.png</a></p>
  
  <p>But I want the activation area to be the area of the object not a quad around it.
  So the question is how would you check if the mouse was clicked inside area like in picture above or below this text?</p>
  
  <p><a href="http://i49.tinypic.com/abmli8.png" rel="nofollow">http://i49.tinypic.com/abmli8.png</a></p>