Sophie

Sophie

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

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/Graphics/vtkIconGlyphFilter.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/Graphics/vtkIconGlyphFilter.h</h1><a href="a02575.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: vtkIconGlyphFilter.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="l00032"></a>00032 <span class="preprocessor">#ifndef __vtkIconGlyphFilter_h</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define __vtkIconGlyphFilter_h</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="preprocessor">#include "<a class="code" href="a02331.html">vtkPolyDataAlgorithm.h</a>"</span>
<a name="l00036"></a>00036 
<a name="l00037"></a><a class="code" href="a02575.html#7dfb1bcd25dc9f4278e4f8189469c836">00037</a> <span class="preprocessor">#define VTK_ICON_GRAVITY_TOP_RIGHT     1</span>
<a name="l00038"></a><a class="code" href="a02575.html#e677030a8579b1cbfb3f2cf1f81e7554">00038</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ICON_GRAVITY_TOP_CENTER    2</span>
<a name="l00039"></a><a class="code" href="a02575.html#9bbef624625f64aaf601d06081b8d07b">00039</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ICON_GRAVITY_TOP_LEFT      3</span>
<a name="l00040"></a><a class="code" href="a02575.html#ef8102e34ac626569c5f39844f86af6d">00040</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ICON_GRAVITY_CENTER_RIGHT  4</span>
<a name="l00041"></a><a class="code" href="a02575.html#cefbd617271564e10c3fb0b08ad75b20">00041</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ICON_GRAVITY_CENTER_CENTER 5</span>
<a name="l00042"></a><a class="code" href="a02575.html#2d3f0a278240db0f7b720d82284e369a">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ICON_GRAVITY_CENTER_LEFT   6</span>
<a name="l00043"></a><a class="code" href="a02575.html#0b994f9e8229ff4ef3adf9cd0a1dea5e">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ICON_GRAVITY_BOTTOM_RIGHT  7</span>
<a name="l00044"></a><a class="code" href="a02575.html#c49d80b7e4115346b422de9d48ab4f86">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ICON_GRAVITY_BOTTOM_CENTER 8</span>
<a name="l00045"></a><a class="code" href="a02575.html#7fbdc8ec06d291eb326a382b742fdd6a">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ICON_GRAVITY_BOTTOM_LEFT   9</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span>
<a name="l00047"></a>00047 
<a name="l00048"></a><a class="code" href="a00716.html">00048</a> <span class="keyword">class </span><a class="code" href="a02170.html#c3c1ffe2fe47b9b70ba90182b7860cce">VTK_GRAPHICS_EXPORT</a> <a class="code" href="a00716.html" title="Filter that generates a polydata with texture coordinates corresponding to icons...">vtkIconGlyphFilter</a> : <span class="keyword">public</span> <a class="code" href="a01261.html" title="Superclass for algorithms that produce only polydata as output.">vtkPolyDataAlgorithm</a>
<a name="l00049"></a>00049 {
<a name="l00050"></a>00050 <span class="keyword">public</span>:
<a name="l00051"></a>00051 
<a name="l00053"></a>00053   <span class="keyword">static</span> <a class="code" href="a00716.html" title="Filter that generates a polydata with texture coordinates corresponding to icons...">vtkIconGlyphFilter</a> *<a class="code" href="a01261.html#cf785ac526132296ff652c636f713b5e">New</a>();
<a name="l00054"></a><a class="code" href="a00716.html#096b8742a4e1625d600bff9bd1648ca8">00054</a>   vtkTypeRevisionMacro(<a class="code" href="a00716.html" title="Filter that generates a polydata with texture coordinates corresponding to icons...">vtkIconGlyphFilter</a>,<a class="code" href="a01261.html" title="Superclass for algorithms that produce only polydata as output.">vtkPolyDataAlgorithm</a>);
<a name="l00055"></a>00055   <span class="keywordtype">void</span> <a class="code" href="a01261.html#e6d59a63261b0c56f8f473984ae0e1b6">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00057"></a>00057 
<a name="l00059"></a>00059 
<a name="l00060"></a>00060   vtkSetVector2Macro(IconSize,<span class="keywordtype">int</span>);
<a name="l00061"></a>00061   vtkGetVectorMacro(IconSize,<span class="keywordtype">int</span>,2);
<a name="l00063"></a>00063 
<a name="l00065"></a>00065 
<a name="l00066"></a>00066   vtkSetVector2Macro(IconSheetSize,<span class="keywordtype">int</span>);
<a name="l00067"></a>00067   vtkGetVectorMacro(IconSheetSize,<span class="keywordtype">int</span>,2);
<a name="l00069"></a>00069 
<a name="l00070"></a>00070 
<a name="l00072"></a>00072 
<a name="l00074"></a>00074   <span class="keywordtype">void</span> SetUseIconSize(<span class="keywordtype">bool</span> b);
<a name="l00075"></a>00075   <span class="keywordtype">bool</span> GetUseIconSize();
<a name="l00076"></a>00076   vtkBooleanMacro(UseIconSize, <span class="keywordtype">bool</span>);
<a name="l00078"></a>00078 
<a name="l00080"></a>00080 
<a name="l00084"></a>00084   vtkSetMacro(Gravity, <span class="keywordtype">int</span>);
<a name="l00085"></a>00085   vtkGetMacro(Gravity, <span class="keywordtype">int</span>);
<a name="l00086"></a><a class="code" href="a00716.html#cac948b050ef1d5dcceda3f1f3126a4a">00086</a>   <span class="keywordtype">void</span> SetGravityToTopRight() {this-&gt;SetGravity(<a class="code" href="a02575.html#7dfb1bcd25dc9f4278e4f8189469c836">VTK_ICON_GRAVITY_TOP_RIGHT</a>);};
<a name="l00087"></a><a class="code" href="a00716.html#568a20103d195cdc61cfeaa3dea13b07">00087</a>   <span class="keywordtype">void</span> SetGravityToTopCenter() {this-&gt;SetGravity(<a class="code" href="a02575.html#e677030a8579b1cbfb3f2cf1f81e7554">VTK_ICON_GRAVITY_TOP_CENTER</a>);};
<a name="l00088"></a><a class="code" href="a00716.html#4829a9bc73d13c7304f4754447cb738d">00088</a>   <span class="keywordtype">void</span> SetGravityToTopLeft() {this-&gt;SetGravity(<a class="code" href="a02575.html#9bbef624625f64aaf601d06081b8d07b">VTK_ICON_GRAVITY_TOP_LEFT</a>);};
<a name="l00089"></a><a class="code" href="a00716.html#72024bfec3b8cf01ffc57b08c30c7a66">00089</a>   <span class="keywordtype">void</span> SetGravityToCenterRight() {this-&gt;SetGravity(<a class="code" href="a02575.html#ef8102e34ac626569c5f39844f86af6d">VTK_ICON_GRAVITY_CENTER_RIGHT</a>);};
<a name="l00090"></a><a class="code" href="a00716.html#5eccea771c80a222782e5bc3aaba4354">00090</a>   <span class="keywordtype">void</span> SetGravityToCenterCenter() {this-&gt;SetGravity(<a class="code" href="a02575.html#cefbd617271564e10c3fb0b08ad75b20">VTK_ICON_GRAVITY_CENTER_CENTER</a>);};
<a name="l00091"></a><a class="code" href="a00716.html#03fa405812b0a0f17115ffc0f7874c5f">00091</a>   <span class="keywordtype">void</span> SetGravityToCenterLeft() {this-&gt;SetGravity(<a class="code" href="a02575.html#2d3f0a278240db0f7b720d82284e369a">VTK_ICON_GRAVITY_CENTER_LEFT</a>);};
<a name="l00092"></a><a class="code" href="a00716.html#8b3a92e10e72d1707b3437fb8367a463">00092</a>   <span class="keywordtype">void</span> SetGravityToBottomRight() {this-&gt;SetGravity(<a class="code" href="a02575.html#0b994f9e8229ff4ef3adf9cd0a1dea5e">VTK_ICON_GRAVITY_BOTTOM_RIGHT</a>);};
<a name="l00093"></a><a class="code" href="a00716.html#a647a38ee5db5917d23e9ab96bb9be72">00093</a>   <span class="keywordtype">void</span> SetGravityToBottomCenter() {this-&gt;SetGravity(<a class="code" href="a02575.html#c49d80b7e4115346b422de9d48ab4f86">VTK_ICON_GRAVITY_BOTTOM_CENTER</a>);};
<a name="l00094"></a><a class="code" href="a00716.html#e1fc56d4b8c6bbeeb0bbfd39900ebdda">00094</a>   <span class="keywordtype">void</span> SetGravityToBottomLeft() {this-&gt;SetGravity(<a class="code" href="a02575.html#7fbdc8ec06d291eb326a382b742fdd6a">VTK_ICON_GRAVITY_BOTTOM_LEFT</a>);};
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 <span class="keyword">protected</span>:
<a name="l00098"></a>00098   <a class="code" href="a00716.html" title="Filter that generates a polydata with texture coordinates corresponding to icons...">vtkIconGlyphFilter</a>();
<a name="l00099"></a>00099   ~<a class="code" href="a00716.html" title="Filter that generates a polydata with texture coordinates corresponding to icons...">vtkIconGlyphFilter</a>();
<a name="l00100"></a>00100 
<a name="l00101"></a>00101   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01261.html#6b5a43ab1f9bbcb368c7dc83e4afe068">RequestData</a>(<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a> *,
<a name="l00102"></a>00102                           <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> **,
<a name="l00103"></a>00103                           <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *);
<a name="l00104"></a>00104 
<a name="l00105"></a><a class="code" href="a00716.html#3f325310704ac713304c13fa1b7e69ed">00105</a>   <span class="keywordtype">int</span> IconSize[2]; <span class="comment">// Size in pixels of an icon in an icon sheet</span>
<a name="l00106"></a><a class="code" href="a00716.html#0c9c8282c24e877d2ab05fb2ad5e7888">00106</a>   <span class="keywordtype">int</span> IconSheetSize[2]; <span class="comment">// Size in pixels of the icon sheet</span>
<a name="l00107"></a>00107 
<a name="l00108"></a><a class="code" href="a00716.html#c7fa467ea4326ca80926954dc2152bb1">00108</a>   <span class="keywordtype">int</span> Gravity;
<a name="l00109"></a><a class="code" href="a00716.html#13a4b0aa48fbd60eafb7ae3685e38de7">00109</a>   <span class="keywordtype">bool</span> UseIconSize;
<a name="l00110"></a>00110 
<a name="l00111"></a>00111 <span class="keyword">private</span>:
<a name="l00112"></a>00112   <a class="code" href="a00716.html" title="Filter that generates a polydata with texture coordinates corresponding to icons...">vtkIconGlyphFilter</a>(<span class="keyword">const</span> <a class="code" href="a00716.html" title="Filter that generates a polydata with texture coordinates corresponding to icons...">vtkIconGlyphFilter</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00113"></a>00113   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00716.html" title="Filter that generates a polydata with texture coordinates corresponding to icons...">vtkIconGlyphFilter</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00114"></a>00114 
<a name="l00115"></a>00115   <span class="keywordtype">void</span> IconConvertIndex(<span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keywordtype">int</span> &amp; j, <span class="keywordtype">int</span> &amp; k);
<a name="l00116"></a>00116 };
<a name="l00117"></a>00117 
<a name="l00118"></a>00118 <span class="keyword">inline</span> <span class="keywordtype">void</span> vtkIconGlyphFilter::IconConvertIndex(<span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keywordtype">int</span> &amp; j, <span class="keywordtype">int</span> &amp; k)
<a name="l00119"></a>00119 {
<a name="l00120"></a>00120   <span class="keywordtype">int</span> dimX = this-&gt;<a class="code" href="a00716.html#0c9c8282c24e877d2ab05fb2ad5e7888">IconSheetSize</a>[0]/this-&gt;<a class="code" href="a00716.html#3f325310704ac713304c13fa1b7e69ed">IconSize</a>[0];
<a name="l00121"></a>00121   <span class="keywordtype">int</span> dimY = this-&gt;<a class="code" href="a00716.html#0c9c8282c24e877d2ab05fb2ad5e7888">IconSheetSize</a>[1]/this-&gt;<a class="code" href="a00716.html#3f325310704ac713304c13fa1b7e69ed">IconSize</a>[1];
<a name="l00122"></a>00122 
<a name="l00123"></a>00123   j = <span class="keywordtype">id</span> - dimX * <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(<span class="keywordtype">id</span>/dimX);
<a name="l00124"></a>00124   k = dimY - <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(<span class="keywordtype">id</span>/dimX) - 1;
<a name="l00125"></a>00125 }
<a name="l00126"></a>00126 
<a name="l00127"></a>00127 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:27 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>