[CSC 315] Help!
Andrew J. Pounds
pounds_aj at mercer.edu
Sun Sep 20 18:08:59 EDT 2026
After talking to several members of the class last week it became
apparent that there are those that are really struggling with getting
code running to draw lines. I have built what I think is a simpler
piece of code that uses vectors of structs to build lines. You are
welcome to use it.
Please note that this code builds the vector of points with a global
scope from the mouse functions and does no testing. After adding each
point to the vector it draws all the points and connects the lines.
When the left mouse key is hit it just adds the initial point to the end
of the vector to closes the polygon. When the middle mouse key is hit
the vector of points is cleared so there is nothing to draw.
Later on we will put the real working code of our programs in the
display function -- but for this program most of it is in the mouse
function and functions called by the mouse function.
You can find the repo on github
git clone https://github.com/drlbs/vmousekeys.git
As always, let me know if you hve any questions.
--
*/Andrew J. Pounds, Ph.D./*
/Professor of Chemistry and Computer Science/
/Director of the Computational Science Program/
/Mercer University/
/1501 Mercer University Drive, Macon, GA 31207 /
/(478) 301-5627/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc315/attachments/20260920/0a6b2e42/attachment.htm>
More information about the csc315
mailing list