CMS 3D CMS Logo

Ig3DVec2fControl.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "Iguana/GLBrowsers/interface/Ig3DVec2fControl.h"
00004 #include "Iguana/GLBrowsers/interface/IgQtRangeControlFloat.h"
00005 #include <classlib/utils/DebugAids.h>
00006 
00007 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00008 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00009 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00010 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00011 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00012 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00013 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00014 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00015 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00016 
00017 Ig3DVec2fControl::Ig3DVec2fControl (IgControlCategory *pane,
00018                                       QString         label,
00019                                       QString         labels /*= "X:Y" */)
00020     : Ig3DVectorBaseControl (pane, label, Vector, 2, labels)
00021 {}
00022 
00026 IgQtRangeControlFloat *
00027 Ig3DVec2fControl::control (void) const
00028 { return control (0); }
00029 
00030 IgQtRangeControlFloat *
00031 Ig3DVec2fControl::xControl (void) const
00032 { return control (0); }
00033 
00034 IgQtRangeControlFloat *
00035 Ig3DVec2fControl::yControl (void) const
00036 { return control (1); }
00037 
00041 float
00042 Ig3DVec2fControl::xValue (void) const
00043 { return xControl ()->value (); }
00044 
00045 float
00046 Ig3DVec2fControl::yValue (void) const
00047 { return yControl ()->value (); }
00048 
00049 SbVec2f
00050 Ig3DVec2fControl::value (void) const
00051 { return SbVec2f (xValue (), yValue ()); }
00052 
00053 void
00054 Ig3DVec2fControl::setValue (const SbVec2f &newval)
00055 { setValues (newval.getValue (), 2); }
00056 
00057 void
00058 Ig3DVec2fControl::setValue (float newx, float newy)
00059 { setValue (SbVec2f (newx, newy)); }
00063 float
00064 Ig3DVec2fControl::xChange (void) const
00065 { return xControl ()->valueChange (); }
00066 
00067 float
00068 Ig3DVec2fControl::yChange (void) const
00069 { return yControl ()->valueChange (); }
00070 
00071 SbVec2f
00072 Ig3DVec2fControl::change (void) const
00073 { return SbVec2f (xChange (), yChange ()); }
00077 SoSFVec2f *
00078 Ig3DVec2fControl::field (void) const
00079 { return static_cast<SoSFVec2f *> (Ig3DFieldControl::field ()); }
00080 
00081 void
00082 Ig3DVec2fControl::setField (SoSFVec2f *field)
00083 { Ig3DFieldControl::setField (field); }
00084 
00085 SbVec2f
00086 Ig3DVec2fControl::fieldValue (void) const
00087 { ASSERT (field ()); return field ()->getValue (); }
00088 
00092 void
00093 Ig3DVec2fControl::updateValue (void)
00094 { setValue (fieldValue ()); }
00095 
00096 void
00097 Ig3DVec2fControl::applyValue (void)
00098 { field ()->setValue (value ()); }

Generated on Tue Jun 9 17:38:37 2009 for CMSSW by  doxygen 1.5.4