Skip to content

Add Camera.forward() world-space viewing direction#62

Closed
AshSgDe29071999 wants to merge 2 commits into
bamdadd:mainfrom
AshSgDe29071999:feat/camera-forward
Closed

Add Camera.forward() world-space viewing direction#62
AshSgDe29071999 wants to merge 2 commits into
bamdadd:mainfrom
AshSgDe29071999:feat/camera-forward

Conversation

@AshSgDe29071999

@AshSgDe29071999 AshSgDe29071999 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds Camera.forward() returning the world-space unit viewing direction (OpenCV +z / third row of R).
  • Adds a look-at round-trip test asserting unit length and normalize(target - eye).

Fixes #58

Test plan

  • Forward vector matches look-at direction and has unit norm

Expose the OpenCV +z forward axis from R for logging, frustum checks, and look-at round-trip tests.

Fixes bamdadd#58
@bamdadd

bamdadd commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Thanks @AshSgDe29071999, and welcome! You and another contributor landed on the same issue (#58) at the same time — #61 came in just ahead and is type-clean under our mypy-strict gate, so I've merged that one. Your implementation was correct on the math; the only gap was mypy (Returning Any from self.rotation()[2].copy()). Really appreciate the PR — please grab another open issue (there are fresh good-first-issues on the tracker, e.g. #59-style validators) and I'll get you a merge. Closing this as a duplicate of #61, no reflection on the work.

@bamdadd bamdadd closed this Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a Camera.forward() getter (world-space viewing direction)

2 participants