<!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/vtkBoxRepresentation.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/vtkBoxRepresentation.h</h1><a href="a03666.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: vtkBoxRepresentation.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="l00038"></a>00038 <span class="preprocessor">#ifndef __vtkBoxRepresentation_h</span> <a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define __vtkBoxRepresentation_h</span> <a name="l00040"></a>00040 <span class="preprocessor"></span> <a name="l00041"></a>00041 <span class="preprocessor">#include "<a class="code" href="a03750.html">vtkWidgetRepresentation.h</a>"</span> <a name="l00042"></a>00042 <a name="l00043"></a>00043 <span class="keyword">class </span><a class="code" href="a00092.html" title="represents an object (geometry &amp; properties) in a rendered scene">vtkActor</a>; <a name="l00044"></a>00044 <span class="keyword">class </span><a class="code" href="a01265.html" title="map vtkPolyData to graphics primitives">vtkPolyDataMapper</a>; <a name="l00045"></a>00045 <span class="keyword">class </span><a class="code" href="a00966.html" title="create a line defined by two end points">vtkLineSource</a>; <a name="l00046"></a>00046 <span class="keyword">class </span><a class="code" href="a01582.html" title="create a polygonal sphere centered at the origin">vtkSphereSource</a>; <a name="l00047"></a>00047 <span class="keyword">class </span><a class="code" href="a00251.html" title="select a cell by shooting a ray into graphics window">vtkCellPicker</a>; <a name="l00048"></a>00048 <span class="keyword">class </span><a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a>; <a name="l00049"></a>00049 <span class="keyword">class </span><a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</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 <span class="keyword">class </span><a class="code" href="a01261.html" title="Superclass for algorithms that produce only polydata as output.">vtkPolyDataAlgorithm</a>; <a name="l00052"></a>00052 <span class="keyword">class </span><a class="code" href="a01245.html" title="represent the position of a point in 3D space">vtkPointHandleRepresentation3D</a>; <a name="l00053"></a>00053 <span class="keyword">class </span><a class="code" href="a01723.html" title="describes linear transformations via a 4x4 matrix">vtkTransform</a>; <a name="l00054"></a>00054 <span class="keyword">class </span><a class="code" href="a01226.html" title="implicit function for convex set of planes">vtkPlanes</a>; <a name="l00055"></a>00055 <span class="keyword">class </span><a class="code" href="a00195.html" title="implicit function for a bounding box">vtkBox</a>; <a name="l00056"></a>00056 <span class="keyword">class </span><a class="code" href="a00436.html" title="dynamic, self-adjusting array of double">vtkDoubleArray</a>; <a name="l00057"></a>00057 <span class="keyword">class </span><a class="code" href="a00998.html" title="represent and manipulate 4x4 transformation matrices">vtkMatrix4x4</a>; <a name="l00058"></a>00058 <a name="l00059"></a>00059 <a name="l00060"></a><a class="code" href="a00198.html">00060</a> <span class="keyword">class </span><a class="code" href="a02170.html#09e5ba6764f54642494e26907662d55f">VTK_WIDGETS_EXPORT</a> <a class="code" href="a00198.html" title="a class defining the representation for the vtkBoxWidget2">vtkBoxRepresentation</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="l00061"></a>00061 { <a name="l00062"></a>00062 <span class="keyword">public</span>: <a name="l00064"></a>00064 <span class="keyword">static</span> <a class="code" href="a00198.html" title="a class defining the representation for the vtkBoxWidget2">vtkBoxRepresentation</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>(); <a name="l00065"></a>00065 <a name="l00067"></a>00067 <a name="l00068"></a><a class="code" href="a00198.html#66ef3ec82c8f5b6826cce12002e3069d">00068</a> vtkTypeRevisionMacro(<a class="code" href="a00198.html" title="a class defining the representation for the vtkBoxWidget2">vtkBoxRepresentation</a>,<a class="code" href="a01877.html" title="abstract class defines interface between the widget and widget representation classes...">vtkWidgetRepresentation</a>); <a name="l00069"></a>00069 <span class="keywordtype">void</span> <a class="code" href="a01877.html#dea6d0138ff965f86cac0a91553ad78f">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="l00078"></a>00078 <span class="keywordtype">void</span> GetPlanes(<a class="code" href="a01226.html" title="implicit function for convex set of planes">vtkPlanes</a> *planes); <a name="l00079"></a>00079 <a name="l00081"></a>00081 <a name="l00085"></a>00085 vtkSetMacro(InsideOut,<span class="keywordtype">int</span>); <a name="l00086"></a>00086 vtkGetMacro(InsideOut,<span class="keywordtype">int</span>); <a name="l00087"></a>00087 vtkBooleanMacro(InsideOut,<span class="keywordtype">int</span>); <a name="l00089"></a>00089 <a name="l00095"></a>00095 <span class="keyword">virtual</span> <span class="keywordtype">void</span> GetTransform(<a class="code" href="a01723.html" title="describes linear transformations via a 4x4 matrix">vtkTransform</a> *t); <a name="l00096"></a>00096 <a name="l00101"></a>00101 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetTransform(<a class="code" href="a01723.html" title="describes linear transformations via a 4x4 matrix">vtkTransform</a>* t); <a name="l00102"></a>00102 <a name="l00112"></a>00112 <span class="keywordtype">void</span> GetPolyData(<a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *pd); <a name="l00113"></a>00113 <a name="l00115"></a>00115 <a name="l00117"></a>00117 vtkGetObjectMacro(HandleProperty,<a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a>); <a name="l00118"></a>00118 vtkGetObjectMacro(SelectedHandleProperty,<a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a>); <a name="l00120"></a>00120 <a name="l00122"></a>00122 <a name="l00124"></a>00124 vtkGetObjectMacro(FaceProperty,<a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a>); <a name="l00125"></a>00125 vtkGetObjectMacro(SelectedFaceProperty,<a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a>); <a name="l00127"></a>00127 <a name="l00129"></a>00129 <a name="l00131"></a>00131 vtkGetObjectMacro(OutlineProperty,<a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a>); <a name="l00132"></a>00132 vtkGetObjectMacro(SelectedOutlineProperty,<a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a>); <a name="l00134"></a>00134 <a name="l00136"></a>00136 <a name="l00138"></a>00138 <span class="keywordtype">void</span> SetOutlineFaceWires(<span class="keywordtype">int</span>); <a name="l00139"></a>00139 vtkGetMacro(OutlineFaceWires,<span class="keywordtype">int</span>); <a name="l00140"></a><a class="code" href="a00198.html#5532983d822e58f8b98e04f686fa204c">00140</a> <span class="keywordtype">void</span> OutlineFaceWiresOn() {this->SetOutlineFaceWires(1);} <a name="l00141"></a><a class="code" href="a00198.html#cb9852a3909520b1640d5e6f95229a17">00141</a> <span class="keywordtype">void</span> OutlineFaceWiresOff() {this->SetOutlineFaceWires(0);} <a name="l00143"></a>00143 <a name="l00145"></a>00145 <a name="l00148"></a>00148 <span class="keywordtype">void</span> SetOutlineCursorWires(<span class="keywordtype">int</span>); <a name="l00149"></a>00149 vtkGetMacro(OutlineCursorWires,<span class="keywordtype">int</span>); <a name="l00150"></a><a class="code" href="a00198.html#800f67061f4f2ad2208012d8778911b9">00150</a> <span class="keywordtype">void</span> OutlineCursorWiresOn() {this->SetOutlineCursorWires(1);} <a name="l00151"></a><a class="code" href="a00198.html#1b4141fbc16f85a276529c58f363b6f2">00151</a> <span class="keywordtype">void</span> OutlineCursorWiresOff() {this->SetOutlineCursorWires(0);} <a name="l00153"></a>00153 <a name="l00155"></a>00155 <a name="l00157"></a>00157 <span class="keywordtype">void</span> HandlesOn(); <a name="l00158"></a>00158 <span class="keywordtype">void</span> HandlesOff(); <a name="l00160"></a>00160 <a name="l00162"></a>00162 <a name="l00163"></a>00163 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01877.html#dbe69d604d5e458504229326abeecd3b">PlaceWidget</a>(<span class="keywordtype">double</span> bounds[6]); <a name="l00164"></a>00164 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01877.html#a7dfbf5a2b39487c072266e0e1520ec7">BuildRepresentation</a>(); <a name="l00165"></a>00165 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01877.html#b0aeed71d0331ae3e5c6472572f3900b">ComputeInteractionState</a>(<span class="keywordtype">int</span> X, <span class="keywordtype">int</span> Y, <span class="keywordtype">int</span> modify=0); <a name="l00166"></a>00166 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01877.html#9aece0d7ff74c1fcfd5f427088cab77b">StartWidgetInteraction</a>(<span class="keywordtype">double</span> e[2]); <a name="l00167"></a>00167 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01877.html#73adbf84d1745e1393eda384a5f31d52">WidgetInteraction</a>(<span class="keywordtype">double</span> e[2]); <a name="l00168"></a>00168 <span class="keyword">virtual</span> <span class="keywordtype">double</span> *<a class="code" href="a01877.html#32efe13a1f1627c90bde36414bd9df9a">GetBounds</a>(); <a name="l00170"></a>00170 <a name="l00172"></a>00172 <a name="l00173"></a>00173 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01877.html#a5428644337fcf61013390e6d619ff9f">ReleaseGraphicsResources</a>(<a class="code" href="a01886.html" title="window superclass for vtkRenderWindow">vtkWindow</a>*); <a name="l00174"></a>00174 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01877.html#5db136973bcd6232d212eeb1afcd0354">RenderOpaqueGeometry</a>(<a class="code" href="a01833.html" title="abstract specification for Viewports">vtkViewport</a>*); <a name="l00175"></a>00175 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01877.html#72c591ce53e9320977850735a4057870">RenderTranslucentPolygonalGeometry</a>(<a class="code" href="a01833.html" title="abstract specification for Viewports">vtkViewport</a>*); <a name="l00176"></a>00176 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01877.html#8b7761451b47996f96aacab32882ca25">HasTranslucentPolygonalGeometry</a>(); <a name="l00178"></a>00178 <a name="l00179"></a>00179 <span class="comment">//BTX - used to manage the state of the widget</span> <a name="l00180"></a><a class="code" href="a00198.html#7367efaf5464bef4dde5810171a6f8021148704975b65897c8ca20bd124b801b">00180</a> <span class="keyword">enum</span> {Outside=0,MoveF0,MoveF1,MoveF2,MoveF3,MoveF4,MoveF5,Translating,Rotating,Scaling}; <a name="l00181"></a>00181 <span class="comment">//ETX</span> <a name="l00182"></a>00182 <a name="l00190"></a>00190 <span class="keywordtype">void</span> SetInteractionState(<span class="keywordtype">int</span> state); <a name="l00191"></a>00191 <a name="l00192"></a>00192 <span class="keyword">protected</span>: <a name="l00193"></a>00193 <a class="code" href="a00198.html" title="a class defining the representation for the vtkBoxWidget2">vtkBoxRepresentation</a>(); <a name="l00194"></a>00194 ~<a class="code" href="a00198.html" title="a class defining the representation for the vtkBoxWidget2">vtkBoxRepresentation</a>(); <a name="l00195"></a>00195 <a name="l00196"></a>00196 <span class="comment">// Manage how the representation appears</span> <a name="l00197"></a><a class="code" href="a00198.html#191dbb6a4a437cbb1f3536cd8c5f8246">00197</a> <span class="keywordtype">double</span> LastEventPosition[3]; <a name="l00198"></a>00198 <a name="l00199"></a>00199 <span class="comment">// the hexahedron (6 faces)</span> <a name="l00200"></a><a class="code" href="a00198.html#9615410d2ca08ba43028a951771d5c72">00200</a> <a class="code" href="a00092.html" title="represents an object (geometry &amp; properties) in a rendered scene">vtkActor</a> *HexActor; <a name="l00201"></a><a class="code" href="a00198.html#94c607c72b80318eca3c2e2460deb13b">00201</a> <a class="code" href="a01265.html" title="map vtkPolyData to graphics primitives">vtkPolyDataMapper</a> *HexMapper; <a name="l00202"></a><a class="code" href="a00198.html#8900b45197e4aeaab087bd8e0eac70ac">00202</a> <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *HexPolyData; <a name="l00203"></a><a class="code" href="a00198.html#d547c256afa616ae22b4277d33411111">00203</a> <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *Points; <span class="comment">//used by others as well</span> <a name="l00204"></a><a class="code" href="a00198.html#f1354ef3f9124828fd6ab80cbd9a76f8">00204</a> <span class="keywordtype">double</span> N[6][3]; <span class="comment">//the normals of the faces</span> <a name="l00205"></a>00205 <a name="l00206"></a>00206 <span class="comment">// A face of the hexahedron</span> <a name="l00207"></a><a class="code" href="a00198.html#990c04d9137df5fd89a11cb80fdb5401">00207</a> <a class="code" href="a00092.html" title="represents an object (geometry &amp; properties) in a rendered scene">vtkActor</a> *HexFace; <a name="l00208"></a><a class="code" href="a00198.html#26efb437c7d31b9858d55ab78de14c05">00208</a> <a class="code" href="a01265.html" title="map vtkPolyData to graphics primitives">vtkPolyDataMapper</a> *HexFaceMapper; <a name="l00209"></a><a class="code" href="a00198.html#d586e44972df6919ab016d6a47fe5c34">00209</a> <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *HexFacePolyData; <a name="l00210"></a>00210 <a name="l00211"></a>00211 <span class="comment">// glyphs representing hot spots (e.g., handles)</span> <a name="l00212"></a><a class="code" href="a00198.html#f7c8c19ef4a96a03b571a1d1abdc4802">00212</a> <a class="code" href="a00092.html" title="represents an object (geometry &amp; properties) in a rendered scene">vtkActor</a> **Handle; <a name="l00213"></a><a class="code" href="a00198.html#aaa9054ad90c12f8ba6835ad82549b13">00213</a> <a class="code" href="a01265.html" title="map vtkPolyData to graphics primitives">vtkPolyDataMapper</a> **HandleMapper; <a name="l00214"></a><a class="code" href="a00198.html#71ad98b056e0f1bfdc7db78e0dcdca18">00214</a> <a class="code" href="a01582.html" title="create a polygonal sphere centered at the origin">vtkSphereSource</a> **HandleGeometry; <a name="l00215"></a>00215 <span class="keyword">virtual</span> <span class="keywordtype">void</span> PositionHandles(); <a name="l00216"></a>00216 <span class="keywordtype">int</span> HighlightHandle(<a class="code" href="a01317.html" title="abstract superclass for all actors, volumes and annotations">vtkProp</a> *prop); <span class="comment">//returns cell id</span> <a name="l00217"></a>00217 <span class="keywordtype">void</span> HighlightFace(<span class="keywordtype">int</span> cellId); <a name="l00218"></a>00218 <span class="keywordtype">void</span> HighlightOutline(<span class="keywordtype">int</span> highlight); <a name="l00219"></a>00219 <span class="keywordtype">void</span> ComputeNormals(); <a name="l00220"></a>00220 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SizeHandles(); <a name="l00221"></a>00221 <a name="l00222"></a>00222 <span class="comment">// wireframe outline</span> <a name="l00223"></a><a class="code" href="a00198.html#15a3f52fb5131962ebaa29863da5a172">00223</a> <a class="code" href="a00092.html" title="represents an object (geometry &amp; properties) in a rendered scene">vtkActor</a> *HexOutline; <a name="l00224"></a><a class="code" href="a00198.html#58e1ddceed72bd5acb2038ab5ee9c543">00224</a> <a class="code" href="a01265.html" title="map vtkPolyData to graphics primitives">vtkPolyDataMapper</a> *OutlineMapper; <a name="l00225"></a><a class="code" href="a00198.html#d87c7c8334a186d0f7dfec8090fef7d3">00225</a> <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *OutlinePolyData; <a name="l00226"></a>00226 <a name="l00227"></a>00227 <span class="comment">// Do the picking</span> <a name="l00228"></a><a class="code" href="a00198.html#aea1d606c4ce589f2ecfd35097f672fc">00228</a> <a class="code" href="a00251.html" title="select a cell by shooting a ray into graphics window">vtkCellPicker</a> *HandlePicker; <a name="l00229"></a><a class="code" href="a00198.html#ef46fc46a0ee6807f38e44ad217101e6">00229</a> <a class="code" href="a00251.html" title="select a cell by shooting a ray into graphics window">vtkCellPicker</a> *HexPicker; <a name="l00230"></a><a class="code" href="a00198.html#31666f8649667b45a5734d5d9946ad99">00230</a> <a class="code" href="a00092.html" title="represents an object (geometry &amp; properties) in a rendered scene">vtkActor</a> *CurrentHandle; <a name="l00231"></a><a class="code" href="a00198.html#96b7cbf87846f2f4221837d0a6c2d76e">00231</a> <span class="keywordtype">int</span> CurrentHexFace; <a name="l00232"></a><a class="code" href="a00198.html#6ee5b9de8a9ed26885c93bb5b6c92096">00232</a> <a class="code" href="a00251.html" title="select a cell by shooting a ray into graphics window">vtkCellPicker</a> *LastPicker; <a name="l00233"></a>00233 <a name="l00234"></a>00234 <span class="comment">// Transform the hexahedral points (used for rotations)</span> <a name="l00235"></a><a class="code" href="a00198.html#b1f34aac10d3f9f27c7f48a202f5b72b">00235</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>; <a name="l00236"></a>00236 <a name="l00237"></a>00237 <span class="comment">// Support GetBounds() method</span> <a name="l00238"></a><a class="code" href="a00198.html#7a4e956a59cc35d6cad1f09253eb4a8f">00238</a> <a class="code" href="a00195.html" title="implicit function for a bounding box">vtkBox</a> *BoundingBox; <a name="l00239"></a>00239 <a name="l00240"></a>00240 <span class="comment">// Properties used to control the appearance of selected objects and</span> <a name="l00241"></a>00241 <span class="comment">// the manipulator in general.</span> <a name="l00242"></a><a class="code" href="a00198.html#3e43fb31f0dc26058dc0301be7c0953e">00242</a> <a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a> *HandleProperty; <a name="l00243"></a><a class="code" href="a00198.html#8f969816a4c35c5409c834d5e49813a2">00243</a> <a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a> *SelectedHandleProperty; <a name="l00244"></a><a class="code" href="a00198.html#2df576a6a5c63d47f19a1c67897e4d3b">00244</a> <a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a> *FaceProperty; <a name="l00245"></a><a class="code" href="a00198.html#81e6c515e23691b8215e65296feb3007">00245</a> <a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a> *SelectedFaceProperty; <a name="l00246"></a><a class="code" href="a00198.html#163d117ee11d32317627834185786d14">00246</a> <a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a> *OutlineProperty; <a name="l00247"></a><a class="code" href="a00198.html#7e85a989e6767fd22251f20806e934f6">00247</a> <a class="code" href="a01322.html" title="represent surface properties of a geometric object">vtkProperty</a> *SelectedOutlineProperty; <a name="l00248"></a>00248 <span class="keywordtype">void</span> CreateDefaultProperties(); <a name="l00249"></a>00249 <a name="l00250"></a>00250 <span class="comment">// Control the orientation of the normals</span> <a name="l00251"></a><a class="code" href="a00198.html#dc1e9ac73887d8b5306ecc84db33f2d8">00251</a> <span class="keywordtype">int</span> InsideOut; <a name="l00252"></a><a class="code" href="a00198.html#a21df067c28fda41f8ab11017b1f2ba1">00252</a> <span class="keywordtype">int</span> OutlineFaceWires; <a name="l00253"></a><a class="code" href="a00198.html#7214ffcb86f0119241d8b0656ccb1efb">00253</a> <span class="keywordtype">int</span> OutlineCursorWires; <a name="l00254"></a>00254 <span class="keywordtype">void</span> GenerateOutline(); <a name="l00255"></a>00255 <a name="l00256"></a>00256 <span class="comment">// Helper methods</span> <a name="l00257"></a>00257 <span class="keyword">virtual</span> <span class="keywordtype">void</span> Translate(<span class="keywordtype">double</span> *p1, <span class="keywordtype">double</span> *p2); <a name="l00258"></a>00258 <span class="keyword">virtual</span> <span class="keywordtype">void</span> Scale(<span class="keywordtype">double</span> *p1, <span class="keywordtype">double</span> *p2, <span class="keywordtype">int</span> X, <span class="keywordtype">int</span> Y); <a name="l00259"></a>00259 <span class="keyword">virtual</span> <span class="keywordtype">void</span> Rotate(<span class="keywordtype">int</span> X, <span class="keywordtype">int</span> Y, <span class="keywordtype">double</span> *p1, <span class="keywordtype">double</span> *p2, <span class="keywordtype">double</span> *vpn); <a name="l00260"></a>00260 <span class="keywordtype">void</span> MovePlusXFace(<span class="keywordtype">double</span> *p1, <span class="keywordtype">double</span> *p2); <a name="l00261"></a>00261 <span class="keywordtype">void</span> MoveMinusXFace(<span class="keywordtype">double</span> *p1, <span class="keywordtype">double</span> *p2); <a name="l00262"></a>00262 <span class="keywordtype">void</span> MovePlusYFace(<span class="keywordtype">double</span> *p1, <span class="keywordtype">double</span> *p2); <a name="l00263"></a>00263 <span class="keywordtype">void</span> MoveMinusYFace(<span class="keywordtype">double</span> *p1, <span class="keywordtype">double</span> *p2); <a name="l00264"></a>00264 <span class="keywordtype">void</span> MovePlusZFace(<span class="keywordtype">double</span> *p1, <span class="keywordtype">double</span> *p2); <a name="l00265"></a>00265 <span class="keywordtype">void</span> MoveMinusZFace(<span class="keywordtype">double</span> *p1, <span class="keywordtype">double</span> *p2); <a name="l00266"></a>00266 <a name="l00267"></a>00267 <span class="comment">// Internal ivars for performance</span> <a name="l00268"></a><a class="code" href="a00198.html#ccf2572e0688c0d81983d1c17654363d">00268</a> <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *PlanePoints; <a name="l00269"></a><a class="code" href="a00198.html#7b1822e2154831256ff7a2ee5abd1b07">00269</a> <a class="code" href="a00436.html" title="dynamic, self-adjusting array of double">vtkDoubleArray</a> *PlaneNormals; <a name="l00270"></a><a class="code" href="a00198.html#aca48455f7841cc857cc2cbd369ad7bb">00270</a> <a class="code" href="a00998.html" title="represent and manipulate 4x4 transformation matrices">vtkMatrix4x4</a> *Matrix; <a name="l00271"></a>00271 <a name="l00272"></a>00272 <span class="comment">//"dir" is the direction in which the face can be moved i.e. the axis passing</span> <a name="l00273"></a>00273 <span class="comment">//through the center</span> <a name="l00274"></a>00274 <span class="keywordtype">void</span> MoveFace(<span class="keywordtype">double</span> *p1, <span class="keywordtype">double</span> *p2, <span class="keywordtype">double</span> *<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210652910e0524bce5b8ec2644cad351b81">dir</a>, <a name="l00275"></a>00275 <span class="keywordtype">double</span> *x1, <span class="keywordtype">double</span> *x2, <span class="keywordtype">double</span> *x3, <span class="keywordtype">double</span> *x4, <a name="l00276"></a>00276 <span class="keywordtype">double</span> *x5); <a name="l00277"></a>00277 <span class="comment">//Helper method to obtain the direction in which the face is to be moved.</span> <a name="l00278"></a>00278 <span class="comment">//Handles special cases where some of the scale factors are 0.</span> <a name="l00279"></a>00279 <span class="keywordtype">void</span> GetDirection(<span class="keyword">const</span> <span class="keywordtype">double</span> Nx[3],<span class="keyword">const</span> <span class="keywordtype">double</span> Ny[3], <a name="l00280"></a>00280 <span class="keyword">const</span> <span class="keywordtype">double</span> Nz[3], <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210652910e0524bce5b8ec2644cad351b81">dir</a>[3]); <a name="l00281"></a>00281 <a name="l00282"></a>00282 <a name="l00283"></a>00283 <span class="keyword">private</span>: <a name="l00284"></a>00284 <a class="code" href="a00198.html" title="a class defining the representation for the vtkBoxWidget2">vtkBoxRepresentation</a>(<span class="keyword">const</span> <a class="code" href="a00198.html" title="a class defining the representation for the vtkBoxWidget2">vtkBoxRepresentation</a>&); <span class="comment">//Not implemented</span> <a name="l00285"></a>00285 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00198.html" title="a class defining the representation for the vtkBoxWidget2">vtkBoxRepresentation</a>&); <span class="comment">//Not implemented</span> <a name="l00286"></a>00286 }; <a name="l00287"></a>00287 <a name="l00288"></a>00288 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:52 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>