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:
Trueif the current handler completed his process;Falseotherwise.
- 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 methodORSServiceClass.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:
Trueif the preparation has been done with success;Falseotherwise.
- 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:
Trueif 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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
- 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:
ORSHandlerAbstractClass 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 methodORSServiceClass.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:
Trueif the preparation has been done with success;Falseotherwise.
- 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:
Trueif 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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
- 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:
Trueif 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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
- 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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
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 methodORSServiceClass.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:
Trueif the preparation has been done with success;Falseotherwise.
- 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:
Trueif 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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
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 methodORSServiceClass.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:
Trueif the preparation has been done with success;Falseotherwise.
- 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:
Trueif 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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
- 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 methodORSServiceClass.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:
Trueif the preparation has been done with success;Falseotherwise.
- 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:
Trueif 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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
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:
Trueif 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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
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 methodORSServiceClass.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:
Trueif the preparation has been done with success;Falseotherwise.
- 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:
Trueif 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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
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 methodORSServiceClass.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:
Trueif the preparation has been done with success;Falseotherwise.
- 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:
Trueif 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 onORSServiceClass.ORSControllerAndHandler.ORSHandlerAbstract.ORSHandlerAbstract.isPrepared()returnsFalse.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:
Trueif the task has been completed with success;Falseotherwise.
ORSMouseHandlerZoomInfinite¶
- class ORSServiceClass.ORSControllerAndHandler.ORSMouseHandlerZoomInfinite.ORSMouseHandlerZoomInfinite(instance)¶
Bases:
ORSMouseHandlerZoom
See also