Planar projection (perspective/orthographic combination projection) #556
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new type,
PlanarFOV
, and a new functionplanar
to create a projection matrix for which the view space is projected to a plane at zero depth, currently two units high. This allows the focal point to move freely according to the specified vertical field of view, making for a continuous transition from positive FOV to zero or even negative FOV.I'm unsure of using the name
PlanarFOV
for this, which was derived from how it keeps a plane's transformation fixed as the FOV is adjusted. Additionally, it may be appropriate to add a height parameter to customize the height of the fixed plane instead of fixing it to extend one unit in each direction.If desired, I can add some test cases to verify the boundary constraints that this projection was derived from.