| 17 | } |
| 18 | |
| 19 | void ViewVolumeNode::SetViewVolume(std::shared_ptr<ViewVolume> const& viewVolume) |
| 20 | { |
| 21 | mViewVolume = viewVolume; |
| 22 | |
| 23 | if (mViewVolume) |
| 24 | { |
| 25 | Matrix4x4<float> rotate; |
| 26 | #if defined(GTE_USE_VEC_MAT) |
| 27 | rotate.SetRow(0, mViewVolume->GetDVector()); |
| 28 | rotate.SetRow(1, mViewVolume->GetUVector()); |
| 29 | rotate.SetRow(2, mViewVolume->GetRVector()); |
| 30 | rotate.SetRow(3, { 0.0f, 0.0f, 0.0f, 1.0f }); |
| 31 | #else |
| 32 | rotate.SetCol(0, mViewVolume->GetDVector()); |
| 33 | rotate.SetCol(1, mViewVolume->GetUVector()); |
| 34 | rotate.SetCol(2, mViewVolume->GetRVector()); |
| 35 | rotate.SetCol(3, { 0.0f, 0.0f, 0.0f, 1.0f }); |
| 36 | #endif |
| 37 | localTransform.SetTranslation(mViewVolume->GetPosition()); |
| 38 | localTransform.SetRotation(rotate); |
| 39 | Update(); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | void ViewVolumeNode::UpdateWorldData(double applicationTime) |
| 44 | { |
nothing calls this directly
no test coverage detected