MasterScan
Lab_Matlab_control Master Branch
|
Superclass for drawable graphics objects.
Subclasses should redefine the draw() method to use specific OpenGL drawing commands. Most drawing commands should assume units of degrees of visual angle, with the origin centered on the display. This is because dotsTheScreen configures OpenGL to do a pixels-per-degree transformation automatically. This works for commands that deal with the positions of points, lines, and polygons.
A few commands may need to assume units of pixels. Theses should be named and documented as exceptions to the rule.
Subclasses may also redefine the prepareToDrawInWindow() method. This should do any one-time or infrequent set up to enable or optimize the behavior of draw().
Properties and Events | |
Property | isVisible = true |
true or false, whether to draw() this object | |
Methods | |
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. | |
Static Methods | |
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... | |
|
static |
draw() several drawable objects and show the next Screen frame.
drawables | cell array of objects to draw() |
doClear | whether or not clear the Screen after this frame |
Invokes draw() on each of the objects in drawables, then invokes nextFrame() on dotsTheScreen. If provided, passes doClear to nextFrame(), to determine whether to clear the OpenGL frame buffer after displaying it.
Returns a struct of frame timing information, as returned from nextFrame().
|
static |
Convenient utility for combining a bunch of drawables into an ensemble.
Aguments: name ... optional <string> name of the ensemble/composite objects ... cell array of drawable objects
|
static |
Convenient utility for drawing an ensemble either locally or remotely.
Aguments: ensemble ... the ensemble args ... cell array of cell arrays of property/value pairs for each object in the ensemble prepareFlag ... whether to call prepareToDrawInWindow showDuration ... in sec pauseDuration ... in sec