Am needing help, perhaps, with an easy, hopefully, OpenGL Assignment.
Basically I have a turtle, not a visible one, but it's called "Turtle Graphics" and it draws, based on stuff from the input files, or it doesn't draw but moves.
move() moves but doesn't draw.
trace() draws and moves.
turn() turns the angle the "Turtle" is facing counter-clockwise by some angle.
I am supposed to keep track of the states (position x and y, and the angle/direction).
I was wondering, first off, since I'm using inner classes, whether my setup is right. I have a .h and .cpp file.
I'm actually using QTCreator, not Microsoft Visual C++, and it may be less visual oriented, though it does involve some GUIs as it does need menus.
I'm not sure if there is an actual class called "stack" in C++, it could be going by another name, but you probably get what I meant.
I also am not sure if there is a push and pop method in the stack class of C++. They might go by another name. (I'm more used to the Java names.)
First of all, did I use too many :: or not enough :: when referring to the inner class State inside of Turtle.cpp?
The first four things it'll read in are parameters for the window-world or some term that involved the word "world" and involved a GUI window. Might be a dimension.
The next ones after that are either
push
pop
move and (a float)
trace and (a float)
turn and (a float)
For instance
move 100.3821
trace -183.002
turn -300.1002
pop
push
There could be bogus commands, he warned us that he put one in there on purpose so that we have to test to make sure it's a valid command, which makes things a tiny bit harder.
The OpenGL part should only involve the one that sets the window bounds, or something like that, and the one that will draw lines. (gldrawline() I think.)
Last edited by jedipenguin; September 13th, 2012 at 11:27 PM.
Bookmarks