<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div>Did you get the plan rendering without a texture first?<br><div><br></div><div><br></div><div class="ydpad80e013signature"><div style="font-size:16px;"><div>Todd Martin, Ph.D.<br></div><div>Freelance Engineer/Software Architect.</div><br></div></div></div>
<div><br></div><div><br></div>
<div id="yahoo_quoted_3561042944" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Tuesday, April 10, 2018, 2:05:15 PM GMT+12, Jesse Kinross-Smith <Jesse.Kinross-Smith@bentley.com> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv0201785587">
<style><!--
#yiv0201785587
_filtered #yiv0201785587 {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;}
_filtered #yiv0201785587 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
_filtered #yiv0201785587 {font-family:Consolas;panose-1:2 11 6 9 2 2 4 3 2 4;}
#yiv0201785587
#yiv0201785587 p.yiv0201785587MsoNormal, #yiv0201785587 li.yiv0201785587MsoNormal, #yiv0201785587 div.yiv0201785587MsoNormal
{margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", sans-serif;}
#yiv0201785587 a:link, #yiv0201785587 span.yiv0201785587MsoHyperlink
{color:#0563C1;text-decoration:underline;}
#yiv0201785587 a:visited, #yiv0201785587 span.yiv0201785587MsoHyperlinkFollowed
{color:#954F72;text-decoration:underline;}
#yiv0201785587 p.yiv0201785587msonormal0, #yiv0201785587 li.yiv0201785587msonormal0, #yiv0201785587 div.yiv0201785587msonormal0
{margin-right:0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri", sans-serif;}
#yiv0201785587 span.yiv0201785587EmailStyle18
{font-family:"Calibri", sans-serif;color:windowtext;}
#yiv0201785587 .yiv0201785587MsoChpDefault
{font-size:10.0pt;font-family:"Calibri", sans-serif;}
_filtered #yiv0201785587 {margin:72.0pt 72.0pt 72.0pt 72.0pt;}
#yiv0201785587 div.yiv0201785587WordSection1
{}
--></style>
<div>
<div class="yiv0201785587WordSection1">
<p class="yiv0201785587MsoNormal">So I need to create an infinite textured plane to represent the sea.</p>
<p class="yiv0201785587MsoNormal">vtkPlaneSource seems like the right object, but I can’t seem to get any of the examples to display anything.</p>
<p class="yiv0201785587MsoNormal">A colleague tried a while back also but said he could only get it to work with OpenGL not OpenGL2.</p>
<p class="yiv0201785587MsoNormal">Anyone able to offer any ideas?</p>
<p class="yiv0201785587MsoNormal">I’ve got a rectilinear grid working, but it’s not ideal, really need an infinite textured plane.</p>
<p class="yiv0201785587MsoNormal"> </p>
<p class="yiv0201785587MsoNormal">Using VTK 8.1.0, C++</p>
<p class="yiv0201785587MsoNormal"> </p>
<p class="yiv0201785587MsoNormal" style=""><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;">::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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;">{</span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> </span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> {</span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> {</span></p>
<p class="yiv0201785587MsoNormal" style=""><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;">>::New();</span></p>
<p class="yiv0201785587MsoNormal" style=""><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(filename.c_str());</span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> }</span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> {</span></p>
<p class="yiv0201785587MsoNormal" style=""><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;">>::New();</span></p>
<p class="yiv0201785587MsoNormal" style=""><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(filename.c_str());</span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> }</span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> {</span></p>
<p class="yiv0201785587MsoNormal" style=""><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;">>::New();</span></p>
<p class="yiv0201785587MsoNormal" style=""><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(filename.c_str());</span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> }</span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> }</span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> </span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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;">>
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;">>::New();</span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;">
</span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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;">>::New();</span></p>
<p class="yiv0201785587MsoNormal" style=""><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(ImageOutput);</span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> </span></p>
<p class="yiv0201785587MsoNormal" style=""><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;">vtkTextureMapToPlane</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;">vtkTextureMapToPlane</span><span style="font-size:9.5pt;font-family:Consolas;color:black;">>::New();</span></p>
<p class="yiv0201785587MsoNormal" style=""><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;">SetInputConnection(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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> </span></p>
<p class="yiv0201785587MsoNormal" style=""><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;">vtkPolyDataMapper</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;">vtkPolyDataMapper</span><span style="font-size:9.5pt;font-family:Consolas;color:black;">>::New();</span></p>
<p class="yiv0201785587MsoNormal" style=""><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;">SetInputConnection(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());</span></p>
<p class="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> </span></p>
<p class="yiv0201785587MsoNormal" style=""><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;">>::New();</span></p>
<p class="yiv0201785587MsoNormal" style=""><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(planeMapper);</span></p>
<p class="yiv0201785587MsoNormal" style=""><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(texture);</span></p>
<p class="yiv0201785587MsoNormal" style=""><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()->SetOpacity(0.7);</span></p>
<p class="yiv0201785587MsoNormal" style=""><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;">FALSE</span><span style="font-size:9.5pt;font-family:Consolas;color:black;">);</span></p>
<p class="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> </span></p>
<p class="yiv0201785587MsoNormal" style=""><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="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> m_vtkRenderer->AddActor(texturedPlane);</span></p>
<p class="yiv0201785587MsoNormal" style=""><span style="font-size:9.5pt;font-family:Consolas;color:black;"> </span></p>
<p class="yiv0201785587MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;">}</span></p>
<p class="yiv0201785587MsoNormal"> </p>
<p class="yiv0201785587MsoNormal">--</p>
<p class="yiv0201785587MsoNormal">Jesse Kinross-Smith</p>
<p class="yiv0201785587MsoNormal">Senior Software Engineer - BSW</p>
<p class="yiv0201785587MsoNormal">Bentley Systems, Fremantle</p>
<p class="yiv0201785587MsoNormal"> </p>
</div>
</div>
</div>_______________________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/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_FAQ</a><br><br>Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=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/listinfo/vtkusers</a><br></div>
</div>
</div></div></body></html>