Designer 3D View API
-
class
metavision_designer_3dview.
Image3dDisplayBase
Base class displaying an image from a 3D events producer in an OpenGL window
- Parameters
source (Producer) – Producer source providing 3D events
display_3d (Display3dBase) – Structure defining configuration parameters to initialize the viewer
-
class
metavision_designer_3dview.
Image3dDisplayOSG
(self: metavision_designer_3dview.Image3dDisplayOSG, prod: metavision_designer_engine.Producer, do_xyt: bool = False, display_scale: int = 2) → None Creates a 3D display using OpenSceneGraph.
Image3dDisplayOSG creates a renderer that displays events using a 3D display, where dimensions are x, y and t
x: X coordinate of the event
y: Y coordinate of the event
t: Timestamp of the event
- Parameters
source (Producer) – Pointer to the Producer which provides the stream
width (int) – Window width
height (int) – Window height
display_scale (int) – Scale factor applied for visualizing points in 3D XYT space. Each point coordinate will be multiplied by this scale value. Default is 2
-
class
CameraManipulator
(self: metavision_designer_3dview.Image3dDisplayOSG.CameraManipulator, value: int) → None Members:
TRACKBALL
FIRST_PERSON
-
property
name
-
property
-
class
SceneDisplayProperty
(self: metavision_designer_3dview.Image3dDisplayOSG.SceneDisplayProperty, value: int) → None Members:
POINT_SIZE
SCENE_SCALE_MM
BACKGROUND_COLOR
PRISM_COLOR
PRISM_COLORED
-
property
name
-
property
-
class
StandardView
(self: metavision_designer_3dview.Image3dDisplayOSG.StandardView, value: int) → None Members:
ORIGINAL
FRONT
BACK
LEFT
RIGHT
UP
DOWN
-
property
name
-
property
-
add_2D_text
(self: metavision_designer_3dview.Image3dDisplayOSG, text: str, position: list, color: list = [], size: float = 100.0) → int Adds some text on the display using 2D coordinates and gets its ID, in order to be able to remove/show/hide it
- Parameters
text (string) – Text to display
position (list) – x, y coordinates of the text
color (list) – List of r, g, b components of the text color (default : [])
size (float) – Size of the text (default : 100)
-
add_axis
(self: metavision_designer_3dview.Image3dDisplayOSG, scale: float) → int Adds the reference vectors (x, y and z) on the display. :param scale: Scale factor applied to the reference vectors :type scale: int
-
add_prism
(self: metavision_designer_3dview.Image3dDisplayOSG) → int Adds a frame delimiting where the events will be displayed in the 3D view.
-
add_prism_with_ticks
(self: metavision_designer_3dview.Image3dDisplayOSG, interval_number: int, tick_size: float = - 1) → int Adds a frame delimiting where the events will be displayed in the 3D view, and adds ticks to mark intervals at constant spacing
- Parameters
interval_number (int) – Number of ticks to mark intervals
tick_size (int) – Size of the ticks (default : -1)
-
add_text
(self: metavision_designer_3dview.Image3dDisplayOSG, text: str, position: list, color: list = [], size: float = 100.0) → int Adds some text on the display using 3D coordinates and gets its ID, in order to be able to remove/show/hide it
- Parameters
text (string) – Text to display
position (list) – x, y, z coordinates of the text
color (list) – List of r, g, b components of the text color (default : [])
size (float) – Size of the text (default : 100)
-
hide_item
(self: metavision_designer_3dview.Image3dDisplayOSG, item_id: int) → bool Hides an item, using its ID
- Parameters
item_id (int) – ID of the item to hide
-
set_camera_manipulator
(self: metavision_designer_3dview.Image3dDisplayOSG, camera_manipulator: Metavision::Display3dOSG::CameraManipulator) → None - Parameters
camera_manipulator (CameraManipulator) – can be one of Image3dDisplayOSG.CameraManipulator
-
set_event_display_colors
(self: metavision_designer_3dview.Image3dDisplayOSG, positive_colors: list, negative_colors: list) → None Sets the colors for ON and OFF events
- Parameters
positive_colors (list) – (r, g, b) components of the color assigned to positive polarity events
negative_colors (list) – (r, g, b) components of the color assigned to negative polarity events
-
set_projection_matrix_as_perspective
(self: metavision_designer_3dview.Image3dDisplayOSG, fovy: float, ar: float, near: float, far: float) → None Sets the projection matrix using perspective PoV
- Parameters
fovy (float) – Field of view angle in the y direction, in degrees
ar (float) – Aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height)
near (float) – Distance from the camera to the near clipping plane (always positive)
far (float) – Distance from the camera to the far clipping plane (always positive)
-
set_scene_display_parameters
(*args, **kwargs) Overloaded function.
set_scene_display_parameters(self: metavision_designer_3dview.Image3dDisplayOSG, property: Metavision::Display3dOSG::SceneDisplayProperty, value: float) -> None
Sets the display properties using the float format (point size, scene scale)
- Parameters
property (SceneDisplayProperty) – Property to set
value (float) – Value of the property
set_scene_display_parameters(self: metavision_designer_3dview.Image3dDisplayOSG, property: Metavision::Display3dOSG::SceneDisplayProperty, value: list) -> None
Sets the display properties using the list format (background color, prism color)
- Parameters
property (SceneDisplayProperty) – Property to set
value (list) – Value of the property
-
set_standard_view
(self: metavision_designer_3dview.Image3dDisplayOSG, standard_view: Metavision::Display3dOSG::StandardView) → None Sets the view as one of the standard view defined in MVDView3d.StandarView. Note that the Original view is the identity by default, and it is overwritten by the matrix given in each subsequent call to set_view_matrix_as_lookat() or set_view_matrix().
- Parameters
standard_view (CameraView) – can be one of Image3dDisplayOSG.StandardView
-
set_standard_views_bounding_box
(self: metavision_designer_3dview.Image3dDisplayOSG, bounding_box_mins: list, bounding_box_maxs: list) → None Sets the bounding box that will be used to compute the view matrix for the standard camera view. By default, the bounding box is automatically computed whenever a standard view is selected. This can be a problem, if the displayed geometry varies a lot, or if the scene is empty at the moment you switch to a standard view. You can call this function to switch the way the standard views are computed, to use the given bounding box or to compute it for you.
- Parameters
bounding_box_mins (list) – x, y, z minimal values of the bounding box
bounding_box_maxs (list) – x, y, z maximal values of the bounding box
-
set_view_matrix_as_lookat
(self: metavision_designer_3dview.Image3dDisplayOSG, eye: list, center: list, up: list) → None Sets the position and the orientation of view matrix
- Parameters
eye (list) – (x, y, z) position of the eye point
center (list) – (x, y, z) position of the reference point
up (list) – Direction of the up vector
-
show_item
(self: metavision_designer_3dview.Image3dDisplayOSG, item_id: int) → bool Shows an item, using its ID
- Parameters
item_id (int) – ID of the item to show
-
toggle_pause_status
(self: metavision_designer_3dview.Image3dDisplayOSG) → None Plays or Pauses the display
-
class
metavision_designer_3dview.
Image3dDisplayXYT
(self: metavision_designer_3dview.Image3dDisplayXYT, prod: metavision_designer_engine.Producer, display_scale: int = 2) → None Helper class to start the XYT demo.
Image3dDisplayXYT allows to create and start a GUI that will display events using a 3D display, on a x, y, t maner.
- Parameters
prod (Producer) – Producer source providing the events
display_scale (int) – Scale factor applied for visualizing points in 3D XYT space. Each point coordinate will be multiplied by this scale value. Default is 2