jMonkeyEngine / jMonkeyEngine/jmonkeyengine
Using AreaUtils to approximate the object's pixels
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 14
Description
I think JME’s util method is wrong. This estimate should be related to cot() of fov. I think it should look something like this:
screenRadius = (boundsRadius * proj.m11 * screenWidth) / (distance * 2);
screenArea = screenRadius * screenRadius * PI;
Forum post: https://hub.jmonkeyengine.org/t/does-anyone-know-how-to-calculate-pixel-count-quickly/45393
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating AreaUtils and reviewing how it estimates an object's screen pixels. Read the linked forum discussion and compare the current calculation with the issue's proposed field-of-view-based formula. Done means the approximation is corrected and its behavior is verified against representative projection and distance cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100