MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / SetViewVolume

Method SetViewVolume

GTE/Graphics/ViewVolumeNode.cpp:19–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19void 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
43void ViewVolumeNode::UpdateWorldData(double applicationTime)
44{

Callers

nothing calls this directly

Calls 5

SetTranslationMethod · 0.80
SetRotationMethod · 0.80
SetRowMethod · 0.45
SetColMethod · 0.45
GetPositionMethod · 0.45

Tested by

no test coverage detected