<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Hello vtkers, </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
I use Qt5.9 with VTK8.0 to develop a GUI based system. I create multiple actors and want to allow users to interact with the actors by clicking relating buttons, e.g. changing colours, moving in one direction and rotating along one axis. The basic strategy
 is that all actors store in a vector and update the colours or transforms in a separate function when a button is clicked.  In the function, the code is like:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#808000;">double</span><span style=" color:#c0c0c0;"> </span><span style=" color:#092e64;">tmpColor</span>[<span style=" color:#000080;">4</span>];</pre>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#092e64;">    tmpColor</span>[<span style=" color:#000080;">0</span>]<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">pipeColor</span>[<span style=" color:#000080;">0</span>];</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#092e64;">tmpColor</span>[<span style=" color:#000080;">1</span>]<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">pipeColor</span>[<span style=" color:#000080;">1</span>];</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#092e64;">tmpColor</span>[<span style=" color:#000080;">2</span>]<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">pipeColor</span>[<span style=" color:#000080;">2</span>];</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#092e64;">tmpColor</span>[<span style=" color:#000080;">3</span>]<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">pipeColor</span>[<span style=" color:#000080;">3</span>];</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800000;">pipeActor</span>-><span style=" color:#00677c;">GetProperty</span>()-><span style=" font-style:italic; color:#00677c;">SetColor</span>(<span style=" color:#092e64;">tmpColor</span>);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800000;">pipeActor</span>-><span style=" color:#00677c;">GetProperty</span>()-><span style=" font-style:italic; color:#00677c;">SetOpacity</span>(<span style=" color:#092e64;">tmpColor</span>[<span style=" color:#000080;">3</span>]);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800000;">pipeTransform</span>-><span style=" color:#00677c;">Translate</span>(<span style=" color:#000080;">0.0</span>,<span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">0.0</span>,<span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">currentMove</span>);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800000;">pipeTransform</span>-><span style=" color:#00677c;">RotateY</span>(<span style=" color:#808000;">static_cast</span><<span style=" color:#808000;">double</span>>(<span style=" color:#800000;">currentRotate</span>));</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800000;">pipeTransform</span>-><span style=" color:#00677c;">Update</span>();</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800000;">pipeActor</span>-><span style=" color:#00677c;">SetUserTransform</span>(<span style=" color:#800000;">pipeTransform</span>);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><br></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#808000;">this</span>-><span style=" color:#800000;">bmRenderer</span>-><span style=" font-style:italic; color:#00677c;">ResetCamera</span>();</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#808000;">this</span>-><span style=" color:#800000;">bmRenderer</span>-><span style=" color:#00677c;">GetActiveCamera</span>()-><span style=" color:#00677c;">Zoom</span>(<span style=" color:#800000;">scaleFactor</span>);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><br></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><br></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800000;">ui</span>-><span style=" color:#800000;">bmWidget</span>-><span style=" font-style:italic; color:#00677c;">GetRenderWindow</span>()-><span style=" font-style:italic; color:#00677c;">Render</span>();</pre>
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
The actor's colour is updated but the movement is not. </div>
</body>
</html>