Sophie

Sophie

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

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/vtkHandleRepresentation.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/vtkHandleRepresentation.h</h1><a href="a03692.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: vtkHandleRepresentation.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="l00047"></a>00047 <span class="preprocessor">#ifndef __vtkHandleRepresentation_h</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define __vtkHandleRepresentation_h</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span>
<a name="l00050"></a>00050 <span class="preprocessor">#include "<a class="code" href="a03750.html">vtkWidgetRepresentation.h</a>"</span>
<a name="l00051"></a>00051 
<a name="l00052"></a>00052 <span class="keyword">class </span><a class="code" href="a00335.html" title="perform coordinate transformation, and represent position, in a variety of vtk coordinate...">vtkCoordinate</a>;
<a name="l00053"></a>00053 <span class="keyword">class </span><a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a>;
<a name="l00054"></a>00054 <span class="keyword">class </span><a class="code" href="a01249.html" title="Abstract interface to translate 2D display positions to world coordinates.">vtkPointPlacer</a>;
<a name="l00055"></a>00055 
<a name="l00056"></a><a class="code" href="a00678.html">00056</a> <span class="keyword">class </span><a class="code" href="a02170.html#09e5ba6764f54642494e26907662d55f">VTK_WIDGETS_EXPORT</a> <a class="code" href="a00678.html" title="abstract class for representing widget handles">vtkHandleRepresentation</a> : <span class="keyword">public</span> <a class="code" href="a01877.html" title="abstract class defines interface between the widget and widget representation classes...">vtkWidgetRepresentation</a>
<a name="l00057"></a>00057 {
<a name="l00058"></a>00058 <span class="keyword">public</span>:
<a name="l00060"></a>00060 
<a name="l00061"></a><a class="code" href="a00678.html#538553961a5ec1ce8faa1b6c7f02c37b">00061</a>   vtkTypeRevisionMacro(<a class="code" href="a00678.html" title="abstract class for representing widget handles">vtkHandleRepresentation</a>,<a class="code" href="a01877.html" title="abstract class defines interface between the widget and widget representation classes...">vtkWidgetRepresentation</a>);
<a name="l00062"></a>00062   <span class="keywordtype">void</span> <a class="code" href="a01877.html#dea6d0138ff965f86cac0a91553ad78f">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00064"></a>00064 
<a name="l00066"></a>00066 
<a name="l00072"></a>00072   <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetDisplayPosition(<span class="keywordtype">double</span> pos[3]);
<a name="l00073"></a>00073   <span class="keyword">virtual</span> <span class="keywordtype">void</span> GetDisplayPosition(<span class="keywordtype">double</span> pos[3]);
<a name="l00074"></a>00074   <span class="keyword">virtual</span> <span class="keywordtype">double</span>* GetDisplayPosition();
<a name="l00075"></a>00075   <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetWorldPosition(<span class="keywordtype">double</span> pos[3]);
<a name="l00076"></a>00076   <span class="keyword">virtual</span> <span class="keywordtype">void</span> GetWorldPosition(<span class="keywordtype">double</span> pos[3]);
<a name="l00077"></a>00077   <span class="keyword">virtual</span> <span class="keywordtype">double</span>* GetWorldPosition();
<a name="l00079"></a>00079 
<a name="l00081"></a>00081 
<a name="l00084"></a>00084   vtkSetClampMacro(Tolerance,<span class="keywordtype">int</span>,1,100);
<a name="l00085"></a>00085   vtkGetMacro(Tolerance,<span class="keywordtype">int</span>);
<a name="l00087"></a>00087 
<a name="l00089"></a>00089 
<a name="l00093"></a>00093   vtkSetMacro(ActiveRepresentation,<span class="keywordtype">int</span>);
<a name="l00094"></a>00094   vtkGetMacro(ActiveRepresentation,<span class="keywordtype">int</span>);
<a name="l00095"></a>00095   vtkBooleanMacro(ActiveRepresentation,<span class="keywordtype">int</span>);
<a name="l00097"></a>00097 
<a name="l00098"></a>00098 <span class="comment">//BTX</span>
<a name="l00099"></a>00099   <span class="comment">// Enums define the state of the representation relative to the mouse pointer</span>
<a name="l00100"></a>00100   <span class="comment">// position. Used by ComputeInteractionState() to communicate with the</span>
<a name="l00101"></a>00101   <span class="comment">// widget. Note that ComputeInteractionState() and several other methods</span>
<a name="l00102"></a>00102   <span class="comment">// must be implemented by subclasses.</span>
<a name="l00103"></a><a class="code" href="a00678.html#59d654e4ed56b72fcfd86fe69f90c6b375900d69cdf0c1722694d9fcef8a2bf7">00103</a>   <span class="keyword">enum</span> <a class="code" href="a00678.html#59d654e4ed56b72fcfd86fe69f90c6b3">_InteractionState</a> { Outside=0, Nearby, Selecting, Translating, Scaling };
<a name="l00104"></a>00104 <span class="comment">//ETX</span>
<a name="l00105"></a>00105   
<a name="l00107"></a>00107 
<a name="l00114"></a>00114   vtkSetClampMacro(InteractionState,<span class="keywordtype">int</span>,Outside,Scaling);
<a name="l00116"></a>00116 
<a name="l00118"></a>00118 
<a name="l00121"></a>00121   vtkSetMacro(Constrained,<span class="keywordtype">int</span>);
<a name="l00122"></a>00122   vtkGetMacro(Constrained,<span class="keywordtype">int</span>);
<a name="l00123"></a>00123   vtkBooleanMacro(Constrained,<span class="keywordtype">int</span>);
<a name="l00125"></a>00125 
<a name="l00130"></a>00130   <span class="keyword">virtual</span> <span class="keywordtype">int</span> CheckConstraint(<a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a> *renderer, <span class="keywordtype">double</span> pos[2]);
<a name="l00131"></a>00131   
<a name="l00133"></a>00133 
<a name="l00135"></a>00135   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01877.html#2ec3e96cd34a4c804aa62889894aae1e">ShallowCopy</a>(<a class="code" href="a01317.html" title="abstract superclass for all actors, volumes and annotations">vtkProp</a> *prop);
<a name="l00136"></a>00136   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01877.html#5154e053614a4f996c64e522abb6cbb8">SetRenderer</a>(<a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a> *ren);
<a name="l00138"></a>00138 
<a name="l00141"></a>00141   <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a01084.html#8137c0551b29bb996f0dd2f886bcd2da">GetMTime</a>();
<a name="l00142"></a>00142 
<a name="l00144"></a>00144 
<a name="l00151"></a>00151   <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetPointPlacer ( <a class="code" href="a01249.html" title="Abstract interface to translate 2D display positions to world coordinates.">vtkPointPlacer</a> * );
<a name="l00152"></a>00152   vtkGetObjectMacro( PointPlacer, <a class="code" href="a01249.html" title="Abstract interface to translate 2D display positions to world coordinates.">vtkPointPlacer</a> );
<a name="l00154"></a>00154 
<a name="l00155"></a>00155 <span class="keyword">protected</span>:
<a name="l00156"></a>00156   <a class="code" href="a00678.html" title="abstract class for representing widget handles">vtkHandleRepresentation</a>();
<a name="l00157"></a>00157   ~<a class="code" href="a00678.html" title="abstract class for representing widget handles">vtkHandleRepresentation</a>();
<a name="l00158"></a>00158 
<a name="l00159"></a><a class="code" href="a00678.html#b8569db9d2c52e9f2d07bef5e477c84e">00159</a>   <span class="keywordtype">int</span> Tolerance;
<a name="l00160"></a><a class="code" href="a00678.html#a46b663db8016a0c188679cc154a22d4">00160</a>   <span class="keywordtype">int</span> ActiveRepresentation;
<a name="l00161"></a><a class="code" href="a00678.html#19aaa7cd7389cf619749bebe566e45cb">00161</a>   <span class="keywordtype">int</span> Constrained;
<a name="l00162"></a>00162   
<a name="l00163"></a>00163   <span class="comment">// Two vtkCoordinates are available to subclasses, one in display</span>
<a name="l00164"></a>00164   <span class="comment">// coordinates and the other in world coordinates. These facilitate</span>
<a name="l00165"></a>00165   <span class="comment">// the conversion between these two systems. Note that the WorldPosition</span>
<a name="l00166"></a>00166   <span class="comment">// is the ultimate maintainer of position.</span>
<a name="l00167"></a><a class="code" href="a00678.html#a334327d0a25035434793d9f3f903796">00167</a>   <a class="code" href="a00335.html" title="perform coordinate transformation, and represent position, in a variety of vtk coordinate...">vtkCoordinate</a> *DisplayPosition;
<a name="l00168"></a><a class="code" href="a00678.html#e39c2f15b90cc3faafc4bf5786f07eaf">00168</a>   <a class="code" href="a00335.html" title="perform coordinate transformation, and represent position, in a variety of vtk coordinate...">vtkCoordinate</a> *WorldPosition;
<a name="l00169"></a>00169   
<a name="l00170"></a>00170   <span class="comment">// Keep track of when coordinates were changed</span>
<a name="l00171"></a><a class="code" href="a00678.html#933499f852fdfbd0c0c5653474f5589d">00171</a>   <a class="code" href="a01719.html" title="record modification and/or execution time">vtkTimeStamp</a> DisplayPositionTime;
<a name="l00172"></a><a class="code" href="a00678.html#516d27f79140c8f1d20deeb625e0ae6d">00172</a>   <a class="code" href="a01719.html" title="record modification and/or execution time">vtkTimeStamp</a> WorldPositionTime;
<a name="l00173"></a>00173 
<a name="l00174"></a>00174   <span class="comment">// Constrain the placement of handles.</span>
<a name="l00175"></a><a class="code" href="a00678.html#73b37bdcdb28e0989386925f74459a32">00175</a>   <a class="code" href="a01249.html" title="Abstract interface to translate 2D display positions to world coordinates.">vtkPointPlacer</a> * PointPlacer;
<a name="l00176"></a>00176 
<a name="l00177"></a>00177 <span class="keyword">private</span>:
<a name="l00178"></a>00178   <a class="code" href="a00678.html" title="abstract class for representing widget handles">vtkHandleRepresentation</a>(<span class="keyword">const</span> <a class="code" href="a00678.html" title="abstract class for representing widget handles">vtkHandleRepresentation</a>&amp;);  <span class="comment">//Not implemented</span>
<a name="l00179"></a>00179   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00678.html" title="abstract class for representing widget handles">vtkHandleRepresentation</a>&amp;);  <span class="comment">//Not implemented</span>
<a name="l00180"></a>00180 };
<a name="l00181"></a>00181 
<a name="l00182"></a>00182 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:53 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>