From c1e6df6ca1f5a59b1a81fe84abbf052721755672 Mon Sep 17 00:00:00 2001 From: Evan Harvey Date: Mon, 25 Nov 2024 14:25:15 -0700 Subject: [PATCH] common/lib/render_control: Test RenderControlRayTrace docs --- .../render_control/RenderControlRayTrace.py | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/opencsp/common/lib/render_control/RenderControlRayTrace.py b/opencsp/common/lib/render_control/RenderControlRayTrace.py index 4e501bd62..183b03e25 100644 --- a/opencsp/common/lib/render_control/RenderControlRayTrace.py +++ b/opencsp/common/lib/render_control/RenderControlRayTrace.py @@ -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 @@ -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))