<!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/vtk3DWidget.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 Page</span></a></li> <li><a href="pages.html"><span>Related 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/vtk3DWidget.h</h1><a href="a03649.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: vtk3DWidget.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="l00058"></a>00058 <span class="preprocessor">#ifndef __vtk3DWidget_h</span> <a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define __vtk3DWidget_h</span> <a name="l00060"></a>00060 <span class="preprocessor"></span> <a name="l00061"></a>00061 <span class="preprocessor">#include "<a class="code" href="a03423.html">vtkInteractorObserver.h</a>"</span> <a name="l00062"></a>00062 <a name="l00063"></a>00063 <span class="keyword">class </span><a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>; <a name="l00064"></a>00064 <span class="keyword">class </span><a class="code" href="a01318.html" title="represents an 3D object for placement in a rendered scene">vtkProp3D</a>; <a name="l00065"></a>00065 <a name="l00066"></a><a class="code" href="a00075.html">00066</a> <span class="keyword">class </span><a class="code" href="a02170.html#09e5ba6764f54642494e26907662d55f">VTK_WIDGETS_EXPORT</a> <a class="code" href="a00075.html" title="an abstract superclass for 3D widgets">vtk3DWidget</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="l00067"></a>00067 { <a name="l00068"></a>00068 <span class="keyword">public</span>: <a name="l00069"></a><a class="code" href="a00075.html#aff4a3fdfc5e99c48fb3b90b649bfb32">00069</a> vtkTypeRevisionMacro(<a class="code" href="a00075.html" title="an abstract superclass for 3D widgets">vtk3DWidget</a>,<a class="code" href="a00902.html" title="an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor...">vtkInteractorObserver</a>); <a name="l00070"></a>00070 <span class="keywordtype">void</span> <a class="code" href="a00902.html#a6e7066703c2d629dbb9e7cfa7035fde">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00071"></a>00071 <a name="l00073"></a>00073 <a name="l00080"></a>00080 <span class="keyword">virtual</span> <span class="keywordtype">void</span> PlaceWidget(<span class="keywordtype">double</span> bounds[6]) = 0; <a name="l00081"></a>00081 <span class="keyword">virtual</span> <span class="keywordtype">void</span> PlaceWidget(); <a name="l00082"></a>00082 <span class="keyword">virtual</span> <span class="keywordtype">void</span> PlaceWidget(<span class="keywordtype">double</span> xmin, <span class="keywordtype">double</span> xmax, <span class="keywordtype">double</span> ymin, <span class="keywordtype">double</span> ymax, <a name="l00083"></a>00083 <span class="keywordtype">double</span> zmin, <span class="keywordtype">double</span> zmax); <a name="l00085"></a>00085 <a name="l00087"></a>00087 <a name="l00090"></a>00090 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetProp3D(<a class="code" href="a01318.html" title="represents an 3D object for placement in a rendered scene">vtkProp3D</a>*); <a name="l00091"></a>00091 vtkGetObjectMacro(Prop3D,<a class="code" href="a01318.html" title="represents an 3D object for placement in a rendered scene">vtkProp3D</a>); <a name="l00093"></a>00093 <a name="l00095"></a>00095 <a name="l00098"></a>00098 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetInput(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>*); <a name="l00099"></a>00099 vtkGetObjectMacro(Input,<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>); <a name="l00101"></a>00101 <a name="l00103"></a>00103 <a name="l00109"></a>00109 vtkSetClampMacro(PlaceFactor,<span class="keywordtype">double</span>,0.01,<a class="code" href="a02149.html#a933eb1ff8ef089de59cce7b41e21261">VTK_DOUBLE_MAX</a>); <a name="l00110"></a>00110 vtkGetMacro(PlaceFactor,<span class="keywordtype">double</span>); <a name="l00112"></a>00112 <a name="l00114"></a>00114 <a name="l00118"></a>00118 vtkSetClampMacro(HandleSize,<span class="keywordtype">double</span>,0.001,0.5); <a name="l00119"></a>00119 vtkGetMacro(HandleSize,<span class="keywordtype">double</span>); <a name="l00121"></a>00121 <a name="l00122"></a>00122 <span class="keyword">protected</span>: <a name="l00123"></a>00123 <a class="code" href="a00075.html" title="an abstract superclass for 3D widgets">vtk3DWidget</a>(); <a name="l00124"></a>00124 ~<a class="code" href="a00075.html" title="an abstract superclass for 3D widgets">vtk3DWidget</a>(); <a name="l00125"></a>00125 <a name="l00126"></a>00126 <span class="comment">// Used to position and scale the widget initially</span> <a name="l00127"></a><a class="code" href="a00075.html#f788d466763c503bfb95a1b423ecf967">00127</a> <a class="code" href="a01318.html" title="represents an 3D object for placement in a rendered scene">vtkProp3D</a> *Prop3D; <a name="l00128"></a><a class="code" href="a00075.html#05113e3b9df428bb15774d16cab2bd15">00128</a> <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *Input; <a name="l00129"></a>00129 <a name="l00130"></a>00130 <span class="comment">//has the widget ever been placed</span> <a name="l00131"></a><a class="code" href="a00075.html#4b53002dcff555cea6235a6bf9566cc5">00131</a> <span class="keywordtype">double</span> PlaceFactor; <a name="l00132"></a><a class="code" href="a00075.html#cfcea65160e6e80902cd3e5791474793">00132</a> <span class="keywordtype">int</span> Placed; <a name="l00133"></a>00133 <span class="keywordtype">void</span> AdjustBounds(<span class="keywordtype">double</span> bounds[6], <span class="keywordtype">double</span> newBounds[6], <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2107cf190fdac7e1fa1890c67ec92d414d6">center</a>[3]); <a name="l00134"></a>00134 <a name="l00135"></a>00135 <span class="comment">//control the size of handles (if there are any)</span> <a name="l00136"></a><a class="code" href="a00075.html#42ccccfe7e4d5117e78ae93a0d51cee9">00136</a> <span class="keywordtype">double</span> InitialBounds[6]; <a name="l00137"></a><a class="code" href="a00075.html#b0f15cd9e24a26eef7fc5fc34d1f3491">00137</a> <span class="keywordtype">double</span> InitialLength; <a name="l00138"></a><a class="code" href="a00075.html#eb63ffce983367e33d83752110fcd62f">00138</a> <span class="keywordtype">double</span> HandleSize; <a name="l00139"></a>00139 <span class="keywordtype">double</span> SizeHandles(<span class="keywordtype">double</span> factor); <a name="l00140"></a><a class="code" href="a00075.html#ed3ed18b8949f25b6c115637a3a85ee6">00140</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> SizeHandles() {}<span class="comment">//subclass in turn invokes parent's SizeHandles()</span> <a name="l00141"></a>00141 <a name="l00142"></a>00142 <span class="comment">//used to track the depth of the last pick; also interacts with handle sizing</span> <a name="l00143"></a><a class="code" href="a00075.html#baa5fd81c7318a06a92c3f9055b19a6e">00143</a> <span class="keywordtype">int</span> ValidPick; <a name="l00144"></a><a class="code" href="a00075.html#0371cdaf026e4149fe0156bb9c7aa990">00144</a> <span class="keywordtype">double</span> LastPickPosition[3]; <a name="l00145"></a>00145 <a name="l00146"></a>00146 <span class="keyword">private</span>: <a name="l00147"></a>00147 <a class="code" href="a00075.html" title="an abstract superclass for 3D widgets">vtk3DWidget</a>(<span class="keyword">const</span> <a class="code" href="a00075.html" title="an abstract superclass for 3D widgets">vtk3DWidget</a>&); <span class="comment">// Not implemented.</span> <a name="l00148"></a>00148 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00075.html" title="an abstract superclass for 3D widgets">vtk3DWidget</a>&); <span class="comment">// Not implemented.</span> <a name="l00149"></a>00149 <a name="l00150"></a>00150 }; <a name="l00151"></a>00151 <a name="l00152"></a>00152 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:51 2009 for VTK by <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>