DAVE.visual¶
Module Contents¶
- DAVE.visual.PyQtImpl = PySide2¶
- DAVE.visual.transform_to_mat4x4(transform)¶
- DAVE.visual.transform_from_point(x, y, z)¶
- DAVE.visual.transform_from_direction(axis)¶
Creates a transform that rotates the X-axis to the given direction :param axis: requested direction
- Returns:
vtk.vtkTransform
- DAVE.visual.update_line_to_points(line_actor)¶
- DAVE.visual.apply_parent_tranlation_on_transform(parent, t)¶
- DAVE.visual.actor_from_trimesh(trimesh)¶
Creates a vtkplotter.Actor from a pyo3d.TriMesh
- DAVE.visual.vp_actor_from_obj(filename)¶
- class DAVE.visual.ActorType¶
Bases:
enum.Enum- FORCE = 1¶
- VISUAL = 2¶
- GEOMETRY = 3¶
- GLOBAL = 4¶
- CABLE = 5¶
- NOT_GLOBAL = 6¶
- BALLASTTANK = 7¶
- class DAVE.visual.VisualActor(actors, node)¶
- select(self)¶
- deselect(self)¶
- make_transparent(self)¶
- reset_opacity(self)¶
- set_dsa(self, d, s, a)¶
- on(self)¶
- off(self)¶
- class DAVE.visual.Viewport(scene, jupyter=False)¶
- screen¶
Becomes assigned when a screen is active (or was active…)
- global_visual¶
Visuals for the global environment
- onEscapeKey¶
Function handles
- _wavefield¶
WaveField object
- update_outlines(self)¶
- create_world_actors(self)¶
- deselect_all(self)¶
- node_from_vtk_actor(self, actor)¶
Given a vkt actor, find the corresponding node :param actor: vtkActor
Returns:
- actor_from_node(self, node)¶
Finds the VisualActor belonging to node
- add_dynamic_wave_plane(self, waveplane)¶
- remove_dynamic_wave_plane(self)¶
- update_dynamic_waveplane(self, t)¶
- hide_actors_of_type(self, types)¶
- show_actors_of_type(self, types)¶
- set_alpha(self, alpha, exclude_nodes=None)¶
Sets the alpha (transparency) of for ALL actors in all visuals except the GLOBAL actors or visuals belonging to a node in exclude_nodes
- level_camera(self)¶
- camera_reset(self)¶
- toggle_2D(self)¶
- set_camera_direction(self, vector)¶
- _scaled_force_vector(self, vector)¶
- create_visuals(self, recreate=False)¶
Visuals are created in their parent axis system
- recreate¶
re-create already exisiting visuals
- position_visuals(self)¶
All visuals are aligned with their node
- add_new_actors_to_screen(self)¶
Updates the screen with added actors
- shutdown_qt(self)¶
Stops the renderer such that the application can close without issues
- setup_screen(self, qtWidget=None)¶
Creates the plotter instance and stores it in self.screen
- show(self, qtWidget=None, camera=None)¶
Add actors to screen and show
- onMouseLeft(self, info)¶
- zoom_all(self)¶
- onMouseRight(self, info)¶
- show_embedded(self, target_frame)¶
target frame : QFrame
- _leftmousepress(self, iren, event)¶
Implements a “fuzzy” mouse pick function
- keep_up_up(self, obj, event_type)¶
Force z-axis up
- keyPressFunction(self, obj, event)¶
- refresh_embeded_view(self)¶
- update_visibility(self)¶
Updates the visibility settings for all of the actors
A visual can be hidden completely by setting visible to false An actor can be hidden depending on the actor-type using
self.show_geometry = True self.show_force = True self.show_visual = True self.show_global = False
- set_dsa(self, d, s, a)¶
- set_default_dsa(self)¶
- class DAVE.visual.WaveField¶
- update(self, t)¶
- create_waveplane(self, wave_direction, wave_amplitude, wave_length, wave_period, nt, nx, ny, dx, dy)¶
- DAVE.visual.wavefield¶