ORSControllerAndHandler

Controllers

ORSMouseControler

class ORSServiceClass.ORSControllerAndHandler.ORSMouseControler.ORSMouseControler(instance)

Class managing mouse handlers

processEventData(eventData)

Process an event data by setting an appropriate handler accordingly to the current state and activating this handler if the conditions are respected.

Parameters:eventData (OrsEvent.eventdata.EventData) – event data
Return:True if the current handler completed his process; False otherwise.
setHandler(handleName)

Sets the current handler for a given state

Parameters:handleName (str) – name of the state

OrsMovementControler

class ORSServiceClass.ORSControllerAndHandler.ORSMovementControler.OrsMovementControler(instance, translationRotationWidget)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseControler.ORSMouseControler

setHandler(handleName)
setWidget(widget)

Handlers

ORSHandlerAbstract

class ORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract(instance)

Basic class to define an handler.

classmethod addHandleName(handleName)
classmethod getAllSubclasses(parentClass, outputCollection=None)
classmethod getCreateHandler(handleName, instance=None)
getImplementation()

Gets the plugin instance (implementation) associated with this handler

Return:plugin instance
handleNames = []
isPrepared()

Method called at the beginning of ORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.process() to know if the method ORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.prepare() should be called.

Overloading the subclass requires to call first the super class method, as:

if not super().isPrepared():
    return False
Return:True if the preparation has been done with success; False otherwise.
classmethod managedHandleInclude(handleName)
prepare(eventData)

Method called when the handler should gather the initial information required for his processing (for example, at mouse button press).

Overloading the subclass requires to call first the super class method, as:

if not super().prepare(eventData):
    return False
Parameters:eventData (OrsEvent.eventdata.EventData) – event data
Return:True if the preparation is complete and the handler is ready to process.
preprocess(eventData)

Method called before ORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.process()

Parameters:eventData (OrsEvent.eventdata.EventData) – event data
process(eventData)

Method called to perform the main task of the handler (while activated).

This method calls on ORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.prepare() if the call on ORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared() returns False.

Overloading the subclass requires to call first the super class method, as:

if not super().process(eventData):
    return False
Parameters:eventData (OrsEvent.eventdata.EventData) – event data
Return:True if the task has been completed with success; False otherwise.
reset()

Method called when the handler should complete his processing (for example, at mouse button release) and clean his data.

Overloading the subclass requires to call first the super class method, as:

super().reset()
resetOnExit()

Method called by ORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.process() at the ExitAction stage.

ORSMouseHandlerAbstract

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerAbstract.ORSMouseHandlerAbstract(instance=None)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract

Class to define an handler based on the cursor (mouse) information

getInfinityRange()
getLocalPositionVectorAtActivation()
getWorldPositionVectorAtActivation()
isPrepared()
needReset()
prepare(eventData)
process(eventData)
reset()
resetCursor(eventData)
resetOnExit()
setInfinityRange(infinityRange)
setMaximumInfinityRange(eventData)
setMaximumInfinityX(eventData)
setMaximumInfinityY(eventData)
setMinimumInfinityRange(eventData)
setMinimumInfinityX(eventData)
setMinimumInfinityY(eventData)

ORSMovementHandler

class ORSServiceClass.ORSControllerAndHandler.ORSMovementHandler.ORSMovementHandler(instance)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerAbstract.ORSMouseHandlerAbstract

addRotation(angle)
addTranslation(translation)
applyTranformationViaTheImplementaion(refresh=True)
applyTransformation(interactive=False, refresh=True, logged=False)
applyTransformationToPrimitive(orsObject, interactive=False)
applyTransformationToStructuredGrid(orsObject, interactive=False, logged=False)
applyTransformationToUnstructuredGrid(orsObject, interactive=False)
applyTransformationToVisualShape(orsObject, interactive=False, logged=False)
getAllSelectedObjectsOfInterest()
getAngle()
getManipuletedClasses()
getRotationHandleOverlay()
getRotationHandleOverlayGUID()
getRotationPivotOverlay()
getRotationPivotOverlayGUID()
getWidgetDisplay() → ORSModel.ors.View
prepare(eventData)
process(eventData)
refreshViews()
reset()
updateTransformationMatrixRotation(pivot, axis, angle)
updateTransformationMatrixWithTranslation(displacement)

ORSTranslateHandler

class ORSServiceClass.ORSControllerAndHandler.ORSTranslateHandler.ORSTranslateHandler(instance)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMovementHandler.ORSMovementHandler

applyTransformationToUnstructuredGrid(orsObject, interactive=False)
handleNames = ['OrsStateMoveTranslate']
process(eventData)

ORSRotationHandler

class ORSServiceClass.ORSControllerAndHandler.ORSRotationHandler.ORSRotationHandler(instance)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMovementHandler.ORSMovementHandler

