Scene¶
- class huira.rgb.Scene¶
- __init__(self: huira._huira.rgb.Scene) None¶
- add_bsdf(self: huira._huira.rgb.Scene, bsdf: huira::BSDF<huira::SpectralBins<3ul, 600, 750, 500, 600, 380, 500> >, name: str = '') huira._huira.rgb.BSDFHandle¶
Add a BSDF from a shared pointer
- add_density_field(self: huira._huira.rgb.Scene, density_field: huira::DensityField<huira::SpectralBins<3ul, 600, 750, 500, 600, 380, 500> >, name: str = '') huira._huira.rgb.DensityFieldHandle¶
Add a density field from a shared pointer
- add_ellipsoid(self: huira._huira.rgb.Scene, x: object, y: object, z: object, name: str = '') huira._huira.rgb.EllipsoidHandle¶
Add an ellipsoid geometry (accepts any distance unit)
- add_geometry(self: huira._huira.rgb.Scene, geom: huira::Geometry<huira::SpectralBins<3ul, 600, 750, 500, 600, 380, 500> >, name: str = '') huira._huira.rgb.GeometryHandle¶
Add a geometry from a shared pointer
- add_material(self: huira._huira.rgb.Scene, material: huira::Material<huira::SpectralBins<3ul, 600, 750, 500, 600, 380, 500> >, name: str = '') huira._huira.rgb.MaterialHandle¶
Add a material from a shared pointer
- add_medium(self: huira._huira.rgb.Scene, medium: huira::Medium<huira::SpectralBins<3ul, 600, 750, 500, 600, 380, 500> >, name: str = '') huira._huira.rgb.MediumHandle¶
Add a medium from a shared pointer
- add_mesh(*args, **kwargs)¶
Overloaded function.
add_mesh(self: huira._huira.rgb.Scene, index_buffer: list[int], vertex_buffer: list[huira._huira.rgb.Vertex], name: str = ‘’) -> huira._huira.rgb.MeshHandle
Add a mesh from index and vertex buffers
add_mesh(self: huira._huira.rgb.Scene, index_buffer: list[int], vertex_buffer: list[huira._huira.rgb.Vertex], tangent_buffer: list[huira::Tangent], name: str = ‘’) -> huira._huira.rgb.MeshHandle
Add a mesh from index, vertex, and tangent buffers
- add_normal_texture(*args, **kwargs)¶
Overloaded function.
add_normal_texture(self: huira._huira.rgb.Scene, image: huira._huira.Image_Vec3f, name: str = ‘’) -> huira._huira.TextureHandle_vec3
Add a normal map texture from a Vec3 image
add_normal_texture(self: huira._huira.rgb.Scene, image: huira._huira.rgb.Image, name: str = ‘’) -> huira._huira.TextureHandle_vec3
Add a normal map texture from an RGB image
- add_phase_function(self: huira._huira.rgb.Scene, phase_function: huira::PhaseFunction<huira::SpectralBins<3ul, 600, 750, 500, 600, 380, 500> >, name: str = '') huira._huira.rgb.PhaseFunctionHandle¶
Add a phase function from a shared pointer
- add_primitive(*args, **kwargs)¶
Overloaded function.
add_primitive(self: huira._huira.rgb.Scene, geom: huira._huira.rgb.GeometryHandle, name: str = ‘’) -> huira._huira.rgb.PrimitiveHandle
Add a primitive from a geometry
add_primitive(self: huira._huira.rgb.Scene, geom: huira._huira.rgb.GeometryHandle, mat: huira._huira.rgb.MaterialHandle, name: str = ‘’) -> huira._huira.rgb.PrimitiveHandle
Add a primitive from a geometry and material
add_primitive(self: huira._huira.rgb.Scene, geom: huira._huira.rgb.GeometryHandle, medium: huira._huira.rgb.MediumHandle, name: str = ‘’) -> huira._huira.rgb.PrimitiveHandle
Add a primitive from a geometry and medium
add_primitive(self: huira._huira.rgb.Scene, geom: huira._huira.rgb.GeometryHandle, mat: huira._huira.rgb.MaterialHandle, medium: huira._huira.rgb.MediumHandle, name: str = ‘’) -> huira._huira.rgb.PrimitiveHandle
Add a primitive from a geometry, material, and medium
- add_texture(*args, **kwargs)¶
Overloaded function.
add_texture(self: huira._huira.rgb.Scene, image: huira._huira.rgb.Image, name: str = ‘’) -> huira._huira.rgb.TextureHandle
Add a spectral texture from an image
add_texture(self: huira._huira.rgb.Scene, image: huira._huira.Image_f32, name: str = ‘’) -> huira._huira.TextureHandle_float
Add a float texture from a single-channel image
add_texture(self: huira._huira.rgb.Scene, image: huira._huira.Image_Vec3f, name: str = ‘’) -> huira._huira.TextureHandle_vec3
Add a Vec3 texture from a three-channel image
- delete_camera_model(self: huira._huira.rgb.Scene, camera_model_handle: huira._huira.rgb.CameraModelHandle) None¶
- delete_geometry(self: huira._huira.rgb.Scene, geom_handle: huira._huira.rgb.GeometryHandle) None¶
Delete a geometry from the scene
- delete_light(self: huira._huira.rgb.Scene, light_handle: huira._huira.rgb.LightHandle) None¶
- delete_model(self: huira._huira.rgb.Scene, model_handle: huira._huira.rgb.ModelHandle) None¶
- delete_primitive(self: huira._huira.rgb.Scene, primitive_handle: huira._huira.rgb.PrimitiveHandle) None¶
Delete a primitive from the scene
- delete_unresolved_object(self: huira._huira.rgb.Scene, unresolved_object_handle: huira._huira.rgb.UnresolvedObjectHandle) None¶
- get_camera_model(self: huira._huira.rgb.Scene, name: str) huira._huira.rgb.CameraModelHandle¶
Get a camera model handle by name
- get_geometry(self: huira._huira.rgb.Scene, name: str) huira._huira.rgb.GeometryHandle¶
Get a geometry handle by name
- get_light(self: huira._huira.rgb.Scene, name: str) huira._huira.rgb.LightHandle¶
Get a light handle by name
- get_model(self: huira._huira.rgb.Scene, name: str) huira._huira.rgb.ModelHandle¶
Get a model handle by name
- get_primitive(self: huira._huira.rgb.Scene, name: str) huira._huira.rgb.PrimitiveHandle¶
Get a primitive handle by name
- get_unresolved_object(self: huira._huira.rgb.Scene, name: str) huira._huira.rgb.UnresolvedObjectHandle¶
Get an unresolved object handle by name
- load_dynamic_stars(self: huira._huira.rgb.Scene, star_catalog_path: os.PathLike, time: huira._huira.Time, min_magnitude: float = 100.0) None¶
Load dynamic stars from a catalog file for the given observation time
- load_model(self: huira._huira.rgb.Scene, file: os.PathLike, name: str = '') huira._huira.rgb.ModelHandle¶
Load a model from a file
- load_stars(self: huira._huira.rgb.Scene, star_catalog_path: os.PathLike, time: huira._huira.Time, min_magnitude: float = 100.0) None¶
Load stars from a catalog file for the given observation time
- new_bsdf_cook_torrance(self: huira._huira.rgb.Scene, name: str = '') huira._huira.rgb.BSDFHandle¶
Create a Cook-Torrance BSDF
- new_bsdf_hapke(self: huira._huira.rgb.Scene, h: float, B0: float, b: float, c: float, name: str = '') huira._huira.rgb.BSDFHandle¶
Create a Hapke BSDF
- new_bsdf_lambertian(self: huira._huira.rgb.Scene, name: str = '') huira._huira.rgb.BSDFHandle¶
Create a Lambertian BSDF
- new_bsdf_lommel_seeliger(self: huira._huira.rgb.Scene, name: str = '') huira._huira.rgb.BSDFHandle¶
Create a Lommel-Seeliger BSDF
- new_bsdf_mcewen(self: huira._huira.rgb.Scene, name: str = '') huira._huira.rgb.BSDFHandle¶
Create a McEwen BSDF
- new_bsdf_null(self: huira._huira.rgb.Scene, name: str = '') huira._huira.rgb.BSDFHandle¶
Create a null (transparent/passthrough) BSDF
- new_bsdf_oren_nayar(self: huira._huira.rgb.Scene, name: str = '') huira._huira.rgb.BSDFHandle¶
Create an Oren-Nayar BSDF
- new_camera_model(self: huira._huira.rgb.Scene, name: str = '') huira._huira.rgb.CameraModelHandle¶
Create a new camera model and return its handle
- new_constant_density_field(self: huira._huira.rgb.Scene, absorption: huira._huira.rgb.SpectralBins, scattering: huira._huira.rgb.SpectralBins, name: str = '') huira._huira.rgb.DensityFieldHandle¶
Create a constant density field with the given absorption and scattering coefficients
- new_isotropic_phase_function(self: huira._huira.rgb.Scene, name: str = '') huira._huira.rgb.PhaseFunctionHandle¶
Create an isotropic phase function
- new_material(self: huira._huira.rgb.Scene, bsdf: huira._huira.rgb.BSDFHandle, name: str = '') huira._huira.rgb.MaterialHandle¶
Create a new material with the specified BSDF
- new_medium(self: huira._huira.rgb.Scene, density_field_handle: huira._huira.rgb.DensityFieldHandle, phase_function_handle: huira._huira.rgb.PhaseFunctionHandle, name: str = '') huira._huira.rgb.MediumHandle¶
Create a new medium from a density field and phase function
- new_sphere_light(*args, **kwargs)¶
Overloaded function.
new_sphere_light(self: huira._huira.rgb.Scene, radius: huira._huira.Meter, spectral_radiance: huira::units::SpectralQuantity<huira::units::Dimensionality<0, 1, -3, 0, 0, 0, 0, 0, -1>, std::ratio<1l, 1l>, huira::SpectralBins<3ul, 600, 750, 500, 600, 380, 500> >, name: str = ‘’) -> huira._huira.rgb.LightHandle
Create a sphere light from spectral radiance
new_sphere_light(self: huira._huira.rgb.Scene, radius: huira._huira.Meter, spectral_power: huira._huira.rgb.SpectralWatts, name: str = ‘’) -> huira._huira.rgb.LightHandle
Create a sphere light from total spectral power
new_sphere_light(self: huira._huira.rgb.Scene, radius: huira._huira.Meter, total_power: huira._huira.Watt, name: str = ‘’) -> huira._huira.rgb.LightHandle
Create a sphere light from total scalar power (Watts)
- new_sun_light(self: huira._huira.rgb.Scene) huira._huira.rgb.LightHandle¶
Create a sun light source
- new_unresolved_asteroid(*args, **kwargs)¶
Overloaded function.
new_unresolved_asteroid(self: huira._huira.rgb.Scene, H: float, G: float, sun: huira._huira.rgb.InstanceHandle, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle
Create an unresolved asteroid from H, G magnitude parameters
new_unresolved_asteroid(self: huira._huira.rgb.Scene, H: float, G: float, sun: huira._huira.rgb.InstanceHandle, albedo: huira._huira.rgb.SpectralBins, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle
Create an unresolved asteroid with spectral albedo
new_unresolved_asteroid(self: huira._huira.rgb.Scene, H: float, G: float, sun: huira._huira.rgb.InstanceHandle, scalar_albedo: float, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle
Create an unresolved asteroid with scalar albedo
- new_unresolved_emitter(*args, **kwargs)¶
Overloaded function.
new_unresolved_emitter(self: huira._huira.rgb.Scene, spectral_power: huira._huira.rgb.SpectralWatts, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle
Create an unresolved emitter from spectral power
new_unresolved_emitter(self: huira._huira.rgb.Scene, power: object, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle
Create an unresolved emitter from total power (any power unit)
- new_unresolved_object(*args, **kwargs)¶
Overloaded function.
new_unresolved_object(self: huira._huira.rgb.Scene, spectral_irradiance: huira._huira.rgb.SpectralWattsPerMeterSquared, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle
Create an unresolved object from spectral irradiance
new_unresolved_object(self: huira._huira.rgb.Scene, irradiance: object, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle
Create an unresolved object from scalar irradiance (any irradiance unit)
- new_unresolved_object_from_magnitude(*args, **kwargs)¶
Overloaded function.
new_unresolved_object_from_magnitude(self: huira._huira.rgb.Scene, visual_magnitude: float, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle
Create an unresolved object from visual magnitude
new_unresolved_object_from_magnitude(self: huira._huira.rgb.Scene, visual_magnitude: float, albedo: huira._huira.rgb.SpectralBins, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle
Create an unresolved object from visual magnitude with spectral albedo
- new_unresolved_sphere(*args, **kwargs)¶
Overloaded function.
new_unresolved_sphere(self: huira._huira.rgb.Scene, radius: object, sun: huira._huira.rgb.InstanceHandle, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle
Create an unresolved sphere (accepts any distance unit for radius)
new_unresolved_sphere(self: huira._huira.rgb.Scene, radius: object, sun: huira._huira.rgb.InstanceHandle, albedo: huira._huira.rgb.SpectralBins, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle
Create an unresolved sphere with spectral albedo
new_unresolved_sphere(self: huira._huira.rgb.Scene, radius: object, sun: huira._huira.rgb.InstanceHandle, scalar_albedo: float, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle
Create an unresolved sphere with scalar albedo
- print_camera_models(self: huira._huira.rgb.Scene) None¶
- print_contents(self: huira._huira.rgb.Scene) None¶
- print_graph(self: huira._huira.rgb.Scene) None¶
- print_lights(self: huira._huira.rgb.Scene) None¶
- print_meshes(self: huira._huira.rgb.Scene) None¶
- print_models(self: huira._huira.rgb.Scene) None¶
- print_unresolved_objects(self: huira._huira.rgb.Scene) None¶
- prune_unreferenced_assets(self: huira._huira.rgb.Scene) None¶
Remove any assets that are no longer referenced by the scene graph
- property root¶
- set_background_radiance(*args, **kwargs)¶
Overloaded function.
set_background_radiance(self: huira._huira.rgb.Scene, background: huira._huira.rgb.Image) -> None
Set the background radiance from an equirectangular Image, looked up by the direction a ray leaves the scene in. With PSF convolution enabled, it is convolved with the rest of the frame as it is, and so darkens toward the frame’s edges. A 1 x 1 image is a uniform sky.
set_background_radiance(self: huira._huira.rgb.Scene, background: huira._huira.rgb.SpectralBins) -> None
Set a uniform background radiance from a spectral value. With PSF convolution enabled, the sky is convolved as if it continued beyond the frame’s edges, which leaves it as it is. Only the light that geometry adds to the sky, or blocks from it, is spread by the PSF, and with nothing but sky in view the convolution is skipped.
set_background_radiance(self: huira._huira.rgb.Scene, background: float) -> None
Set a uniform background radiance from its total, spread over the spectrum. See the spectral overload for how it meets the PSF convolution.
- set_camera_model_name(self: huira._huira.rgb.Scene, camera_model_handle: huira._huira.rgb.CameraModelHandle, name: str) None¶
Set the name of a camera model
- set_geometry_name(self: huira._huira.rgb.Scene, geom_handle: huira._huira.rgb.GeometryHandle, name: str) None¶
Set the name of a geometry
- set_light_name(self: huira._huira.rgb.Scene, light_handle: huira._huira.rgb.LightHandle, name: str) None¶
Set the name of a light
- set_model_name(self: huira._huira.rgb.Scene, model_handle: huira._huira.rgb.ModelHandle, name: str) None¶
Set the name of a model
- set_primitive_name(self: huira._huira.rgb.Scene, primitive_handle: huira._huira.rgb.PrimitiveHandle, name: str) None¶
Set the name of a primitive
- set_unresolved_object_name(self: huira._huira.rgb.Scene, unresolved_object_handle: huira._huira.rgb.UnresolvedObjectHandle, name: str) None¶
Set the name of an unresolved object
- update_star_epoch(self: huira._huira.rgb.Scene, time: huira._huira.Time) None¶
Update the epoch time for dynamic stars, causing their positions to be updated accordingly