| 103 | } |
| 104 | |
| 105 | Matrix4D ViewProjMatrix::getProjectionMatrix() const |
| 106 | { |
| 107 | // Return the same matrix as passed to the constructor |
| 108 | Matrix4D mat(_clMtx); |
| 109 | if (isOrthographic) { |
| 110 | mat.move(-0.5, -0.5, -0.5); |
| 111 | mat.scale(2.0, 2.0, 2.0); |
| 112 | } |
| 113 | |
| 114 | return mat; |
| 115 | } |
| 116 | |
| 117 | template<typename Vec> |
| 118 | void perspectiveTransform(const Base::Matrix4D& mat, Vec& pnt) |