| 107 | } |
| 108 | |
| 109 | forceinline void |
| 110 | Shape::computeBoundingBox(void) { |
| 111 | int lastLeft = 0; |
| 112 | int lastRight = 0; |
| 113 | bb.left = 0; |
| 114 | bb.right = 0; |
| 115 | for (int i=0; i<depth(); i++) { |
| 116 | lastLeft = lastLeft + (*this)[i].l; |
| 117 | lastRight = lastRight + (*this)[i].r; |
| 118 | bb.left = std::min(bb.left,lastLeft); |
| 119 | bb.right = std::max(bb.right,lastRight); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | forceinline const BoundingBox& |
| 124 | Shape::getBoundingBox(void) const { |
no test coverage detected