Skip to content

Commit

Permalink
common/lib/render_control: Test RenderControlRayTrace docs
Browse files Browse the repository at this point in the history
  • Loading branch information
e10harvey committed Nov 25, 2024
1 parent 59e6052 commit c1e6df6
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions opencsp/common/lib/render_control/RenderControlRayTrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@


class RenderControlRayTrace:
"""
A class for controlling the rendering of ray traces in a graphical environment.
This class manages the rendering settings for light paths during ray tracing.
Parameters
----------
light_path_control : RenderControlLightPath, optional
The control settings for rendering light paths (default is the default light path control).
"""

# "ChatGPT 4o-mini" assisted with generating this docstring.
def __init__(self, light_path_control=rclp.default_path()) -> None:
self.light_path_control = light_path_control

Expand All @@ -10,4 +22,23 @@ def __init__(self, light_path_control=rclp.default_path()) -> None:


def init_current_lengths(init_len=1, current_len=1):
"""
Initializes a RenderControlRayTrace object with specified initial and current lengths for light paths.
This function creates a RenderControlRayTrace object with a RenderControlLightPath configured
with the provided initial and current lengths.
Parameters
----------
init_len : float, optional
The initial length of the light paths (default is 1).
current_len : float, optional
The current length of the light paths (default is 1).
Returns
-------
RenderControlRayTrace
A RenderControlRayTrace object initialized with the specified lengths.
"""
# "ChatGPT 4o-mini" assisted with generating this docstring.
return RenderControlRayTrace(rclp.RenderControlLightPath(init_length=init_len, current_length=current_len))

0 comments on commit c1e6df6

Please sign in to comment.