MasterScan  Lab_Matlab_control Master Branch
List of all members | Properties and Events | Protected Properties | Methods
dotsDrawableTextures Class Reference

Overview

Make and draw OpenGL textures.

dotsDrawableTextures creates one or more multiple textures during prepareToDrawInWindow(), then displays them one at a time during successive calls to draw().

prepareToDrawInWindow() invokes textureMakerFevalable in order to create new textures. textureMakerFevalable should expect the dotsDrawableText object as the first argument and return a struct array of texture information with one element per texture.

Inheritance diagram for dotsDrawableTextures:
Inheritance graph
[legend]

Properties and Events

Property x = 0
 x-coordinate of the center of the drawn texture (degrees visual angle, centered in window)
 
Property y = 0
 y-coordinate of the center of the drawn texture (degrees visual angle, centered in window)
 
Property width = []
 width of the drawn texture (degrees visual angle, centered in window, defaults to unstretched and unflipped)
 
Property height = []
 height of the drawn texture (degrees visual angle, centered in window, defaults to unstretched and unflipped)
 
Property slideNumber = 1
 index for which texture to draw(), like a slide show
 
Property isSmooth = false
 whether or not to stretch textures by interpolation (logical)
 
Property isFlippedHorizontal = false
 wheter or not to flip the texture horizontally
 
Property isFlippedVertical = false
 wheter or not to flip the texture vertically
 
Property rotation = 0
 degrees counterclockwise to rotate the texture about its center
 
Property textureMakerFevalable = {}
 fevalable cell array for creating arbitrary textures More...
 
- Properties and Events inherited from dotsDrawable
Property isVisible = true
 true or false, whether to draw() this object
 

Protected Properties

Property textureInfo = []
 struct array of texture information returned from textureMakerFevalable. More...
 
Property nTextures = 0
 number of texture indexes to interleave
 
Property isTextureStale = true
 whether or not the OpenGL texture needs updating
 

Methods

self dotsDrawableTextures ()
 Constructor takes no arguments.
 
 set_textureMakerFevalable (self, textureMakerFevalable)
 Keep track of required texture updates.
 
 prepareToDrawInWindow (self)
 Make a new texture(s) with textureMakerFevalable.
 
 draw (self)
 Draw textures that were made by textureMakerFevalable.
 
 next (self)
 Shorthand to increment slideNumber, up to nTextures.
 
 previous (self)
 Shorthand to decrement slideNumber, down to zero.
 
- Methods inherited from dotsDrawable
self dotsDrawable ()
 Constructor takes no arguments.
 
 prepareToDrawInWindow (self)
 Do any pre-draw setup that requires an OpenGL drawing window.
 
 mayDrawNow (self)
 Draw() or not, depending on isVisible and possibly other factors.
 
 draw (self)
 Subclass must redefine draw() to draw graphics.
 
 show (self)
 Shorthand to set isVisible=true.
 
 hide (self)
 Shorthand to set isVisible=false.
 

Additional Inherited Members

- Static Methods inherited from dotsDrawable
static frameInfo drawFrame (drawables, doClear)
 draw() several drawable objects and show the next Screen frame. More...
 
static ensemble makeEnsemble (name, objects)
 Convenient utility for combining a bunch of drawables into an ensemble. More...
 
static frameInfo drawEnsemble (ensemble, args, prepareFlag, showDuration, pauseDuration)
 Convenient utility for drawing an ensemble either locally or remotely. More...
 

Properties and Events

◆ textureMakerFevalable

Property textureMakerFevalable = {}

fevalable cell array for creating arbitrary textures

The function should expect the dotsDrawableTextures object as the first argument. Any other arguments in the cell array will be passed to the function starting at the second place.

The function should return a struct array of texture information as with one element per texture. It may also set properties of the dotsDrawableTextures object. Aside from its the returned struct array value and any property setting, the dotsDrawableTextures object should not need to "know" anything about how textureMakerFevalable works.

textureMakerFevalable should work in units of pixels. If width and height are non-empty, the texture will be stretched to these dimensions, in degrees of visual angle.

◆ textureInfo

Property textureInfo = []
protected

struct array of texture information returned from textureMakerFevalable.


The documentation for this class was generated from the following file: