honeybee_vtk.scene module¶
A VTK scene.
- class honeybee_vtk.scene.Scene(background_color: Optional[Tuple[int, int, int]] = None)[source]¶
Bases:
object
Initialize a Scene object.
Vtk derives inspiration from a movie set in naming its objects. Imagine a scene being prepared at a movie set. The scene has a background. It has a few actors, there are assistants running around making sure everything is ready, and there are a few cameras setup to capture the scene from different angles. A scene in vtk is defined in the similar fashion. It has a background color, some actors i.e. geometry objects from model, a few cameras around the scene, and assistants equal the number of cameras setup in the scene.
- Parameters
background_color – A tuple of three integers that represent RGB values of the color that you’d like to set as the background color. Defaults to gray.
- add_actors(val: Union[honeybee_vtk.actor.Actor, List[honeybee_vtk.actor.Actor]]) None [source]¶
add honeybee-vtk Actor objects to a Scene.
- Parameters
val – Either a list of Actors objects or a single Actor object.
- add_cameras(val: Union[honeybee_vtk.camera.Camera, List[honeybee_vtk.camera.Camera]]) None [source]¶
Add a honeybee-vtk Camera objects to a Scene.
- Parameters
val – Either a list of Camera objects or a single Camera object.
- export_gltf(folder: str, name: str = 'Camera') str [source]¶
Export a scene to a glTF file.
- Parameters
folder – A valid path to where you’d like to write the gltf file.
name – Name of the gltf file as a text string.
- Returns
A text string representing the path to the gltf file.
- export_images(**kwargs)¶
- legend_parameter(name: str) honeybee_vtk.legend_parameter.LegendParameter [source]¶
Get a legend parameter object by name.
- Parameters
name – A string for the name of the legend parameters you are looking for.
- Returns
A legend parameter object.
- remove_actor(name: str) None [source]¶
Remove an actor from scene by name.
- Parameters
name – A string representing the name of the actor you would like to remove from the scene.
- update_scene() None [source]¶
Update the scene.
This method will use the latest cameras, actors, and visible legend parameters to create assistant object.
- property actors: List[str]¶
Name of actors in the scene.
- property assistants: List[honeybee_vtk.assistant.Assistant]¶
A list of honeybee-vtk assistants working in the scene.
- property background_color: Tuple[int, int, int]¶
background_color for the scene.
- property cameras: List[honeybee_vtk.camera.Camera]¶
A list of honeybee-vtk cameras setup in the scene.
- property legend_parameters: Dict[str, honeybee_vtk.legend_parameter.LegendParameter]¶
Legends in the scene that can be added to the images.