CHATGPT AI
viewing
_angle_x
self.viewing_angle_y = self.viewing_angle_x * self.aspect_ratio
def set_resolution(self, resolution):
"""Set the camera resolution (in pixels).
:param resolution: The camera resolution (in pixels).
:type resolution: tuple of int
"""
self.resolution = resolution
self.aspect_ratio = float(resolution[0]) / float(resolution[1])
def set_fov(self, fov):
"""Set the camera field of view (in degrees).
:param fov: The camera field of view (in degrees).
:type fov: float
"""
self.viewing_angle_x = math.radians(fov)
self.viewing_angle_y = math.radians(fov * self.aspect_ratio)
self.viewing_angle_y = self.viewing_angle_x * self.aspect_ratio
def set_resolution(self, resolution):
"""Set the camera resolution (in pixels).
:param resolution: The camera resolution (in pixels).
:type resolution: tuple of int
"""
self.resolution = resolution
self.aspect_ratio = float(resolution[0]) / float(resolution[1])
def set_fov(self, fov):
"""Set the camera field of view (in degrees).
:param fov: The camera field of view (in degrees).
:type fov: float
"""
self.viewing_angle_x = math.radians(fov)
self.viewing_angle_y = math.radians(fov * self.aspect_ratio)
_angle_x
self.viewing_angle_y = self.viewing_angle_x * self.aspect_ratio
def set_resolution(self, resolution):
"""Set the camera resolution (in pixels).
:param resolution: The camera resolution (in pixels).
:type resolution: tuple of int
"""
self.resolution = resolution
self.aspect_ratio = float(resolution[0]) / float(resolution[1])
def set_fov(self, fov):
"""Set the camera field of view (in degrees).
:param fov: The camera field of view (in degrees).
:type fov: float
"""
self.viewing_angle_x = math.radians(fov)
self.viewing_angle_y = math.radians(fov * self.aspect_ratio)
0 Comments & Tags
0 Acciones
1 Views