pro mggranimation::renderFrame, frame=frame, nframes=nframes
compile_opt strictarr
end
pro mggranimation::draw, view
compile_opt strictarr, logical_predicate
nAnimators = self.animators->count()
frame = 0
nframes = 0
for a = 0L, nAnimators - 1L do begin
oanimator = self.animators->get(position=a)
oanimator->getProperty, nframes=nAnimatorFrames, startFrame=startFrame
nframes = nframes > (nAnimatorFrames + startFrame)
endfor
for frame = 0L, nframes - 1L do begin
for a = 0L, nAnimators - 1L do begin
oanimator = self.animators->get(position=a)
oanimator->apply, frame=frame
endfor
self->renderFrame, view, frame=frame, nframes=nframes
endfor
end
pro mggranimation::addAnimator, animator
compile_opt strictarr
self.animators->add, animator
end
pro mggranimation::cleanup
compile_opt strictarr
obj_destroy, self.animators
end
function mggranimation::init
compile_opt strictarr
self.animators = obj_new('IDL_Container')
return, 1
end
pro mggranimation__define
compile_opt strictarr
define = { MGgrAnimation, $
animators : obj_new() $
}
end