Thursday, August 7, 2014

Parenting

Wow, I never thought I'd post this much stuff in one day.

I've whipped up a class called Entity that serves to contain shapes and other entities. It manages it's own attributes, such as rotation, shear, scale, etc... and can "recursively" draw to the screen in a layered manner similar to how Flash might.

I did a simple test where there's only two entities.
  1. The first entity only contains a red shape
  2. The second entity contains a hollow box, the first entity, and a green shape
I then performed the same test I did the other day with the matrices, but instead I did it on the second entity. The first entity does it's own thing, but is always affected by any changes done to it's parent - the second entity.


No comments:

Post a Comment