svSupport
This class is a support file for the ViewingPane class.
This class is used to verify the ability to use externally-defined function handles.
% NOTE: In order to "find" a callback and keep track of it, you need to start % you callback function with lower-case "cb_" % (e.g. cSelectMissionActionPerformedCallback) % URL : $URL: $ % Log : $Id: svSupport.html,v 1.1 2008/07/23 12:51:21 jberg Exp $ function fh = svSupport() sfcns = which('-subfun',mfilename); fh = []; for fidx = 1:length(sfcns) if strncmp(sfcns{fidx},'cb_',1) fld = sfcns{fidx}(4:end); val = str2func(sfcns{fidx}); fh.(fld) = val; end end end function cb_viewFrontButton_ActionPerformedCallback(callingObj,evt,ud) t3d = sv_Axes.t3d; ud.translation_TransformGroup.getTransform(t3d); t3d.setRotation(sv_Axes.posX0); ud.translation_TransformGroup.setTransform(t3d); ud.xRotation_TransformGroup.setTransform(sv_Axes.get_posY()); ud.yRotation_TransformGroup.setTransform(sv_Axes.get_posY()); end function cb_viewBackButton_ActionPerformedCallback(callingObj,evt,ud) t3d = sv_Axes.t3d; ud.translation_TransformGroup.getTransform(t3d); t3d.setRotation(sv_Axes.posY180); ud.translation_TransformGroup.setTransform(t3d); ud.xRotation_TransformGroup.setTransform(sv_Axes.get_posY()); ud.yRotation_TransformGroup.setTransform(sv_Axes.get_posY()); end function cb_viewTopButton_ActionPerformedCallback(callingObj,evt,ud) t3d = sv_Axes.t3d; ud.translation_TransformGroup.getTransform(t3d); t3d.setRotation(sv_Axes.posX90); ud.translation_TransformGroup.setTransform(t3d); ud.xRotation_TransformGroup.setTransform(sv_Axes.get_posY()); ud.yRotation_TransformGroup.setTransform(sv_Axes.get_posY()); end function cb_viewBottomButton_ActionPerformedCallback(callingObj,evt,ud) t3d = sv_Axes.t3d; ud.translation_TransformGroup.getTransform(t3d); t3d.setRotation(sv_Axes.negX90); ud.translation_TransformGroup.setTransform(t3d); ud.xRotation_TransformGroup.setTransform(sv_Axes.get_posY()); ud.yRotation_TransformGroup.setTransform(sv_Axes.get_posY()); end function cb_viewRightButton_ActionPerformedCallback(callingObj,evt,ud) t3d = sv_Axes.t3d; ud.translation_TransformGroup.getTransform(t3d); t3d.setRotation(sv_Axes.negY90); ud.translation_TransformGroup.setTransform(t3d); ud.xRotation_TransformGroup.setTransform(sv_Axes.get_posY()); ud.yRotation_TransformGroup.setTransform(sv_Axes.get_posY()); end function cb_viewLeftButton_ActionPerformedCallback(callingObj,evt,ud) t3d = sv_Axes.t3d; ud.translation_TransformGroup.getTransform(t3d); t3d.setRotation(sv_Axes.posY90); ud.translation_TransformGroup.setTransform(t3d); ud.xRotation_TransformGroup.setTransform(sv_Axes.get_posY()); ud.yRotation_TransformGroup.setTransform(sv_Axes.get_posY()); end function cb_viewIsoButton_ActionPerformedCallback(callingObj,evt,ud) t3d = sv_Axes.t3d; ud.translation_TransformGroup.getTransform(t3d); t3d.setRotation(sv_Axes.get_iso); ud.translation_TransformGroup.setTransform(t3d); ud.xRotation_TransformGroup.setTransform(sv_Axes.get_posY()); ud.yRotation_TransformGroup.setTransform(sv_Axes.get_posY()); end function cb_spinUpCheckbox_ItemStateChangedCallback(callingObj,evt,ud) ud.xRotation_RotationInterpolator.setTransformAxis(sv_Axes.get_negX()); ud.xRotation_RotationInterpolator.setEnable(true); end function cb_stopSpinningUpOrDownCheckbox_ItemStateChangedCallback(callingObj,evt,ud) ud.xRotation_RotationInterpolator.setEnable(false); end function cb_spinDownCheckbox_ItemStateChangedCallback(callingObj,evt,ud) ud.xRotation_RotationInterpolator.setTransformAxis(sv_Axes.get_posX()); ud.xRotation_RotationInterpolator.setEnable(true); end function cb_spinLeftCheckbox_ItemStateChangedCallback(callingObj,evt,ud) ud.yRotation_RotationInterpolator.setTransformAxis(sv_Axes.get_negY()); ud.yRotation_RotationInterpolator.setEnable(true); end function cb_stopSpinningRightOrLeftCheckbox_ItemStateChangedCallback(callingObj,evt,ud) ud.yRotation_RotationInterpolator.setEnable(false); end function cb_spinRightCheckbox_ItemStateChangedCallback(callingObj,evt,ud) ud.yRotation_RotationInterpolator.setTransformAxis(sv_Axes.get_posY()); ud.yRotation_RotationInterpolator.setEnable(true); end