applyTransformationToUnstructuredGrid(orsObject, interactive=False)
getAngleDisplay()
handleNames = ['OrsStateMoveRotateHandle', 'OrsStateMoveRotatePivot']
isPrepared()
needReset()
prepare(eventData)
process(eventData)
processRotationHandleMouvement(eventData)
processRotationPivotMovement(eventData)
rotateHandleIdx = 0
rotatePivotIdx = 1
updateTransformationMatrixRotation(pivot, axis, angle)

ORSMouseHandlerCine

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerCine.ORSMouseHandlerCine(instance=None)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerAbstract.ORSMouseHandlerAbstract

classmethod goToFirstLastSlice(firstSlice, impl, eventData)
classmethod goToNextPreviousSlice(previous, impl, display)
handleNames = ['OrsStateCine']
process(eventData)
classmethod setDisplayToSlice(display, box, sliceIndex, logging)

ORSMouseHandlerCineInfinite

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerCineInfinite.ORSMouseHandlerCineInfinite(instance=None)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerCine.ORSMouseHandlerCine

handleNames = ['OrsStateCineInfinite']
process(eventData)

ORSMouseHandlerMoveCameraPivot

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerMoveCameraPivot.ORSMouseHandlerMoveCameraPivot(instance=None)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerAbstract.ORSMouseHandlerAbstract

handleNames = ['OrsStateMoveCameraPivot']
isPrepared()
prepare(eventData)
process(eventData)

ORSMouseHandlerPan

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerPan.ORSMouseHandlerPan(instance=None)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerAbstract.ORSMouseHandlerAbstract

handleNames = ['OrsStatePan']
process(eventData)
reset()

ORSMouseHandlerRotate2DXY

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerRotate2DXY.ORSMouseHandlerRotate2DXY(instance)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerAbstract.ORSMouseHandlerAbstract

OBLIQUE_ROT_FACTOR = 0.005
fitViews(view)
getDeltaX(eventData, current_state)
getDeltaY(eventData, current_state)
getPivot()
handleNames = ['OrsStateObliqueXY', 'OrsStateObliqueX', 'OrsStateObliqueY']
isPrepared()
prepare(eventData)
process(eventData)

ORSMouseHandlerRotate2DXYInfinite

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerRotate2DXYInfinite.ORSMouseHandlerRotate2DXYInfinite(instance)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerRotate2DXY.ORSMouseHandlerRotate2DXY

fitViews(view)
getDeltaX(eventData, current_state)
getDeltaY(eventData, current_state)
getPivot()
handleNames = ['OrsStateObliqueXAtCenter', 'OrsStateObliqueYAtCenter']

ORSMouseHandlerTrack

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerTrack.ORSMouseHandlerTrack(instance)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerAbstract.ORSMouseHandlerAbstract

arcBallRatio = 0.9
getArcballVector(mouseScreenCoordinate, dboundedPlane)

Get a normalized vector from the center of the virtual ball O to a point P on the virtual ball surface, such that P is aligned on screen’s (X,Y) coordinates. If (X,Y) is too far away from the sphere, return the nearest point on the virtual ball surface.

getMeanSpin3DAngularSpeed()
getMeanSpin3DAxis()
handleNames = ['OrsStateTrack', 'OrsStateTrackCenter', 'OrsState3DCursor', 'OrsStateTrackSpin3D', 'OrsStateTrackConstraintHorizontally', 'OrsStateTrackConstraintVertically', 'OrsStateTrackConstraintRotation']
prepare(eventData)
process(eventData)
processFor2DDisplay(eventData)
processFor3DDisplay(eventData)

ORSMouseHandlerWL

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerWL.ORSMouseHandlerWL(instance)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerAbstract.ORSMouseHandlerAbstract

classmethod getLevelingWidthAndCenterValuesForVolume(volume, display, handleName)
handleNames = ['OrsStateLeveling', 'OrsStateLeveling2DPlane']
isPrepared()
prepare(eventData)
process(eventData)
setLevelingValuesForVolume(volume, width, center, display, handleName, exitAction)

ORSMouseHandlerWLInfinite

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerWLInfinite.ORSMouseHandlerWLInfinite(instance)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerWL.ORSMouseHandlerWL

handleNames = ['OrsStateLevelingInfinite']

ORSMouseHandlerZoom

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerZoom.ORSMouseHandlerZoom(instance)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerAbstract.ORSMouseHandlerAbstract

getZoomAtCursorPosition()
handleNames = ['OrsStateZoom', 'OrsStateZoomTrackCenter']
isPrepared()
prepare(eventData)
process(eventData)

ORSMouseHandlerZoomInfinite

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerZoomInfinite.ORSMouseHandlerZoomInfinite(instance)

Bases: ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerZoom.ORSMouseHandlerZoom

getZoomAtCursorPosition()
handleNames = ['OrsStateZoomAtCenter']

See also

primitiveHandlers.