@@ -100,27 +100,6 @@ def set_back_focal_distance(self, cc: float) -> None:
100100 """Set the back focal distance of the camera."""
101101 self .cc = cc
102102
103-
104- # class Glass:
105- # """Glass data structure."""
106-
107- # def __init__(self, vec_x=0.0, vec_y=0.0, vec_z=1.0):
108- # self.vec_x = vec_x
109- # self.vec_y = vec_y
110- # self.vec_z = vec_z
111-
112- # def set_glass_vec(self, vec: np.ndarray) -> None:
113- # """Set the glass vector."""
114- # self.vec_x, self.vec_y, self.vec_z = vec
115-
116- Glass_dtype = np .dtype (
117- [
118- ("vec_x" , np .float64 ),
119- ("vec_y" , np .float64 ),
120- ("vec_z" , np .float64 ),
121- ]
122- )
123-
124103def default_glass_vec () -> np .ndarray :
125104 """Return default glass vector."""
126105 return vec_set (0.0 , 0.0 , 1.0 )
@@ -174,7 +153,7 @@ def __init__(self, ext_par=None, int_par=None, glass_par=None, added_par=None, m
174153 if int_par is None :
175154 int_par = Interior ()
176155 if glass_par is None :
177- glass_par = default_glass_vec ( )
156+ glass_par = np . array ([ 0.0 , 0.0 , 1.0 ] )
178157 if added_par is None :
179158 added_par = ap_52 ()
180159 if mmlut is None :
@@ -418,7 +397,7 @@ def set_glass_vec(self, gvec: np.ndarray):
418397 self .glass_par = gvec
419398
420399 def get_glass_vec (self ) -> np .ndarray :
421- """Return the glass vector, a 3-element array of Glass_dtype ."""
400+ """Return the glass vector, a 3-element array of float ."""
422401 return self .glass_par
423402
424403 def set_added_par (self , listpar : np .ndarray | list ):
@@ -518,8 +497,8 @@ def compare_glass(g1: np.ndarray, g2: np.ndarray) -> bool:
518497
519498 Args:
520499 ----
521- g1 (Glass_dtype ): vector pointing from the 3D origin to the surface of the glass
522- g2 (Glass_dtype ): another vector for comparison
500+ g1 (float array ): vector pointing from the 3D origin to the surface of the glass
501+ g2 (float array ): another vector for comparison
523502
524503 Returns
525504 -------
0 commit comments