I know I have been ranting and raving about how my engine is complete and I'm sure your probably wondering, "All it does is move around and display a cube, whats the big deal" Well your right. You see all this effort, time and enthusiasm has been spent creating what I call a shell.
This shell is designed to automate most of the hard work. The Shell is also designed so that one using it can change operating systems with ease. The shell comes with some basics already to go so that someone unfamilitar with the heavy mathmatics of graphics can understand and use the system.
The Actor class is one of these basics. The actor class moves and rotates objects around in a mannor that is easy to understand and read.
5 functions are all you need to know in the actor class: RotateX( direction ), RotateY( direction ), RotateZ( direction ), MoveForward( direction ), Apply( direction ).
In even more laymans terms, turn Left or Right, look Up and Down, do a cartwheel, and move forward or backwards.
The Apply function is the execute, using the Rotate and Move functions is like saying "Get ready to Rotate and move" and apply is like saying "Okay go!"
Following the Actor class is the camera class, The camera is built off of the Actor class's easy functionality and use. All of the functions work the same except that when Apply is called this is where the view is placed not objects.
All this would not be possible if it where not for the math built in behind the Actor class. Specially made Vectors, Plains, and Matrices are designed to work with each other smoothly and give the mathmatically challenged a break.
The design of these systems was taken into heavy consideration. OpenGL uses arrays such as this:
float Vector[3] this is a vector
float Plain[4] this is a plain
float Matrix[4][4] this is a matrix
float Matrix[16] this is also a matrices.
I wanted a more modern design but still be able to directly interface with OpenGL and its array functions. So both Vector and Plain are declared like this:
GL_Vector vector
GL_Plain plain
you can access vector and plain components by simply calling
vector.x
vector.y
vector.z
and plain has an additional value
plain.w
The matrix is 4 plains that represent the xAxis, yAxis, zAxis, and Position. So accessing a matrix would be like this:
matrix.xAxis.x
matrix.yAxis.z
matrix.Position.w
The components of both Vector and Plain can be set using the parenthesis operator such as:
vector(4,2,3) which sets the x variable to 4, y to 2, and z to 3,
natrually plain allows for one more plain(4,2,3,1) and even plain(4,2,3) which will set x to 4, y to 2, z to 3, and w to 0. because the matrix is built using 4 plains it inherits this functionality.
Finally vector, plain, and matrix have a function called c_arr() which transforms the object into an array of size 3, 4, or 16. When the vector, plain, or matrix is copied, set equal to by another vector, plain, or matrix, or moves out of scope the internal array is deleted and set to NULL. making sure no memory leaks occure through unforsceen deletetion.
The next step.
Now that I have completed the shell it's time to make things more intresting. With the generic model loader now obsoliet with the new Vector objects I designed its time to make a serious model loader. I am attempting to work with bone transformations to reduce animation memory cost. This is the hard part, I have no access to the 3DS max file format, and no export gives the skin modifiery values for bone control which means either I have to go into 3ds max and write a script to export these values or record them by hand.