Skip to content

Conversation

@ArtifactForms
Copy link
Owner

No description provided.

constructor and returning copies via getters.
- Introduced a new utility method `distanceToPoint(Vector3f point)` to
the `Ray3f` class.
- The method calculates the shortest distance from the ray to a given
point in 3D space.
- Handles points both in front and behind the ray's origin by returning
either the perpendicular distance or the distance from the point to the
origin if it lies behind the ray.
- Ensured robust null-check for the input point and proper handling of
edge cases (e.g., point behind ray's origin).
Added a new constructor to the DirectionalLight class that allows
specifying the light's color and direction while using a default
intensity of 1.0. This provides additional flexibility for initializing
directional lights with fewer parameters.
- Introduced `background` field to manage the scene's background color.
- Added `getBackground()` and `setBackground(Color background)` methods
to retrieve and update the background color.
- Ensured thread safety and validation for the background color.

This enhancement allows users to customize the scene's background color,
improving visual customization and flexibility.
Introduced a clear(math.Color color) method in the Graphics2D interface.
The method allows clearing the entire viewport with a specified color,
resetting the drawing surface.
Useful for initializing or refreshing the rendering context during
updates.
@ArtifactForms ArtifactForms merged commit d904467 into master Jan 1, 2025
2 of 3 checks passed
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