Closed RebeccaNowak closed 5 months ago
for the record, what is the reason for storing aspect in the model?
I suspect that is has historical reasons, that we save the frustum in Model AND FrustumModel. Both are used in the code in different places, but I think we could remove Frustum from Model and only store it in FrustumModel. I could open a new Issue with the task to look into this and clean it up, if you don't see a problem with removing Frustum from Model.
Hm, cool thanks for explaining. Taking it further, conceptually, the model should be "viewer" independent (so when e.g. a browser also opens a connection there is no race for updating the frustum). So best would be to have no width/height/aspect dependent stuff in the model at all. Since this seems unrealistic (is it?), your approach in removing redundancy would be a good option. I'm not sure if it pays out though the effort (given the fact that having aspect dependent stuff in the model is not preferred anyways).
So let's go with this PR and let's create an issue which also talks about the possibility to really remove the aspect as a whole as a long-term objective.
What do you think?
Sounds good to me! Not sure yet what the implications of completely removing the aspect would be, but we could definitely look into this.
Bugfix #358 Frustum.withAspect from Aardvark.Media has unexpected behaviour. Replaced calls to the function. Now updating Frustum in FrustumModel to be consistent with Model.frustum. Also setting formerly unused Model.aspect on resize of rendering control.