<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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></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-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi, <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am using multiple vtkTriangleStrips to render tubes with differing cross-section at each end, e.g. an ellipse at one end and a square at the other end. I am overlaying each of the tube's ends with a vtkPolyLine of contrasting colour to
 allow the user to view just the end cross-sections and hide the triangulated tube surface. I am creating a repeating timer on the interactor to animate the scene.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have a separate vtkActor for each of the polylines and the triangle strip. Each of the ends of a tube can be translated and oriented differently when the animation is running.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The issue I have is that I can't find a way of specifying multiple vtkPoints arrays (i.e. one for each polyline) as input to the triangle strip, so I am creating a new vtkPoints array for the triangle strip's vtkPolyData and populating
 it with the vtkPoints arrays for each polyline in turn. This is repeated at each step in the animation, causing a significant performance hotspot when the number of tubes is scaled up:
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">// Update triangle strip to reflect transformed polylines <o:p>
</o:p></p>
<p class="MsoNormal">// Get points for each end <o:p></o:p></p>
<p class="MsoNormal">vtkPoints points = polylineEnd1Actor().GetMapper().GetInput().GetCell(0).GetPoints();
<o:p></o:p></p>
<p class="MsoNormal">vtkPoints pointsEnd2 = polylineEnd2Actor().GetMapper().GetInput().GetCell(0).GetPoints();
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">// Create a new vtkPoints for triangle strip <o:p></o:p></p>
<p class="MsoNormal">int pointCountEnd2 = pointsEnd2.GetNumberOfPoints(); <o:p></o:p></p>
<p class="MsoNormal">for (int i = 0; i < pointCountEnd2; ++i) <o:p></o:p></p>
<p class="MsoNormal">{ <o:p></o:p></p>
<p class="MsoNormal">  // Append transformed pointsEnd2 to points for triangle strip poly data<o:p></o:p></p>
<p class="MsoNormal">  points.InsertNextPoint(pointsEnd2.GetPoint(i)[0], pointsEnd2.GetPoint(i)[1], pointsEnd2.GetPoint(i)[2]);
<o:p></o:p></p>
<p class="MsoNormal">} <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">PolyDataForTriangleStrip.SetPoints(points); <o:p></o:p></p>
<p class="MsoNormal">PolyDataForTriangleStrip.Modified(); <o:p></o:p></p>
<p class="MsoNormal">PolyDataNormalsForTriangleStrip.SetInputData(PolyDataForTriangleStrip);
<o:p></o:p></p>
<p class="MsoNormal">PolyDataNormalsForTriangleStrip.Update(); <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I would like to find a way of mapping polydata/points of the two polylines directly to the triangle strip's polydata/points, such that when the polyline actors are transformed, their new point coordinates are reflected in the triangle strip
 without having to create a new vtkPoints.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am using ActiViz.Net with C#.<o:p></o:p></p>
</div>
<div style="font-size:7pt; color:rgb(102,102,102); font-family: 'Verdana',sans-serif;">
<br>
**************************************************************************************<br>
This e-mail and any attachments thereto may contain confidential information and/or information protected by intellectual property rights for the exclusive attention of the intended addressees named above. If you have received this transmission in error, please
 immediately notify the sender by return e-mail and delete this message and its attachments. Unauthorized use, copying or further full or partial distribution of this e-mail or its contents is prohibited.<br>
**************************************************************************************<br>
</div>
</body>
</html>