예제 #1
0
 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));
 }
예제 #2
0
 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);
 }
예제 #3
0
 void pushTransform(const Transform& transform)
 {
     individualTransforms.push_back(transform);
     Transform result = multiply(transform, currentTransform());
     makeCurrentTransform(result);
 }