| 1507 | //----------------------------------------------------------------------------- |
| 1508 | |
| 1509 | void makeOrthoProjection( MatrixF *outMatrix, |
| 1510 | F32 left, |
| 1511 | F32 right, |
| 1512 | F32 top, |
| 1513 | F32 bottom, |
| 1514 | F32 nearPlane, |
| 1515 | F32 farPlane, |
| 1516 | bool gfxRotate ) |
| 1517 | { |
| 1518 | Point4F row; |
| 1519 | row.x = 2.0f / (right - left); |
| 1520 | row.y = 0.0f; |
| 1521 | row.z = 0.0f; |
| 1522 | row.w = 0.0f; |
| 1523 | outMatrix->setRow( 0, row ); |
| 1524 | |
| 1525 | row.x = 0.0f; |
| 1526 | row.y = 2.0f / (top - bottom); |
| 1527 | row.z = 0.0f; |
| 1528 | row.w = 0.0f; |
| 1529 | outMatrix->setRow( 1, row ); |
| 1530 | |
| 1531 | row.x = 0.0f; |
| 1532 | row.y = 0.0f; |
| 1533 | row.z = 1.0f / (nearPlane - farPlane); |
| 1534 | row.w = 0.0f; |
| 1535 | |
| 1536 | outMatrix->setRow( 2, row ); |
| 1537 | |
| 1538 | row.x = (left + right) / (left - right); |
| 1539 | row.y = (top + bottom) / (bottom - top); |
| 1540 | row.z = nearPlane / (nearPlane - farPlane); |
| 1541 | row.w = 1.0f; |
| 1542 | outMatrix->setRow( 3, row ); |
| 1543 | |
| 1544 | outMatrix->transpose(); |
| 1545 | |
| 1546 | if ( gfxRotate ) |
| 1547 | outMatrix->mul( sGFXProjRotMatrix ); |
| 1548 | } |
| 1549 | |
| 1550 | //----------------------------------------------------------------------------- |
| 1551 |
no test coverage detected