Sophie

Sophie

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

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/Rendering/vtkPicker.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/Rendering/vtkPicker.h</h1><a href="a03511.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: vtkPicker.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="l00040"></a>00040 <span class="preprocessor">#ifndef __vtkPicker_h</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define __vtkPicker_h</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span>
<a name="l00043"></a>00043 <span class="preprocessor">#include "<a class="code" href="a03360.html">vtkAbstractPropPicker.h</a>"</span>
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="keyword">class </span><a class="code" href="a00084.html" title="abstract class specifies interface to map 3D data">vtkAbstractMapper3D</a>;
<a name="l00046"></a>00046 <span class="keyword">class </span><a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>;
<a name="l00047"></a>00047 <span class="keyword">class </span><a class="code" href="a01723.html" title="describes linear transformations via a 4x4 matrix">vtkTransform</a>;
<a name="l00048"></a>00048 <span class="keyword">class </span><a class="code" href="a00095.html" title="a list of actors">vtkActorCollection</a>;
<a name="l00049"></a>00049 <span class="keyword">class </span><a class="code" href="a01319.html" title="a list of 3D props">vtkProp3DCollection</a>;
<a name="l00050"></a>00050 <span class="keyword">class </span><a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a>;
<a name="l00051"></a>00051 
<a name="l00052"></a><a class="code" href="a01212.html">00052</a> <span class="keyword">class </span><a class="code" href="a02170.html#4019f67b2e7d601f2cf984e448308dbb">VTK_RENDERING_EXPORT</a> <a class="code" href="a01212.html" title="superclass for 3D geometric pickers (uses ray cast)">vtkPicker</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="l00053"></a>00053 {
<a name="l00054"></a>00054 <span class="keyword">public</span>:
<a name="l00055"></a>00055   <span class="keyword">static</span> <a class="code" href="a01212.html" title="superclass for 3D geometric pickers (uses ray cast)">vtkPicker</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>();
<a name="l00056"></a><a class="code" href="a01212.html#4b2b9aabb9a13751cff9ab6f4889d781">00056</a>   vtkTypeRevisionMacro(<a class="code" href="a01212.html" title="superclass for 3D geometric pickers (uses ray cast)">vtkPicker</a>,<a class="code" href="a00088.html" title="abstract API for pickers that can pick an instance of vtkProp">vtkAbstractPropPicker</a>);
<a name="l00057"></a>00057   <span class="keywordtype">void</span> <a class="code" href="a00088.html#f136efb76670dbf00a158221aceb1cee">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00058"></a>00058 
<a name="l00060"></a>00060 
<a name="l00063"></a>00063   vtkSetMacro(Tolerance,<span class="keywordtype">double</span>);
<a name="l00064"></a>00064   vtkGetMacro(Tolerance,<span class="keywordtype">double</span>);
<a name="l00066"></a>00066 
<a name="l00068"></a>00068 
<a name="l00070"></a>00070   vtkGetVectorMacro(MapperPosition,<span class="keywordtype">double</span>,3);
<a name="l00072"></a>00072 
<a name="l00074"></a>00074 
<a name="l00075"></a>00075   vtkGetObjectMacro(Mapper,<a class="code" href="a00084.html" title="abstract class specifies interface to map 3D data">vtkAbstractMapper3D</a>);
<a name="l00077"></a>00077 
<a name="l00079"></a>00079 
<a name="l00081"></a>00081   vtkGetObjectMacro(DataSet,<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>);
<a name="l00083"></a>00083 
<a name="l00086"></a><a class="code" href="a01212.html#ea9c8966df9b24053b743cf098e51db5">00086</a>   <a class="code" href="a01319.html" title="a list of 3D props">vtkProp3DCollection</a> *GetProp3Ds() {<span class="keywordflow">return</span> this-&gt;Prop3Ds;};
<a name="l00087"></a>00087 
<a name="l00091"></a>00091   <a class="code" href="a00095.html" title="a list of actors">vtkActorCollection</a> *GetActors();
<a name="l00092"></a>00092 
<a name="l00096"></a><a class="code" href="a01212.html#586838872f12fea282d5f2f597995208">00096</a>   <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *GetPickedPositions() {<span class="keywordflow">return</span> this-&gt;PickedPositions;};
<a name="l00097"></a>00097   
<a name="l00099"></a>00099 
<a name="l00103"></a>00103   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00086.html#2a0b3479c5e079d2a22fa59e7af828e7">Pick</a>(<span class="keywordtype">double</span> selectionX, <span class="keywordtype">double</span> selectionY, <span class="keywordtype">double</span> selectionZ, 
<a name="l00104"></a>00104                    <a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a> *renderer);  
<a name="l00106"></a>00106 
<a name="l00108"></a>00108 
<a name="l00112"></a><a class="code" href="a01212.html#2c37e44d7f79f61e9b8e0ad898f56773">00112</a>   <span class="keywordtype">int</span> <a class="code" href="a00086.html#2a0b3479c5e079d2a22fa59e7af828e7">Pick</a>(<span class="keywordtype">double</span> selectionPt[3], <a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a> *ren)
<a name="l00113"></a>00113     {<span class="keywordflow">return</span> this-&gt;<a class="code" href="a00086.html#2a0b3479c5e079d2a22fa59e7af828e7">Pick</a>(selectionPt[0], selectionPt[1], selectionPt[2], ren);};
<a name="l00115"></a>00115       
<a name="l00116"></a>00116 <span class="keyword">protected</span>:
<a name="l00117"></a>00117   <a class="code" href="a01212.html" title="superclass for 3D geometric pickers (uses ray cast)">vtkPicker</a>();
<a name="l00118"></a>00118   ~<a class="code" href="a01212.html" title="superclass for 3D geometric pickers (uses ray cast)">vtkPicker</a>();
<a name="l00119"></a>00119 
<a name="l00120"></a>00120   <span class="keywordtype">void</span> MarkPicked(<a class="code" href="a00143.html" title="a list of nodes that form an assembly path">vtkAssemblyPath</a> *path, <a class="code" href="a01318.html" title="represents an 3D object for placement in a rendered scene">vtkProp3D</a> *p, <a class="code" href="a00084.html" title="abstract class specifies interface to map 3D data">vtkAbstractMapper3D</a> *m, 
<a name="l00121"></a>00121                   <span class="keywordtype">double</span> tMin, <span class="keywordtype">double</span> mapperPos[3]);
<a name="l00122"></a>00122   <span class="keyword">virtual</span> <span class="keywordtype">double</span> IntersectWithLine(<span class="keywordtype">double</span> p1[3], <span class="keywordtype">double</span> p2[3], <span class="keywordtype">double</span> tol, 
<a name="l00123"></a>00123                                   <a class="code" href="a00143.html" title="a list of nodes that form an assembly path">vtkAssemblyPath</a> *path, <a class="code" href="a01318.html" title="represents an 3D object for placement in a rendered scene">vtkProp3D</a> *p, 
<a name="l00124"></a>00124                                   <a class="code" href="a00084.html" title="abstract class specifies interface to map 3D data">vtkAbstractMapper3D</a> *m);
<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 
<a name="l00127"></a><a class="code" href="a01212.html#b0503d6bc38c3dc17f393184e1f2269f">00127</a>   <span class="keywordtype">double</span> Tolerance;  <span class="comment">//tolerance for computation (% of window)</span>
<a name="l00128"></a><a class="code" href="a01212.html#8c1b6b62797dc7ca98a820407680225c">00128</a>   <span class="keywordtype">double</span> MapperPosition[3]; <span class="comment">//selection point in untransformed coordinates</span>
<a name="l00129"></a>00129 
<a name="l00130"></a><a class="code" href="a01212.html#f99d47755678cd3c8dbb2a6430213887">00130</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="l00131"></a><a class="code" href="a01212.html#8bc598eee9db38bd846a6dcbc4e06998">00131</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="l00132"></a>00132 
<a name="l00133"></a><a class="code" href="a01212.html#988dc053fea9f0a38738e9b9d716f4b9">00133</a>   <span class="keywordtype">double</span> GlobalTMin; <span class="comment">//parametric coordinate along pick ray where hit occured</span>
<a name="l00134"></a><a class="code" href="a01212.html#3e45aba078743c2ec5bc5174f08f7325">00134</a>   <a class="code" href="a01723.html" title="describes linear transformations via a 4x4 matrix">vtkTransform</a> *<a class="code" href="a03761.html#88ade42854f67d6297898362e17a515fff3c18ad1157bfb059d04b59dd18eae9">Transform</a>; <span class="comment">//use to perform ray transformation</span>
<a name="l00135"></a><a class="code" href="a01212.html#c2f56fb0491993ab18fd12656a7dcda2">00135</a>   <a class="code" href="a00095.html" title="a list of actors">vtkActorCollection</a> *Actors; <span class="comment">//candidate actors (based on bounding box)</span>
<a name="l00136"></a><a class="code" href="a01212.html#aa6170bdbe9f5a8c3b9e307bf392ae93">00136</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="l00137"></a><a class="code" href="a01212.html#2354d34fd4ec5e9e63b76f402f3997a3">00137</a>   <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *PickedPositions; <span class="comment">// candidate positions</span>
<a name="l00138"></a>00138   
<a name="l00139"></a>00139 <span class="keyword">private</span>:
<a name="l00140"></a>00140   <a class="code" href="a01212.html" title="superclass for 3D geometric pickers (uses ray cast)">vtkPicker</a>(<span class="keyword">const</span> <a class="code" href="a01212.html" title="superclass for 3D geometric pickers (uses ray cast)">vtkPicker</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00141"></a>00141   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01212.html" title="superclass for 3D geometric pickers (uses ray cast)">vtkPicker</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00142"></a>00142 };
<a name="l00143"></a>00143 
<a name="l00144"></a>00144 
<a name="l00145"></a>00145 <span class="preprocessor">#endif</span>
<a name="l00146"></a>00146 <span class="preprocessor"></span>
<a name="l00147"></a>00147 
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:48 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>