<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:411589713;
mso-list-type:hybrid;
mso-list-template-ids:210557060 1027908180 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve created a pipeline to try and do “collision detection” for use with copy/paste using vtkIntersectionPolyDataFilter. Basically, I get a set of bounding boxes for objects already in the scene and then another set for the objects being
pasted. Then I move the position of the pasted objects around, recalculate the bounding boxes, and test for intersection until it fails.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The pipeline is like this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">CubeSource(1..n) -> appendfilter -> geometry filter -> trianglefilter -intersectfilter<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">2 pipelines, one for objects already in scene, one for objects being pasted.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have several problems:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">vtkIntersectionPolyDataFilter crashes sometimes when there are multiple objects in the scene or being pasted. It might be a known bug related to
<a href="https://gitlab.kitware.com/vtk/vtk/commit/eb975a3742de5aa5592fbb7ba2dd4726c9a51313">
https://gitlab.kitware.com/vtk/vtk/commit/eb975a3742de5aa5592fbb7ba2dd4726c9a51313</a><o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">vtkIntersectionPolyDataFilter does not handle the case where one object is inside of the other (no intersection occurs)<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">I tried to work around this bug by testing each bounding box separately. So I assign the cubesources one at a time to the appendfilter. When I do this, I get a message, “Can’t build
OBB tree, no data available”, followed by a crash in vtkOBBTree::DisjointOBBNodes. (“nodeA was nullPtr”)<o:p></o:p></li></ul>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Other than an any general advice anyone can give me, can anyone explain the third item? If I assign the cubesources as I build the pipeline, it works correctly. But if I assign them after the pipeline is built, it crashes…why? There is
something fundamental I am not understanding about the pipeline.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here is my messy test code… commenting and uncommenting the two indicated lines makes the crash come and go…<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkIntersectionPolyDataFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
intersectFilter = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkIntersectionPolyDataFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkAppendFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
appendFilter = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkAppendFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">// get bounding box of all existing actors</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> std::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vector</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><std::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vector</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>>
bboxes;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> std::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vector</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkCubeSource</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>>
cubes;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> bounds[6];<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> maxBounds[3] = {0};<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">for</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">const</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">auto</span><span style="font-size:9.5pt;font-family:Consolas;color:black">& object : doc</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">getChildren())
{<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">auto</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> actor =
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkProp3D</span><span style="font-size:9.5pt;font-family:Consolas;color:black">::SafeDownCast(Core::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">Application</span><span style="font-size:9.5pt;font-family:Consolas;color:black">::get()->getContext().getActorForPart(object));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">if</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (actor->GetPickable()) {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> origin[3];<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> actor->GetOrigin(origin);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> actor->GetBounds(bounds);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">if</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (bounds[1] > maxBounds[0]) {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> maxBounds[0] = bounds[1];<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">if</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (bounds[3] > maxBounds[1]) {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> maxBounds[1] = bounds[3];<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">if</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (bounds[5] > maxBounds[2]) {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> maxBounds[2] = bounds[5];<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> std::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vector</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
values = {bounds[0], bounds[1], bounds[2], bounds[3], bounds[4], bounds[5], bounds[6]};<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> bboxes.push_back(values);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkCubeSource</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
cube = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkCubeSource</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> cube</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetBounds(bounds);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> cube</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> cubes.push_back(cube);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> appendFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">AddInputConnection(cube</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetOutputPort());
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">// <---- works if I add connections here.</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkGeometryFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
geometryFilter = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkGeometryFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> geometryFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetInputConnection(appendFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetOutputPort());<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkTriangleFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
triFilter = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkTriangleFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> triFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetInputConnection(geometryFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetOutputPort(0));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> intersectFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetInputConnection(0,
triFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetOutputPort());<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">// get bounding box of all objects</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> std::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vector</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkCubeSource</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>>
pasteObjectBounds;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkAppendFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
pastedObjAppendFilter = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkAppendFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">for</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">const</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">auto</span><span style="font-size:9.5pt;font-family:Consolas;color:black">& object : _copyPasteBuffer) {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkPolyData</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
polyData = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkPolyData</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> polyData</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">ShallowCopy(object</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">data());<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> polyData</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">ComputeBounds();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> polyData</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetBounds(bounds);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkCubeSource</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
cube = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkCubeSource</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">auto</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> layout = object</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">layout();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">auto</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> x = layout._matrix</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetElement(0,
3);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">auto</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> y = layout._matrix</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetElement(1,
3);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> cube</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetBounds(bounds);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> cube</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetCenter(x,
y, 0);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> cube</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pastedObjAppendFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">AddInputConnection(cube</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetOutputPort());<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pasteObjectBounds.push_back(cube);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pastedObjAppendFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkGeometryFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
pastedObjGeometryFilter = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkGeometryFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pastedObjGeometryFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetInputConnection(pastedObjAppendFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetOutputPort());<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pastedObjGeometryFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkTriangleFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
pasteTriFilter = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkTriangleFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pasteTriFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetInputConnection(pastedObjGeometryFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetOutputPort(0));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pasteTriFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkCleanPolyData</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
pasteCleanData = </span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkCleanPolyData</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pasteCleanData</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetInputConnection(pasteTriFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetOutputPort());<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pasteCleanData</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> intersectFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetInputConnection(1,
pasteCleanData</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetOutputPort());<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">bool</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> foundASpot =
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">false</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">auto</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> polyData =
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkPolyData</span><span style="font-size:9.5pt;font-family:Consolas;color:black">::SafeDownCast(pastedObjGeometryFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetOutputDataObject(0));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> polyData->ComputeBounds();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> polyData->GetBounds(bounds);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> p1[3] = {bounds[0], bounds[2], 0};<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> p2[3] = {bounds[1], bounds[3], 0};<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> length = sqrt(</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">vtkMath</span><span style="font-size:9.5pt;font-family:Consolas;color:black">::Distance2BetweenPoints(p1,
p2));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> step = length / 4.0;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> radius = 0;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">while</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (!foundASpot) {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">for</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">int</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
ii = 0; ii < 6 && !foundASpot; ii++) {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> angle = 45 * ii;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> x = radius * sin(angle);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> y = radius * cos(angle);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">for</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">auto</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
cube : pasteObjectBounds) {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> center[3];<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> cube</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetCenter(center);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> center[0] += x;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> center[1] += y;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> cube</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetCenter(center);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> cube</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> cube</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Modified();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">// check for intersection.</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> foundASpot =
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">true</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">for</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">auto</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
cube : cubes) {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">//appendFilter->SetInputConnection(cube->GetOutputPort());// <----fails if I set input connection here.</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> appendFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> appendFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Modified();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> geometryFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> geometryFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Modified();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> triFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> triFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Modified();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> intersectFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">if</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (intersectFilter</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetNumberOfIntersectionPoints())
{<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> foundASpot =
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">false</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">if</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (!foundASpot) {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">for</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">auto</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
pasteCubes : pasteObjectBounds) {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">double</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> center[3];<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pasteCubes</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetCenter(center);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> center[0] -= x;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> center[1] -= y;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pasteCubes</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetCenter(center);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pasteCubes</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> pasteCubes</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">Modified();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">else</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">// found a spot!</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> foundASpot =
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">true</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> maxBounds[0] = x;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> maxBounds[1] = y;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"> radius += step;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black"> }</span><o:p></o:p></p>
<p class="MsoListParagraph"><o:p> </o:p></p>
</div>
CONFIDENTIALITY NOTICE:This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message
and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited
</body>
</html>