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.InputEventData) – 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: ORSMouseControler

setHandler(handleName)

Sets the current handler for a given state

Parameters:

handleName (str) – name of the state

Handlers

ORSHandlerAbstract

class ORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract(instance)

Basic class to define a handler.

getImplementation()

Gets the plugin instance (implementation) associated with this handler

Return:

plugin instance

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.

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.InputEventData) – 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.InputEventData) – 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.InputEventData) – 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: ORSHandlerAbstract

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

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.

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.InputEventData) – event data

Return:

True if the preparation is complete and the handler is ready to process.

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.InputEventData) – 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.

ORSMovementHandler

class ORSServiceClass.ORSControllerAndHandler.ORSMovementHandler.ORSMovementHandler(instance)

Bases: ORSMouseHandlerAbstract

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.InputEventData) – event data

Return:

True if the preparation is complete and the handler is ready to process.

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.InputEventData) – 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()

ORSTranslateHandler

class ORSServiceClass.ORSControllerAndHandler.ORSTranslateHandler.ORSTranslateHandler(instance)

Bases: ORSMovementHandler

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.InputEventData) – event data

Return:

True if the task has been completed with success; False otherwise.

ORSRotationHandler

class ORSServiceClass.ORSControllerAndHandler.ORSRotationHandler.ORSRotationHandler(instance)

Bases: ORSMovementHandler

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.

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.InputEventData) – event data

Return:

True if the preparation is complete and the handler is ready to process.

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.InputEventData) – event data

Return:

True if the task has been completed with success; False otherwise.

ORSMouseHandlerCine

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

Bases: ORSMouseHandlerAbstract

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.InputEventData) – event data

Return:

True if the task has been completed with success; False otherwise.

ORSMouseHandlerCineInfinite

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

Bases: ORSMouseHandlerCine

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.InputEventData) – event data

Return:

True if the task has been completed with success; False otherwise.

ORSMouseHandlerMoveCameraPivot

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

Bases: ORSMouseHandlerAbstract

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.

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.InputEventData) – event data

Return:

True if the preparation is complete and the handler is ready to process.

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.InputEventData) – event data

Return:

True if the task has been completed with success; False otherwise.

ORSMouseHandlerPan

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

Bases: ORSMouseHandlerAbstract

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.InputEventData) – 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()

ORSMouseHandlerRotate2DXY

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerRotate2DXY.ORSMouseHandlerRotate2DXY(instance)

Bases: ORSMouseHandlerAbstract

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.

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.InputEventData) – event data

Return:

True if the preparation is complete and the handler is ready to process.

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.InputEventData) – event data

Return:

True if the task has been completed with success; False otherwise.

ORSMouseHandlerRotate2DXYInfinite

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerRotate2DXYInfinite.ORSMouseHandlerRotate2DXYInfinite(instance)

Bases: ORSMouseHandlerRotate2DXY

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.InputEventData) – event data

Return:

True if the task has been completed with success; False otherwise.

ORSMouseHandlerTrack

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerTrack.ORSMouseHandlerTrack(instance)

Bases: ORSMouseHandlerAbstract

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.

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.InputEventData) – event data

Return:

True if the preparation is complete and the handler is ready to process.

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.InputEventData) – event data

Return:

True if the task has been completed with success; False otherwise.

ORSMouseHandlerWL

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerWL.ORSMouseHandlerWL(instance)

Bases: ORSMouseHandlerAbstract

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.

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.InputEventData) – event data

Return:

True if the preparation is complete and the handler is ready to process.

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.InputEventData) – event data

Return:

True if the task has been completed with success; False otherwise.

ORSMouseHandlerWLInfinite

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerWLInfinite.ORSMouseHandlerWLInfinite(instance)

Bases: ORSMouseHandlerWL

ORSMouseHandlerZoom

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerZoom.ORSMouseHandlerZoom(instance)

Bases: ORSMouseHandlerAbstract

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.

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.InputEventData) – event data

Return:

True if the preparation is complete and the handler is ready to process.

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.InputEventData) – event data

Return:

True if the task has been completed with success; False otherwise.

ORSMouseHandlerZoomInfinite

class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerZoomInfinite.ORSMouseHandlerZoomInfinite(instance)

Bases: ORSMouseHandlerZoom

See also

primitiveHandlers.