Skip to content

Conversation

@capdevon
Copy link
Contributor

@capdevon capdevon commented Jun 6, 2025

These changes focus on improving the readability, robustness, and maintainability of the WireFrustum class.

  1. Comprehensive Javadoc Documentation
    Extensive Javadoc comments were added to the class, constructors, and all methods. This significantly enhances code understanding and future maintainability.

  2. Robust Input Validation
    Implemented explicit checks in the WireFrustum constructor and the update method to ensure that the points array is never null and always contains exactly 8 Vector3f objects. This prevents common runtime errors such as NullPointerException and IndexOutOfBoundsException, making the class more reliable.

  3. Minor Code Refinements
    Small adjustments were made to the update method to explicitly clear the existing FloatBuffer before writing new data, enhancing clarity in buffer handling.

New Utility Method: makeGeometry(Camera camera) for Debugging.
A dedicated static method, makeGeometry, was added. This method specifically generates a Geometry object representing the wireframe viewing frustum of any given camera. This is an invaluable tool for debugging and visualizing the camera's exact viewing volume within the 3D scene, which helps in understanding culling, shadow calculations, and general scene setup.

@yaRnMcDonuts yaRnMcDonuts added this to the v3.9.0 milestone Jun 7, 2025
@yaRnMcDonuts
Copy link
Member

Looks good to me, I'll merge this PR (as well as a few other of your PRs from last week that I've also already marked approved) in the next day or 2.

@yaRnMcDonuts yaRnMcDonuts merged commit ac7ee47 into jMonkeyEngine:master Jun 17, 2025
16 checks passed
@capdevon capdevon deleted the capdevon-WireFrustum branch June 23, 2025 12:48
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.

2 participants