DevLog

Day 10

by BlueThen on Jan.09, 2010, under Chase Engine, Dev Log

Remember yesterday, I said “If tomorrow also provides the convenience of a snow day, I’ll take advantage of that as well…”? Well, today happened to also be a snow day (woohoo!), and I did as I told you. I worked on Chase’s Engine. I’m currently at about 744 lines of code, so I’ve made some progress since I started the conversion. Yesterday’s version included support for handling coordinates, polygons, and models in 3D space. It also had some transformation functions (translate, dilate, and rotate) for coordinates and polygons.

I’ll probably delete those transformation functions the next time I edit. Today I’ve nested support for adding, subtracting, dividing, and multiplying in both the polygon and coordinate function. Not only an add/sub/etc function, but operator overloading (like for +, -, or *). This will allow me to use coordinate and polygon data types, for example:

polygonA * ((coordinateA + coordinateB) / coordinateC)

This will be exactly why I won’t need my transformation functions. Any sort of geometric manipulating can simply done using the nested math functions or use the coordinates/polygons in a formula. I also added in a rotation function to both classes. Another neat feature I’ve implemented is 2 and 3 dimensional support for the Coordinate and Polygon class. I was originally going to have a separate class for 2 and 3 dimensions (eg. Coord2D and Coord3D), but that won’t be necessary with the mighty convenience of function overloading in C++.

The picture above shows a rough draft code flow chart of Chase’s graphic engine. I drew this on the first this month (and year!), and will probably, if not definitely, will change as I refine my concept for Chase’s engine.

:, , , , , , , , , , ,

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!