MCPcopy Create free account
hub / github.com/c3d/tao3D / resetModelviewMatrix

Method resetModelviewMatrix

tao/widget.cpp:2850–2862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2848
2849
2850void Widget::resetModelviewMatrix()
2851// ----------------------------------------------------------------------------
2852// Reset the model-view matrix, used by reset_transform and setup
2853// ----------------------------------------------------------------------------
2854{
2855 GL.LoadIdentity();
2856
2857 // Position the camera
2858 Vector3 toTarget = Vector3(cameraTarget - cameraPosition).Normalize();
2859 toTarget *= cameraToScreen;
2860 Point3 target = cameraPosition + toTarget;
2861 GL.LookAt(cameraPosition, target, cameraUpVector);
2862}
2863
2864
2865void Widget::setupGL()

Callers 1

DrawMethod · 0.80

Calls 4

Vector3Class · 0.85
LoadIdentityMethod · 0.80
NormalizeMethod · 0.80
LookAtMethod · 0.80

Tested by

no test coverage detected