<!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/Rendering/vtkAreaPicker.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/Rendering/vtkAreaPicker.h</h1><a href="a03364.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: vtkAreaPicker.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="l00049"></a>00049 <span class="preprocessor">#ifndef __vtkAreaPicker_h</span> <a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define __vtkAreaPicker_h</span> <a name="l00051"></a>00051 <span class="preprocessor"></span> <a name="l00052"></a>00052 <span class="preprocessor">#include "<a class="code" href="a03360.html">vtkAbstractPropPicker.h</a>"</span> <a name="l00053"></a>00053 <a name="l00054"></a>00054 <span class="keyword">class </span><a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a>; <a name="l00055"></a>00055 <span class="keyword">class </span><a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a>; <a name="l00056"></a>00056 <span class="keyword">class </span><a class="code" href="a01226.html" title="implicit function for convex set of planes">vtkPlanes</a>; <a name="l00057"></a>00057 <span class="keyword">class </span><a class="code" href="a01319.html" title="a list of 3D props">vtkProp3DCollection</a>; <a name="l00058"></a>00058 <span class="keyword">class </span><a class="code" href="a00084.html" title="abstract class specifies interface to map 3D data">vtkAbstractMapper3D</a>; <a name="l00059"></a>00059 <span class="keyword">class </span><a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>; <a name="l00060"></a>00060 <span class="keyword">class </span><a class="code" href="a00513.html" title="Returns the portion of the input dataset that lies within a selection frustum.">vtkExtractSelectedFrustum</a>; <a name="l00061"></a>00061 <span class="keyword">class </span><a class="code" href="a01317.html" title="abstract superclass for all actors, volumes and annotations">vtkProp</a>; <a name="l00062"></a>00062 <span class="keyword">class </span><a class="code" href="a00725.html" title="draw an image (data &amp; properties) in a rendered 3D scene">vtkImageActor</a>; <a name="l00063"></a>00063 <a name="l00064"></a><a class="code" href="a00123.html">00064</a> <span class="keyword">class </span><a class="code" href="a02170.html#4019f67b2e7d601f2cf984e448308dbb">VTK_RENDERING_EXPORT</a> <a class="code" href="a00123.html" title="Picks props behind a selection rectangle on a viewport.">vtkAreaPicker</a> : <span class="keyword">public</span> <a class="code" href="a00088.html" title="abstract API for pickers that can pick an instance of vtkProp">vtkAbstractPropPicker</a> <a name="l00065"></a>00065 { <a name="l00066"></a>00066 <span class="keyword">public</span>: <a name="l00067"></a>00067 <span class="keyword">static</span> <a class="code" href="a00123.html" title="Picks props behind a selection rectangle on a viewport.">vtkAreaPicker</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>(); <a name="l00068"></a><a class="code" href="a00123.html#cd795919f15ed8d41f2e967ccfc281a9">00068</a> vtkTypeRevisionMacro(<a class="code" href="a00123.html" title="Picks props behind a selection rectangle on a viewport.">vtkAreaPicker</a>,<a class="code" href="a00088.html" title="abstract API for pickers that can pick an instance of vtkProp">vtkAbstractPropPicker</a>); <a name="l00069"></a>00069 <span class="keywordtype">void</span> <a class="code" href="a00088.html#f136efb76670dbf00a158221aceb1cee">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00070"></a>00070 <a name="l00072"></a>00072 <span class="keywordtype">void</span> SetPickCoords(<span class="keywordtype">double</span> x0, <span class="keywordtype">double</span> y0, <span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> y1); <a name="l00073"></a>00073 <a name="l00075"></a>00075 <span class="keywordtype">void</span> SetRenderer(<a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a> *); <a name="l00076"></a>00076 <a name="l00078"></a>00078 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00086.html#2a0b3479c5e079d2a22fa59e7af828e7">Pick</a>(); <a name="l00079"></a>00079 <a name="l00084"></a>00084 <span class="keyword">virtual</span> <span class="keywordtype">int</span> AreaPick(<span class="keywordtype">double</span> x0, <span class="keywordtype">double</span> y0, <span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> y1, <a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a> *renderer = NULL); <a name="l00085"></a>00085 <a name="l00087"></a>00087 <a name="l00090"></a><a class="code" href="a00123.html#9055fa048867dc2920114ce8bfec3b38">00090</a> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00086.html#2a0b3479c5e079d2a22fa59e7af828e7">Pick</a>(<span class="keywordtype">double</span> x0, <span class="keywordtype">double</span> y0, <span class="keywordtype">double</span> vtkNotUsed(z0), <a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a> *renderer = NULL) <a name="l00091"></a>00091 {<span class="keywordflow">return</span> this->AreaPick(x0, y0, x0+1.0, y0+1.0, renderer);}; <a name="l00093"></a>00093 <a name="l00095"></a>00095 <a name="l00096"></a>00096 vtkGetObjectMacro(Mapper,<a class="code" href="a00084.html" title="abstract class specifies interface to map 3D data">vtkAbstractMapper3D</a>); <a name="l00098"></a>00098 <a name="l00100"></a>00100 <a name="l00102"></a>00102 vtkGetObjectMacro(DataSet,<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>); <a name="l00104"></a>00104 <a name="l00107"></a><a class="code" href="a00123.html#971931d137754ef37ab214a18422d899">00107</a> <a class="code" href="a01319.html" title="a list of 3D props">vtkProp3DCollection</a> *GetProp3Ds() {<span class="keywordflow">return</span> this->Prop3Ds;}; <a name="l00108"></a>00108 <a name="l00110"></a>00110 <a name="l00113"></a>00113 vtkGetObjectMacro(Frustum, <a class="code" href="a01226.html" title="implicit function for convex set of planes">vtkPlanes</a>); <a name="l00115"></a>00115 <a name="l00117"></a>00117 <a name="l00118"></a>00118 vtkGetObjectMacro(ClipPoints, <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a>); <a name="l00120"></a>00120 <a name="l00121"></a>00121 <span class="keyword">protected</span>: <a name="l00122"></a>00122 <a class="code" href="a00123.html" title="Picks props behind a selection rectangle on a viewport.">vtkAreaPicker</a>(); <a name="l00123"></a>00123 ~<a class="code" href="a00123.html" title="Picks props behind a selection rectangle on a viewport.">vtkAreaPicker</a>(); <a name="l00124"></a>00124 <a name="l00125"></a>00125 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00088.html#15c0e600ad8c7e53a3246c46a5a82391">Initialize</a>(); <a name="l00126"></a>00126 <span class="keywordtype">void</span> DefineFrustum(<span class="keywordtype">double</span> x0, <span class="keywordtype">double</span> y0, <span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> y1, <a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a> *renderer); <a name="l00127"></a>00127 <span class="keyword">virtual</span> <span class="keywordtype">int</span> PickProps(<a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a> *renderer); <a name="l00128"></a>00128 <span class="keywordtype">int</span> TypeDecipher(<a class="code" href="a01317.html" title="abstract superclass for all actors, volumes and annotations">vtkProp</a> *, <a class="code" href="a00725.html" title="draw an image (data &amp; properties) in a rendered 3D scene">vtkImageActor</a> **, <a class="code" href="a00084.html" title="abstract class specifies interface to map 3D data">vtkAbstractMapper3D</a> **); <a name="l00129"></a>00129 <a name="l00130"></a>00130 <span class="keywordtype">int</span> ABoxFrustumIsect(<span class="keywordtype">double</span> bounds[], <span class="keywordtype">double</span> &mindist); <a name="l00131"></a>00131 <a name="l00132"></a><a class="code" href="a00123.html#f270bc7319c3e4d04574fc333b38538c">00132</a> <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *ClipPoints; <a name="l00133"></a><a class="code" href="a00123.html#3883754508a1ca388cfb213b3cfb8cd6">00133</a> <a class="code" href="a01226.html" title="implicit function for convex set of planes">vtkPlanes</a> *Frustum; <a name="l00134"></a>00134 <a name="l00135"></a><a class="code" href="a00123.html#f791612afc80268372b04fb2df03765b">00135</a> <a class="code" href="a01319.html" title="a list of 3D props">vtkProp3DCollection</a> *Prop3Ds; <span class="comment">//candidate actors (based on bounding box)</span> <a name="l00136"></a><a class="code" href="a00123.html#2f21c3f8373c31f7bb5dd7d0402fef92">00136</a> <a class="code" href="a00084.html" title="abstract class specifies interface to map 3D data">vtkAbstractMapper3D</a> *Mapper; <span class="comment">//selected mapper (if the prop has a mapper)</span> <a name="l00137"></a><a class="code" href="a00123.html#70a14c50675e791389fa2ec76d49db2b">00137</a> <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *DataSet; <span class="comment">//selected dataset (if there is one)</span> <a name="l00138"></a>00138 <a name="l00139"></a>00139 <span class="comment">//used internally to do prop intersection tests</span> <a name="l00140"></a><a class="code" href="a00123.html#e8c34fdb29ad2d0027d9d876e56c2e97">00140</a> <a class="code" href="a00513.html" title="Returns the portion of the input dataset that lies within a selection frustum.">vtkExtractSelectedFrustum</a> *FrustumExtractor; <a name="l00141"></a>00141 <a name="l00142"></a><a class="code" href="a00123.html#de6c58df85a7d9db9e9587157395baf6">00142</a> <span class="keywordtype">double</span> X0; <a name="l00143"></a><a class="code" href="a00123.html#555db1885765d3ce26d10c257c6d7ee0">00143</a> <span class="keywordtype">double</span> Y0; <a name="l00144"></a><a class="code" href="a00123.html#c5260281f080d430f9e18ff73c80cc20">00144</a> <span class="keywordtype">double</span> X1; <a name="l00145"></a><a class="code" href="a00123.html#2e1efc5ff0194e3c607d4b0385844d0d">00145</a> <span class="keywordtype">double</span> Y1; <a name="l00146"></a>00146 <a name="l00147"></a>00147 <span class="keyword">private</span>: <a name="l00148"></a>00148 <a class="code" href="a00123.html" title="Picks props behind a selection rectangle on a viewport.">vtkAreaPicker</a>(<span class="keyword">const</span> <a class="code" href="a00123.html" title="Picks props behind a selection rectangle on a viewport.">vtkAreaPicker</a>&); <span class="comment">// Not implemented.</span> <a name="l00149"></a>00149 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00123.html" title="Picks props behind a selection rectangle on a viewport.">vtkAreaPicker</a>&); <span class="comment">// Not implemented.</span> <a name="l00150"></a>00150 }; <a name="l00151"></a>00151 <a name="l00152"></a>00152 <span class="preprocessor">#endif</span> <a name="l00153"></a>00153 <span class="preprocessor"></span> <a name="l00154"></a>00154 </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:45 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>