Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 60f1dc962abad0f3b492991a4fbef9be > files > 5500

vtk-doc-5.4.2-5mdv2010.0.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>VTK: dox/Widgets/vtkOrientationMarkerWidget.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="classes.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<h1>dox/Widgets/vtkOrientationMarkerWidget.h</h1><a href="a03708.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*=========================================================================</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">  Program:   Visualization Toolkit</span>
<a name="l00004"></a>00004 <span class="comment">  Module:    $RCSfile: vtkOrientationMarkerWidget.h,v $</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span>
<a name="l00007"></a>00007 <span class="comment">  All rights reserved.</span>
<a name="l00008"></a>00008 <span class="comment">  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">     This software is distributed WITHOUT ANY WARRANTY; without even</span>
<a name="l00011"></a>00011 <span class="comment">     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span>
<a name="l00012"></a>00012 <span class="comment">     PURPOSE.  See the above copyright notice for more information.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">=========================================================================*/</span>
<a name="l00074"></a>00074 <span class="preprocessor">#ifndef __vtkOrientationMarkerWidget_h</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#define __vtkOrientationMarkerWidget_h</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span>
<a name="l00077"></a>00077 <span class="preprocessor">#include "<a class="code" href="a03423.html">vtkInteractorObserver.h</a>"</span>
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 <span class="keyword">class </span><a class="code" href="a00093.html" title="a actor that draws 2D data">vtkActor2D</a>;
<a name="l00080"></a>00080 <span class="keyword">class </span><a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a>;
<a name="l00081"></a>00081 <span class="keyword">class </span><a class="code" href="a01317.html" title="abstract superclass for all actors, volumes and annotations">vtkProp</a>;
<a name="l00082"></a>00082 <span class="keyword">class </span>vtkOrientationMarkerWidgetObserver;
<a name="l00083"></a>00083 <span class="keyword">class </span><a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a>;
<a name="l00084"></a>00084 
<a name="l00085"></a><a class="code" href="a01130.html">00085</a> <span class="keyword">class </span><a class="code" href="a02170.html#09e5ba6764f54642494e26907662d55f">VTK_WIDGETS_EXPORT</a> <a class="code" href="a01130.html" title="2D widget for manipulating a marker prop">vtkOrientationMarkerWidget</a> : <span class="keyword">public</span> <a class="code" href="a00902.html" title="an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor...">vtkInteractorObserver</a>
<a name="l00086"></a>00086 {
<a name="l00087"></a>00087 <span class="keyword">public</span>:
<a name="l00088"></a>00088   <span class="keyword">static</span> <a class="code" href="a01130.html" title="2D widget for manipulating a marker prop">vtkOrientationMarkerWidget</a>* <a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>();
<a name="l00089"></a><a class="code" href="a01130.html#59d55f97ee6b28437cf9de2c401a73b8">00089</a>   vtkTypeRevisionMacro(<a class="code" href="a01130.html" title="2D widget for manipulating a marker prop">vtkOrientationMarkerWidget</a>, <a class="code" href="a00902.html" title="an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor...">vtkInteractorObserver</a>);
<a name="l00090"></a>00090   <span class="keywordtype">void</span> <a class="code" href="a00902.html#a6e7066703c2d629dbb9e7cfa7035fde">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00091"></a>00091 
<a name="l00093"></a>00093 
<a name="l00094"></a>00094   <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetOrientationMarker(<a class="code" href="a01317.html" title="abstract superclass for all actors, volumes and annotations">vtkProp</a> *prop);
<a name="l00095"></a>00095   vtkGetObjectMacro(OrientationMarker, <a class="code" href="a01317.html" title="abstract superclass for all actors, volumes and annotations">vtkProp</a>);
<a name="l00097"></a>00097 
<a name="l00099"></a>00099   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00902.html#b43191e675e294441a76efa7e4f884d9">SetEnabled</a>(<span class="keywordtype">int</span>);
<a name="l00100"></a>00100 
<a name="l00103"></a>00103   <span class="keywordtype">void</span> ExecuteCameraUpdateEvent(<a class="code" href="a01084.html" title="abstract base class for most VTK objects">vtkObject</a> *o, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> event, <span class="keywordtype">void</span> *calldata);
<a name="l00104"></a>00104 
<a name="l00106"></a>00106 
<a name="l00108"></a>00108   <span class="keywordtype">void</span> SetInteractive(<span class="keywordtype">int</span> state);
<a name="l00109"></a>00109   vtkGetMacro(Interactive, <span class="keywordtype">int</span>);
<a name="l00110"></a>00110   vtkBooleanMacro(Interactive, <span class="keywordtype">int</span>);
<a name="l00112"></a>00112 
<a name="l00114"></a>00114 
<a name="l00116"></a>00116   <span class="keywordtype">void</span> SetOutlineColor(<span class="keywordtype">double</span> r, <span class="keywordtype">double</span> g, <span class="keywordtype">double</span> b);
<a name="l00117"></a>00117   <span class="keywordtype">double</span> *GetOutlineColor();
<a name="l00119"></a>00119 
<a name="l00121"></a>00121 
<a name="l00122"></a>00122   <span class="keywordtype">void</span> SetViewport(<span class="keywordtype">double</span> minX, <span class="keywordtype">double</span> minY, <span class="keywordtype">double</span> maxX, <span class="keywordtype">double</span> maxY);
<a name="l00123"></a>00123   <span class="keywordtype">double</span>* GetViewport();
<a name="l00125"></a>00125 
<a name="l00127"></a>00127 
<a name="l00130"></a>00130   vtkSetClampMacro(Tolerance,<span class="keywordtype">int</span>,1,10);
<a name="l00131"></a>00131   vtkGetMacro(Tolerance,<span class="keywordtype">int</span>);
<a name="l00133"></a>00133 
<a name="l00134"></a>00134 <span class="keyword">protected</span>:
<a name="l00135"></a>00135   <a class="code" href="a01130.html" title="2D widget for manipulating a marker prop">vtkOrientationMarkerWidget</a>();
<a name="l00136"></a>00136   ~<a class="code" href="a01130.html" title="2D widget for manipulating a marker prop">vtkOrientationMarkerWidget</a>();
<a name="l00137"></a>00137 
<a name="l00138"></a><a class="code" href="a01130.html#9a744f2dfb7b2bcba8b24269007ec04a">00138</a>   <a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a> *Renderer;
<a name="l00139"></a><a class="code" href="a01130.html#d8f67e64229b1faf45663d04ebd580a5">00139</a>   <a class="code" href="a01317.html" title="abstract superclass for all actors, volumes and annotations">vtkProp</a>     *OrientationMarker;
<a name="l00140"></a><a class="code" href="a01130.html#0daf5c3956316f2aa708f9ca72e8e4f2">00140</a>   <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *Outline;
<a name="l00141"></a><a class="code" href="a01130.html#a6fa743997b2a06b8bbd1378c0d6ebae">00141</a>   <a class="code" href="a00093.html" title="a actor that draws 2D data">vtkActor2D</a>  *OutlineActor;
<a name="l00142"></a>00142 
<a name="l00143"></a><a class="code" href="a01130.html#83e86dfe71ad9fa9702f148c673f53d8">00143</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> StartEventObserverId;
<a name="l00144"></a>00144   
<a name="l00145"></a>00145   <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="a00902.html#1b34006a2cc7da4efa585cf81252012e">ProcessEvents</a>(<a class="code" href="a01084.html" title="abstract base class for most VTK objects">vtkObject</a> *<span class="keywordtype">object</span>, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> event,
<a name="l00146"></a>00146                             <span class="keywordtype">void</span> *clientdata, <span class="keywordtype">void</span> *calldata);
<a name="l00147"></a>00147 
<a name="l00148"></a>00148   <span class="comment">// ProcessEvents() dispatches to these methods.</span>
<a name="l00149"></a>00149   <span class="keywordtype">void</span> OnLeftButtonDown();
<a name="l00150"></a>00150   <span class="keywordtype">void</span> OnLeftButtonUp();
<a name="l00151"></a>00151   <span class="keywordtype">void</span> OnMouseMove();
<a name="l00152"></a>00152 
<a name="l00153"></a>00153   <span class="comment">// observer to update the renderer's camera</span>
<a name="l00154"></a><a class="code" href="a01130.html#3bb386489c006d69be7c4286ca9ef23c">00154</a>   vtkOrientationMarkerWidgetObserver *Observer;
<a name="l00155"></a>00155 
<a name="l00156"></a><a class="code" href="a01130.html#b5a04f9d6b054805f43cd0311e8a2627">00156</a>   <span class="keywordtype">int</span> Interactive;
<a name="l00157"></a><a class="code" href="a01130.html#886b544f77a1cb6a8f693f2fbf1cfab3">00157</a>   <span class="keywordtype">int</span> Tolerance;
<a name="l00158"></a><a class="code" href="a01130.html#1b7ac1b8fb3bc071a48a49b1feffcde1">00158</a>   <span class="keywordtype">int</span> Moving;
<a name="l00159"></a>00159 
<a name="l00160"></a>00160   <span class="comment">// used to compute relative movements</span>
<a name="l00161"></a><a class="code" href="a01130.html#b9063a404b10c0446ead2e5a8d95b4d4">00161</a>   <span class="keywordtype">int</span> StartPosition[2];
<a name="l00162"></a>00162 
<a name="l00163"></a>00163 <span class="comment">//BTX - manage the state of the widget</span>
<a name="l00164"></a><a class="code" href="a01130.html#b1feac5362624022684f4580b701db23">00164</a>   <span class="keywordtype">int</span> State;
<a name="l00165"></a><a class="code" href="a01130.html#36d47112b2515ccaab44165e2967dbb4">00165</a>   <span class="keyword">enum</span> <a class="code" href="a01130.html#36d47112b2515ccaab44165e2967dbb4">WidgetState</a>
<a name="l00166"></a>00166   {
<a name="l00167"></a><a class="code" href="a01130.html#36d47112b2515ccaab44165e2967dbb41a9a8f8f98fdfabdc4fe00804ed0386d">00167</a>     Outside = 0,
<a name="l00168"></a><a class="code" href="a01130.html#36d47112b2515ccaab44165e2967dbb4c3d61510a9d9ad83f54a84a13c6977f0">00168</a>     Inside,
<a name="l00169"></a><a class="code" href="a01130.html#36d47112b2515ccaab44165e2967dbb45e4350b739a07eee1be00d802e47eed9">00169</a>     Translating,
<a name="l00170"></a><a class="code" href="a01130.html#36d47112b2515ccaab44165e2967dbb4c6c1764fa2f0bb4b8187cdbefe50fac3">00170</a>     AdjustingP1,
<a name="l00171"></a><a class="code" href="a01130.html#36d47112b2515ccaab44165e2967dbb4d8e451dcaa55bd0f0585321865dad9f4">00171</a>     AdjustingP2,
<a name="l00172"></a><a class="code" href="a01130.html#36d47112b2515ccaab44165e2967dbb438222ac03be1247c3a2783f9e6d9152d">00172</a>     AdjustingP3,
<a name="l00173"></a><a class="code" href="a01130.html#36d47112b2515ccaab44165e2967dbb4e71c990c3dc5ad5a8d491d4db90eea14">00173</a>     AdjustingP4
<a name="l00174"></a>00174   };
<a name="l00175"></a>00175 <span class="comment">//ETX</span>
<a name="l00176"></a>00176 
<a name="l00177"></a>00177 
<a name="l00178"></a>00178   <span class="comment">// use to determine what state the mouse is over, edge1 p1, etc.</span>
<a name="l00179"></a>00179   <span class="comment">// returns a state from the WidgetState enum above</span>
<a name="l00180"></a>00180   <span class="keywordtype">int</span> ComputeStateBasedOnPosition(<span class="keywordtype">int</span> X, <span class="keywordtype">int</span> Y, <span class="keywordtype">int</span> *pos1, <span class="keywordtype">int</span> *pos2);
<a name="l00181"></a>00181 
<a name="l00182"></a>00182   <span class="comment">// set the cursor to the correct shape based on State argument</span>
<a name="l00183"></a>00183   <span class="keywordtype">void</span> SetCursor(<span class="keywordtype">int</span> state);
<a name="l00184"></a>00184 
<a name="l00185"></a>00185   <span class="comment">// adjust the viewport depending on state</span>
<a name="l00186"></a>00186   <span class="keywordtype">void</span> MoveWidget(<span class="keywordtype">int</span> X, <span class="keywordtype">int</span> Y);
<a name="l00187"></a>00187   <span class="keywordtype">void</span> ResizeTopLeft(<span class="keywordtype">int</span> X, <span class="keywordtype">int</span> Y);
<a name="l00188"></a>00188   <span class="keywordtype">void</span> ResizeTopRight(<span class="keywordtype">int</span> X, <span class="keywordtype">int</span> Y);
<a name="l00189"></a>00189   <span class="keywordtype">void</span> ResizeBottomLeft(<span class="keywordtype">int</span> X, <span class="keywordtype">int</span> Y);
<a name="l00190"></a>00190   <span class="keywordtype">void</span> ResizeBottomRight(<span class="keywordtype">int</span> X, <span class="keywordtype">int</span> Y);
<a name="l00191"></a>00191 
<a name="l00192"></a>00192   <span class="keywordtype">void</span> SquareRenderer();
<a name="l00193"></a>00193   <span class="keywordtype">void</span> UpdateOutline();
<a name="l00194"></a>00194 
<a name="l00195"></a>00195 <span class="keyword">private</span>:
<a name="l00196"></a>00196   <a class="code" href="a01130.html" title="2D widget for manipulating a marker prop">vtkOrientationMarkerWidget</a>(<span class="keyword">const</span> <a class="code" href="a01130.html" title="2D widget for manipulating a marker prop">vtkOrientationMarkerWidget</a>&amp;);  <span class="comment">// Not implemented</span>
<a name="l00197"></a>00197   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01130.html" title="2D widget for manipulating a marker prop">vtkOrientationMarkerWidget</a>&amp;);  <span class="comment">// Not implemented</span>
<a name="l00198"></a>00198 };
<a name="l00199"></a>00199 
<a name="l00200"></a>00200 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:54 2009 for VTK by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>