| 385 | #endif |
| 386 | |
| 387 | float Camera::getDepthInView(const Mat4& transform) const |
| 388 | { |
| 389 | Mat4 camWorldMat = getNodeToWorldTransform(); |
| 390 | const Mat4& viewMat = camWorldMat.getInversed(); |
| 391 | float depth = -(viewMat.m[2] * transform.m[12] + viewMat.m[6] * transform.m[13] + viewMat.m[10] * transform.m[14] + |
| 392 | viewMat.m[14]); |
| 393 | return depth; |
| 394 | } |
| 395 | |
| 396 | void Camera::setDepth(int8_t depth) |
| 397 | { |
no test coverage detected