Package VisionEgg :: Module Textures :: Class TextureStimulus |
[frames] | no frames]

# Class TextureStimulus

source code

             object --+
                      |
    ClassWithParameters --+
                          |
              Core.Stimulus --+
                              |
       TextureStimulusBaseClass --+
                                  |
                                 TextureStimulus

    A textured rectangle.

    This is mainly for 2D use (z coordinate fixed to 0.0 and w
    coordinated fixed to 1.0 if not given).

    Parameters
    ==========
    anchor             -- specifies how position parameter is interpreted (String)
                          Default: lowerleft
    angle              -- units: degrees, 0=right, 90=up (Real)
                          Default: 0.0
    color              -- texture environment color. alpha ignored (if given) for max_alpha parameter (AnyOf(Sequence3 of Real or Sequence4 of Real))
                          Default: (1.0, 1.0, 1.0)
    depth_test         -- perform depth test? (Boolean)
                          Default: False
    mask               -- optional masking function (Instance of <class 'VisionEgg.Textures.Mask2D'>)
                          Default: (determined at runtime)
    max_alpha          -- controls opacity. 1.0=copletely opaque, 0.0=completely transparent (Real)
                          Default: 1.0
    on                 -- draw stimulus? (Boolean)
                          Default: True
    position           -- units: eye coordinates (AnyOf(Sequence2 of Real or Sequence3 of Real or Sequence4 of Real))
                          Default: (0.0, 0.0)
    size               -- defaults to texture data size (units: eye coordinates) (Sequence2 of Real)
                          Default: (determined at runtime)
    texture            -- source of texture data (Instance of <class 'VisionEgg.Textures.Texture'>)
                          Inherited from TextureStimulusBaseClass
                          Default: (determined at runtime)
    texture_mag_filter -- OpenGL filter enum (Integer)
                          Inherited from TextureStimulusBaseClass
                          Default: GL_LINEAR (9729)
    texture_min_filter -- OpenGL filter enum (Integer)
                          Inherited from TextureStimulusBaseClass
                          Default: (GL enum determined at runtime)
    texture_wrap_s     -- OpenGL texture wrap enum (Integer)
                          Inherited from TextureStimulusBaseClass
                          Default: (GL enum determined at runtime)
    texture_wrap_t     -- OpenGL texture wrap enum (Integer)
                          Inherited from TextureStimulusBaseClass
                          Default: (GL enum determined at runtime)

    Constant Parameters
    ===================
    internal_format   -- format with which OpenGL uses texture data (OpenGL data type enum) (Integer)
                         Default: GL_RGB (6407)
    mipmaps_enabled   -- Are mipmaps enabled? (Boolean)
                         Default: True
    shrink_texture_ok -- Allow automatic shrinking of texture if too big? (Boolean)
                         Default: False

Instance Methods
draw(self) Draw the stimulus. | source code
Inherited from `TextureStimulusBaseClass`: `__init__` Inherited from `ClassWithParameters`: `__getstate__`, `__setstate__`, `get_specified_type`, `is_constant_parameter`, `set`, `verify_parameters` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables
| parameters_and_defaults = `{'on':(True, ve_types.Boolean, "draw`...``
Inherited from `TextureStimulusBaseClass`: `constant_parameters_and_defaults` Inherited from `ClassWithParameters`: `__safe_for_unpickling__`

Properties
Inherited from `object`: `__class__`

Method Details

### draw(self) | source code
    Draw the stimulus. (Called by Viewport instance.)

    This method is called every frame.  This method actually
    performs the OpenGL calls to draw the stimulus.
Overrides: Core.Stimulus.draw (inherited documentation)

Class Variable Details

  ### parameters_and_defaults Value:
      {'on':(True, ve_types.Boolean, "draw stimulus?"), 'mask':(None, ve_typ
      es.Instance(Mask2D), "optional masking function"), 'position':((0.0, 0
      .0), ve_types.AnyOf(ve_types.Sequence2(ve_types.Real), ve_types.Sequen
      ce3(ve_types.Real), ve_types.Sequence4(ve_types.Real)), "units: eye co
      ordinates"), 'anchor':('lowerleft', ve_types.String, "specifies how po
      sition parameter is interpreted"), 'lowerleft':(None, ve_types.Sequenc
      e2(ve_types.Real), "", VisionEgg.ParameterDefinition.DEPRECATED), 'ang
      le':(0.0, ve_types.Real, "units: degrees, 0=right, 90=up"), 'size':(No
      ...