Monday, July 18, 2011

Configuring Armadillo

To configure armadillo on Mac OS X

Goto http://arma.sourceforge.net/ and download the newest version.

Decompress.

run cmake . in the directory
run make

It will automatically add the Accelerate framework to the compilation.

Monday, May 30, 2011

Game Programming Wiki

Found this interesting vector class on the game programming wiki. It uses the STL very well.

http://www.gpwiki.org/index.php/C_plus_plus:Tutorials:TemplateVector

Saturday, May 28, 2011

Plans for development of OpenGL wrapper

I want to create a wrapper for OpenGL using standard OO principles. Ideally, this means that all OpenGL commands and such will simply be wrapped in functions which are designed to draw specific types of objects, perhaps the type of Displayable class. The wrapper should will encapsulate as many OpenGL commands as possible, and each one will include an option error checking mechanism enabled through a define. This will both help me with more advanced OpenGL stuff as well as make future projects easier to start out with. Ideally, this wrapper itself will be a form of strategy which can be used in a larger engine. Perhaps another strategy would be the DirectX object.

Wednesday, May 25, 2011

Time stepper and physical object classes

I started writing two new classes today: TimeStepper and PhysicalObject.

The TimeStepper class is designed to take in physical objects, add them to a local list, and then update their state using their own derivative functions. TimeStepper itself is meant to be a strategy class, such that it can contain a pointer to a ConcreteTimeStepper strategy subclass which will implement a particular timestepping algorithm, aka Explicit Euler, Leap Frog, Runge Kutt 4, etc.

The physical object class is much that same as the TimeStepper in that it is a base class consisting of a state vector and methods to manipulate the state vector. For the base class, these are empty methods (accept for things common to all physical objects, such as mass). The state itself is implemented as a vector, and each type of physical object can treat this vector differently. For instance, the ParticlePhysicalObject can treat it as a 6-component vector where the first 3 are position and second 3 entries are velocity values. It also contains a vector of constant accelerations which can be used to add things such as gravity to the mix. Each physical object will contain its own GetStateDerivative vector which returns a pointer through the parameter to an array the same length of the state vector, but with each entry being the derivative of that entry in the state with respect to time. This way, timestepper doesn't need to know whether the PhysicalObject is a particle, a rigid body, or a deformable object, as long as the derivative entries from this function correspond to the same entries in its state, then TimeStepper can use the derivative information to do its thing without a care in the world.

For TimeStepper, I'm thinking about just maintaining a vector of PhysicalObject pointers which can be registered the the TimeStepper.

In the works also is a Collider with it's own strategy. I have found that the strategy pattern is translating very well to these physically based simulations.

TODO - Reread Witkin's course notes on rigid bodies.

Tuesday, May 24, 2011

Article on C++ memory management which looks interesting to read

http://www.cantrip.org/wave12.html

Ideas to do with Strategy pattern

Could make a nice time-stepping composition with the strategy pattern. I believe Wild Magic does this anyway with theirs, allowing you to change up the time-stepping algorithm to whatever you want to.

look at how Ogre does strategies with its LoD algorithms.

Monday, May 23, 2011

Development Research

Currently I am trying to research as much as I can and learn new programming paradigms / refresh myself on a bunch of material over the Summer. I need to get my thoughts organized, so here I'm going to try to write down exactly what I want to review / study over the summer.

Programming - C++
There are a few books I am currently looking at about C++ programming style / object-oriented style in general. Here are a list of the books I'm trying to read/finish in the next month or so.

- Design Patterns: Elements of Reusable Object-Oriented Software - I want to try to finish the entire book. It has a lot of classic object-oriented software design concepts which are necessary to know as I move forward with studying Ogre.
- Effective C++ and More Effective C++ - Alot of this stuff I already know, but I would like to finish reading the rest of the methods I do not know about.
- Exceptional C++ and More Exceptional C++ - Great book for learning standard programming issues associated with object-oriented c++ and c++ in general.

Graphics Methods, Algorithms, and Techniques
- Computer Graphics: Principles and Practices in C, 2nd edition - A class graphics text. I should read this cover to cover to refresh myself on basic algorithms.
- CG Tutorial - Two reasons: Introduction to the CG shader language, and also as a starting point to explore the CG Run-Time more in depth before my internship. All chapters and appendices.
- DirectX Tutorials - To refresh myself on basic DirectX and learn more advanced techniques.
- OpenGL Advanced techniques - Need to read the newest version of the Red Book, especially the advanced portions.
- Orange Book - For GLSL shading language.

Projects / Supplements
- Thesis / ideas that need to be implemented for research.
- Proposal
- Finish program
- Explore avenues for collision detection
- Write thesis and be prepared to defend by August.
- OGRE - I really want to dive into this system to learn about stanard engine techniques. From everything I have heard and seen, Ogre also has some great object oriented design techniques implemented in it.
- Implement surface envelope algorithm and try to create a utility which will create a control mesh.
- Thesis proposal!!!!

Other books will no doubtfully come along, but these are my priorities for the next few months. I have a lot of work to do.