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:
viewercompas_viewer.viewer.Viewer

The viewer instance.

configcompas_viewer.configurations.RendererConfig

The renderer configuration.

Methods

clear

Clear the view.

event

Event handler for the renderer.

gestureEvent

Callback for the gesture event which passes the event to the controller.

init

Initialize the renderer.

initializeGL

Initialize the OpenGL canvas.

keyPressEvent

Callback for the key press event which passes the event to the controller.

keyReleaseEvent

Callback for the key release event which passes the event to the controller.

mouseMoveEvent

Callback for the mouse move event which passes the event to the controller.

mousePressEvent

Callback for the mouse press event which passes the event to the controller.

mouseReleaseEvent

Callback for the release press event which passes the event to the controller.

paint

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.

paintGL

Paint the OpenGL canvas.

paint_instance

Independent drawing function for the instance map, which is only called by the compas_viewer.components.render.Render.paintGL function.

resize

Resize the renderer.

resizeGL

Resize the OpenGL canvas.

sort_objects_from_category

Sort objects by their categories

sort_objects_from_viewworld

Sort objects by the distances from their bounding box centers to camera location

update_projection

Update the projection matrix.

wheelEvent

Callback for the mouse wheel event which passes the event to the controller.

Inherited Methods

acceptDrops

accessibleDescription

accessibleName

actionEvent

actions

activateWindow

addAction

addActions

adjustSize

autoFillBackground

backgroundRole

backingStore

baseSize

blockSignals

changeEvent

childAt

childEvent

children

childrenRect

childrenRegion

clearFocus

clearMask

close

closeEvent

colorCount

connect

connectNotify

contentsMargins

contentsRect

context

contextMenuEvent

contextMenuPolicy

create

createWinId

createWindowContainer

currentTargetBuffer

cursor

customEvent

defaultFramebufferObject

deleteLater

depth

destroy

devType

devicePixelRatio

devicePixelRatioF

devicePixelRatioFScale

disconnect

disconnectNotify

doneCurrent

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

dumpObjectInfo

dumpObjectTree

dynamicPropertyNames

effectiveWinId

emit

ensurePolished

enterEvent

eventFilter

find

findChild

findChildren

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPolicy

focusPreviousChild

focusProxy

focusWidget

font

fontInfo

fontMetrics

foregroundRole

format

frameGeometry

frameSize

geometry

grab

grabFramebuffer

grabGesture

grabKeyboard

grabMouse

grabShortcut

graphicsEffect

graphicsProxyWidget

hasFocus

hasHeightForWidth

hasMouseTracking

hasTabletTracking

height

heightForWidth

heightMM

hide

hideEvent

inherits

initPainter

inputMethodEvent

inputMethodHints

inputMethodQuery

insertAction

insertActions

installEventFilter

internalWinId

isActiveWindow

isAncestorOf

isEnabled

isEnabledTo

isFullScreen

isHidden

isLeftToRight

isMaximized

isMinimized

isModal

isQuickItemType

isRightToLeft

isSignalConnected

isTopLevel

isValid

isVisible

isVisibleTo

isWidgetType

isWindow

isWindowModified

isWindowType

keyboardGrabber

killTimer

layout

layoutDirection

leaveEvent

locale

logicalDpiX

logicalDpiY

lower

makeCurrent

mapFrom

mapFromGlobal

mapFromParent

mapTo

mapToGlobal

mapToParent

mask

maximumHeight

maximumSize

maximumWidth

metaObject

metric

minimumHeight

minimumSize

minimumSizeHint

minimumWidth

mouseDoubleClickEvent

mouseGrabber

move

moveEvent

moveToThread

nativeEvent

nativeParentWidget

nextInFocusChain

normalGeometry

objectName

overrideWindowFlags

overrideWindowState

paintEngine

paintEvent

paintingActive

palette

parent

parentWidget

physicalDpiX

physicalDpiY

pos

previousInFocusChain

property

raise_

receivers

rect

redirected

releaseKeyboard

releaseMouse

releaseShortcut

removeAction

removeEventFilter

render

repaint

resizeEvent

restoreGeometry

saveGeometry

screen

scroll

sender

senderSignalIndex

setAcceptDrops

setAccessibleDescription

setAccessibleName

setAttribute

setAutoFillBackground

setBackgroundRole

setBaseSize

setContentsMargins

setContextMenuPolicy

setCursor

setDisabled

setEnabled

setFixedHeight

setFixedSize

setFixedWidth

setFocus

setFocusPolicy

setFocusProxy

setFont

setForegroundRole

setFormat

setGeometry

setGraphicsEffect

setHidden

setInputMethodHints

setLayout

setLayoutDirection

setLocale

setMask

setMaximumHeight

setMaximumSize

setMaximumWidth

setMinimumHeight

setMinimumSize

setMinimumWidth

setMouseTracking

setObjectName

setPalette

setParent

setProperty

setScreen

setShortcutAutoRepeat

setShortcutEnabled

setSizeIncrement

setSizePolicy

setStatusTip

setStyle

setStyleSheet

setTabOrder

setTabletTracking

setTextureFormat

setToolTip

setToolTipDuration

setUpdateBehavior

setUpdatesEnabled

setVisible

setWhatsThis

setWindowFilePath

setWindowFlag

setWindowFlags

setWindowIcon

setWindowIconText

setWindowModality

setWindowModified

setWindowOpacity

setWindowRole

setWindowState

setWindowTitle

sharedPainter

show

showEvent

showFullScreen

showMaximized

showMinimized

showNormal

signalsBlocked

size

sizeHint

sizeIncrement

sizePolicy

stackUnder

startTimer

statusTip

style

styleSheet

tabletEvent

testAttribute

textureFormat

thread

timerEvent

toolTip

toolTipDuration

topLevelWidget

tr

underMouse

ungrabGesture

unsetCursor

unsetLayoutDirection

unsetLocale

update

updateBehavior

updateGeometry

updateMicroFocus

updatesEnabled

visibleRegion

whatsThis

width

widthMM

winId

window

windowFilePath

windowFlags

windowHandle

windowIcon

windowIconText

windowModality

windowOpacity

windowRole

windowState

windowTitle

windowType

x

y