Package VisionEgg :: Module FlowControl :: Class FunctionController |
[frames] | no frames]

# Class FunctionController

source code

    object --+
             |
    Controller --+
                 |
                FunctionController

    Set parameters using a Python function.

    This is a very commonly used subclass of Controller, because it is
    very intuitive and requires a minimum of code to set up.  Many of
    the Vision Egg demo programs create instances of
    FunctionController.

    A number of parameters are passed to the function depending on the
    value of temporal_variables:

    The function can make use of temporal variables, which are made
    available by passingkeyword argument(s) depending on the
    controller's temporal_variables attribute. Note that only the
    absolute temporal variables are available when the go loop is not
    running.

    flag(s) present    argument  description
    -----------------  --------  ----------------------------------
    TIME_SEC_ABSOLUTE  t_abs     seconds, continuously increasing
    TIME_SEC_SINCE_GO  t         seconds, reset to 0.0 each go loop
    FRAMES_ABSOLUTE    f_abs     frames, continuously increasing
    FRAMES_SINCE_GO    f         frames, reset to 0 each go loop

Instance Methods
__init__(self, during_go_func=None, between_go_func=None, **kw) Create an instance of FunctionController. | source code
during_go_eval(self) Called by Presentation. | source code
between_go_eval(self) Called by Presentation. | source code
Inherited from `Controller`: `evaluate_now`, `returns_type`, `set_eval_frequency` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables
Inherited from `Controller`: `EVERY_FRAME`, `FRAMES_ABSOLUTE`, `FRAMES_SINCE_GO`, `NEVER`, `NOT_BETWEEN_GO`, `NOT_DURING_GO`, `ONCE`, `TIME_INDEPENDENT`, `TIME_SEC_ABSOLUTE`, `TIME_SEC_SINCE_GO`, `TRANSITIONS`, `flag_dictionary`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, during_go_func=None, between_go_func=None, **kw) (Constructor) | source code
    Create an instance of FunctionController.

    Arguments:

    during_go_func -- function evaluted during go loop
    between_go_func -- function evaluted not during go loop
Overrides: Controller.__init__

### during_go_eval(self) | source code
    Called by Presentation. Overrides method in Controller base class.
Overrides: Controller.during_go_eval

### between_go_eval(self) | source code
    Called by Presentation. Overrides method in Controller base class.
Overrides: Controller.between_go_eval