DrawOpQueue() { // Every queue has a base transform that is always the current transform. // This keeps the code a bit more uniform, and allows the window to // set a base transform in the main rendering queue. individualTransforms.push_back(scale(1)); absoluteTransforms.push_back(scale(1)); }
void makeCurrentTransform(const Transform& transform) { Transforms::iterator oldPosition = std::find(absoluteTransforms.begin(), absoluteTransforms.end(), transform); if (oldPosition == absoluteTransforms.end()) absoluteTransforms.push_back(transform); else absoluteTransforms.splice(absoluteTransforms.end(), absoluteTransforms, oldPosition); }
void pushTransform(const Transform& transform) { individualTransforms.push_back(transform); Transform result = multiply(transform, currentTransform()); makeCurrentTransform(result); }