pyunity.render module¶
Classes to aid in rendering in a Scene.
-
class
pyunity.render.
Camera
[source]¶ Bases:
pyunity.core.SingleComponent
Component to hold data about the camera in a scene.
-
fov
¶ Fov in degrees measured horizontally. Defaults to 90.
Type: int
-
near
¶ Distance of the near plane in the camera frustrum. Defaults to 0.05.
Type: float
-
far
¶ Distance of the far plane in the camera frustrum. Defaults to 100.
Type: float
-
clearColor
¶ Tuple of 4 floats of the clear color of the camera. Defaults to (.1, .1, .1, 1). Color mode is RGBA.
Type: tuple
-
AddComponent
(component)¶ Calls AddComponent on the component’s GameObject.
Parameters: component (Component) – Component to add. Must inherit from Component
-
GetComponent
(component)¶ Calls GetComponent on the component’s GameObject.
Parameters: componentClass (Component) – Component to get. Must inherit from Component
-
GetComponents
(component)¶ Calls GetComponents on the component’s GameObject.
Parameters: componentClass (Component) – Component to get. Must inherit from Component
-
RemoveComponent
(component)¶ Calls RemoveComponent on the component’s GameObject.
Parameters: component (Component) – Component to remove. Must inherit from Component
-
-
pyunity.render.
convert
(type, list)[source]¶ Converts a Python array to a C type from
ctypes
.Parameters: - type (_ctypes.PyCSimpleType) – Type to cast to.
- list (list) – List to cast
Returns: A C array
Return type: Any