| 128 | } |
| 129 | |
| 130 | void TriProjection::GetMatrixWithoutViewAdjustment( Matrix& proj ) const |
| 131 | { |
| 132 | // This constructs the projection matrix. Note that this is not necessarily the |
| 133 | // same matrix that SetProjection would set to the device. That is because |
| 134 | // Tr2Renderer::SetPerspectiveProjection may skew/offset the projection if the |
| 135 | // viewport is partly off screen. <bjorns 2009-03-26> |
| 136 | switch( m_projectionType ) |
| 137 | { |
| 138 | case TRIPROJECTION_FOV: |
| 139 | proj = PerspectiveFovMatrix( m_fov, m_aspect, m_zn, m_zf ); |
| 140 | break; |
| 141 | case TRIPROJECTION_OFF_CENTER: |
| 142 | proj = PerspectiveOffCenterMatrix( m_left, m_right, m_bottom, m_top, m_zn, m_zf ); |
| 143 | break; |
| 144 | case TRIPROJECTION_ORTHO: |
| 145 | proj = OrthoMatrix( m_left, m_top, m_zn, m_zf ); |
| 146 | break; |
| 147 | case TRIPROJECTION_CUSTOM: |
| 148 | proj = m_customTransform; |
| 149 | break; |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | Matrix TriProjection::GetTransform() const |
| 154 | { |
no outgoing calls
no test coverage detected