<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><div id="m_7012321195461628218yahoo_quoted_3561042944" class="m_7012321195461628218yahoo_quoted"><div style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;color:#26282a"><div><div class="h5"><div>On Tuesday, April 10, 2018, 2:05:15 PM GMT+12, Jesse Kinross-Smith <<a href="mailto:Jesse.Kinross-Smith@bentley.com" target="_blank">Jesse.Kinross-Smith@bentley.<wbr>com</a>> wrote:</div>
                    <div><br></div>
                    </div></div><div><div><div class="h5"><div id="m_7012321195461628218yiv0201785587">

 
 


<div>
<div class="m_7012321195461628218yiv0201785587WordSection1">
<p class="m_7012321195461628218yiv0201785587MsoNormal">So I need to create an infinite textured plane to represent the sea.</p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal">vtkPlaneSource seems like the right object, but I can’t seem to get any of the examples to display anything.</p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal">A colleague tried a while back also but said he could only get it to work with OpenGL not OpenGL2.</p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"></p></div></div></div></div></div></div></div></div></div></div></blockquote><div><br></div><div>That is odd. OpenGL2 has been the default for a while now and it is tested nightly on many platforms. Need more information about what is specifically going wrong to diagnose what is wrong in your setup.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><div id="m_7012321195461628218yahoo_quoted_3561042944" class="m_7012321195461628218yahoo_quoted"><div style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;color:#26282a"><div><div><div class="h5"><div id="m_7012321195461628218yiv0201785587"><div><div class="m_7012321195461628218yiv0201785587WordSection1"><p class="m_7012321195461628218yiv0201785587MsoNormal">Anyone able to offer any ideas?</p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal">I’ve got a rectilinear grid working, but it’s not ideal, really need an infinite textured plane.</p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal">  </p></div></div></div></div></div></div></div></div></div></div></blockquote><div>VTK doesn't really have the concept of boundless shapes to my knowledge.</div><div><br></div><div>It is very likely you could do this with OpenGL2 and programmable shaders. The shader(s) would evaluate the plane equation, determine a depth and u/v coordinate for each fragment and then reject or pass and color the fragment based on the depth test. vtkOSPRay would have a different implementation.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><div id="m_7012321195461628218yahoo_quoted_3561042944" class="m_7012321195461628218yahoo_quoted"><div style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;color:#26282a"><div><div><div class="h5"><div id="m_7012321195461628218yiv0201785587"><div><div class="m_7012321195461628218yiv0201785587WordSection1"><p class="m_7012321195461628218yiv0201785587MsoNormal">Using VTK 8.1.0, C++</p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal">  </p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:blue">void</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af">CModelView</span><span style="font-size:9.5pt;font-family:Consolas;color:black">::<wbr>vtkRenderImageToPlane(</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:#2b91af">CString</span><span style="font-size:9.5pt;font-family:Consolas;color:black">&
</span><span style="font-size:9.5pt;font-family:Consolas;color:gray">inputFilename</span><span style="font-size:9.5pt;font-family:Consolas;color:black">,
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">float</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:gray">x</span><span style="font-size:9.5pt;font-family:Consolas;color:black">,
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">float</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:gray">y</span><span style="font-size:9.5pt;font-family:Consolas;color:black">,
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">float</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:gray">z</span><span style="font-size:9.5pt;font-family:Consolas;color:black">)</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">{</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">      
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6f008a">USES_CONVERSION</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       std::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af">string</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
 filename = </span><span style="font-size:9.5pt;font-family:Consolas;color:#6f008a">W2A</span><span style="font-size:9.5pt;font-family:Consolas;color:black">(</span><span style="font-size:9.5pt;font-family:Consolas;color:gray">inputFilename</span><span style="font-size:9.5pt;font-family:Consolas;color:black">);</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">  </span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">      
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">// Read the image which will be the texture,
</span><span style="font-size:9.5pt;font-family:Consolas;color:black"></span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">      
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af">Image_Type</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> imageType = GetImageType(</span><span style="font-size:9.5pt;font-family:Consolas;color:gray">inputFilename</span><span style="font-size:9.5pt;font-family:Consolas;color:black">);</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">      
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af">vtkAlgorithmOutput</span><span style="font-size:9.5pt;font-family:Consolas;color:black">* ImageOutput =
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6f008a">NULL</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><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">vtkPNGReader</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
 pNGReader = </span><span style="font-size:9.5pt;font-family:Consolas;color:#6f008a">NULL</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><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">vtkJPEGReader</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
 jPEGReader = </span><span style="font-size:9.5pt;font-family:Consolas;color:#6f008a">NULL</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><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">vtkBMPReader</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
 bMPReader = </span><span style="font-size:9.5pt;font-family:Consolas;color:#6f008a">NULL</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">      
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">switch</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (imageType)</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       {</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">             
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">case</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af">Image_Type</span><span style="font-size:9.5pt;font-family:Consolas;color:black">::</span><span style="font-size:9.5pt;font-family:Consolas;color:darkslategray">PNG</span><span style="font-size:9.5pt;font-family:Consolas;color:black">:</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">              {</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                      pNGReader
</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">=</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">vtkPNGReader</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>:<wbr>:New();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                      pNGReader</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetFileName(<wbr>filename.c_str());</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                      pNGReader</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();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                      ImageOutput = pNGReader</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></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">              }</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">             
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">break</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">             
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">case</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af">Image_Type</span><span style="font-size:9.5pt;font-family:Consolas;color:black">::</span><span style="font-size:9.5pt;font-family:Consolas;color:darkslategray">JPG</span><span style="font-size:9.5pt;font-family:Consolas;color:black">:</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">              {</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                      jPEGReader
</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">=</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">vtkJPEGReader</span><span style="font-size:9.5pt;font-family:Consolas;color:black">><wbr>::New();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                      jPEGReader</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetFileName(<wbr>filename.c_str());</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                      jPEGReader</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();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                      ImageOutput = jPEGReader</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></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">              }</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">             
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">break</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">             
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">case</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2b91af">Image_Type</span><span style="font-size:9.5pt;font-family:Consolas;color:black">::</span><span style="font-size:9.5pt;font-family:Consolas;color:darkslategray">BMP</span><span style="font-size:9.5pt;font-family:Consolas;color:black">:</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">              {</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                      bMPReader
</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">=</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">vtkBMPReader</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>:<wbr>:New();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                      bMPReader</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetFileName(<wbr>filename.c_str());</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                      bMPReader</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();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                      ImageOutput = bMPReader</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></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">              }</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">             
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">break</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       }</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><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"> (ImageOutput ==
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6f008a">NULL</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> || (pNGReader
</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">==</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6f008a">NULL</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> && jPEGReader
</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">==</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6f008a">NULL</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> && bMPReader
</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">==</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6f008a">NULL</span><span style="font-size:9.5pt;font-family:Consolas;color:black">))</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">             
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">return</span><span style="font-size:9.5pt;font-family:Consolas;color:black">;</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">  </span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">      
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">// Create a plane</span><span style="font-size:9.5pt;font-family:Consolas;color:black"></span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><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">vtkPlaneSource</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><wbr>>
 plane = </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">vtkPlaneSource</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><wbr>>::New();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       plane</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetNormal(0.0,
 0.0, 1.0);</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       plane</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(0,
 0, 0);</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">      
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">//plane->SetResolution(100, 100);</span><span style="font-size:9.5pt;font-family:Consolas;color:black"></span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">      
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">//plane->SetPoint1(100000, -100000, 0);</span><span style="font-size:9.5pt;font-family:Consolas;color:black"></span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">      
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">//plane->SetPoint2(-100000, 100000, 0);</span><span style="font-size:9.5pt;font-family:Consolas;color:black"></span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">      
</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">      
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">// Apply the texture</span><span style="font-size:9.5pt;font-family:Consolas;color:black"></span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><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">vtkTexture</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
 texture = </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">vtkTexture</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::<wbr>New();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       texture</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(<wbr>ImageOutput);</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       texture</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">InterpolateOn();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       texture</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">RepeatOn();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">  </span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><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">vtkTextureMapT<wbr>oPlane</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
 texturePlane = </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">vtkTextureMapT<wbr>oPlane</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       texturePlane</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetInputConnecti<wbr>on(plane</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></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">  </span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><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">vtkPolyDataMap<wbr>per</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
 planeMapper = </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">vtkPolyDataMap<wbr>per</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::New();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       planeMapper</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetInputConnectio<wbr>n(texturePlane</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(<wbr>));</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">  </span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><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">vtkActor</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>
 texturedPlane = </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">vtkActor</span><span style="font-size:9.5pt;font-family:Consolas;color:black">>::<wbr>New();</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       texturedPlane</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetMapper(<wbr>planeMapper);</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       texturedPlane</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetTexture(<wbr>texture);</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       texturedPlane</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">GetProperty()-><wbr>SetOpacity(0.7);</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       texturedPlane</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">SetPickable(</span><span style="font-size:9.5pt;font-family:Consolas;color:#6f008a">FAL<wbr>SE</span><span style="font-size:9.5pt;font-family:Consolas;color:black">);</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">  </span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">      
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">// Visualize the textured plane</span><span style="font-size:9.5pt;font-family:Consolas;color:black"></span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">       m_vtkRenderer->AddActor(<wbr>texturedPlane);</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">  </span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">}</span></p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal">  </p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal">--</p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal">Jesse Kinross-Smith</p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal">Senior Software Engineer - BSW</p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal">Bentley Systems, Fremantle</p> 
<p class="m_7012321195461628218yiv0201785587MsoNormal">  </p> 
</div>
</div>
</div></div></div>______________________________<wbr>_________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br><br>Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="https://vtk.org/mailman/listinfo/vtkusers" target="_blank">https://vtk.org/mailman/<wbr>listinfo/vtkusers</a><br></div>
                </div>
            </div></div></div><br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/<wbr>listinfo/vtkusers</a><br>
<br></blockquote></div><br></div></div>