Renderer
- class Renderer[source]
Bases:
QOpenGLWidget
,Base
Renderer class for 3D rendering of COMPAS geometry. We constantly use OpenGL version 2.1 and GLSL 120 with a Compatibility Profile at the moment. The width and height are not in its configuration since they are set by the parent layout.
- Parameters:
- viewer
compas_viewer.viewer.Viewer
The viewer instance.
- config
compas_viewer.configurations.RendererConfig
The renderer configuration.
- viewer
Methods
Clear the view.
Event handler for the renderer.
Callback for the gesture event which passes the event to the controller.
Initialize the renderer.
Initialize the OpenGL canvas.
Callback for the key press event which passes the event to the controller.
Callback for the key release event which passes the event to the controller.
Callback for the mouse move event which passes the event to the controller.
Callback for the mouse press event which passes the event to the controller.
Callback for the release press event which passes the event to the controller.
Paint all the items in the render, which only be called by the paintGL function and determines the performance of the renders This function introduces decision tree for different render modes and settings.
Paint the OpenGL canvas.
Independent drawing function for the instance map, which is only called by the
compas_viewer.components.render.Render.paintGL
function.Resize the renderer.
Resize the OpenGL canvas.
Sort objects by their categories
Sort objects by the distances from their bounding box centers to camera location
Update the projection matrix.
Callback for the mouse wheel event which passes the event to the controller.
Inherited Methods