<div dir="ltr">Dear chasank,<div><br></div><div>Many thanks for your response.</div><div><br></div><div>In terms of using a vector data structure, should I implement a separate class to handle and store multiple objects/vtk actors to memory?</div><div><br></div><div>I have changed my class structures and they look a bit like this...</div><div><br></div><div><div style><div style><div style><div style="font-size:13px"><b><u>Actor Class...</u></b><br><b><i>class Actor<br>{<br><br> public:<br> Actor(); // Constructor. </i></b></div><div style><b><i> ~<span style="font-size:13px">Actor</span><span style="font-size:13px">(); // Destructor. </span><br></i></b></div><div style="font-size:13px"><b><i> void reset(); // Resets all actor properties</i></b></div><div style="font-size:13px"><b><i> void setColour(); </i></b><b><i>// Sets colour to actor</i></b></div><div style="font-size:13px"><b><i> void opacity(); </i></b><b><i>// </i></b><b><i>Sets opacity to actor</i></b><b><i><br>}</i></b><br><br></div><b><u>Picker Class...</u></b><br></div><b><i>class PickerActor : public Actor<br>{<br></i></b></div><b><i> public:<br></i></b></div><b><i><span style="font-size:13px"> PickerActor(); </span><span style="font-size:13px">// Constructor. </span></i></b></div><div><b><i> ~<span style="font-size:13px">PickerActor()</span><span style="font-size:13px">; // Destructor. </span><br style="font-size:13px"><span style="font-size:13px">}</span></i></b><br></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px"><b><u>Multiple Actors Class...</u></b></span></div><div><div style="font-size:13px"><b><i>class ScreenObjects<br>{<br><br> public:<br> ScreenObjects(); // Constructor. </i></b></div><div style="font-size:13px"><b><i> <span style="font-size:small">~</span>ScreenObjects(); // Destructor.</i></b></div><div style="font-size:13px"><b><i> void addObject(); // Adds actor to memory</i></b></div><div style="font-size:13px"><b><i> void removeObject(); </i></b><b><i>// Removes actor from memory</i></b></div><div style="font-size:13px"><b><i>}</i></b><br></div></div><div style="font-size:13px"><br></div><div style="font-size:13px">How can I improve my class/data structure?</div><div style="font-size:13px"><br></div><div style="font-size:13px">Thanks</div><div><span style="font-size:13px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 9, 2015 at 1:00 PM, chasank <span dir="ltr"><<a href="mailto:chasank@gmail.com" target="_blank">chasank@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Don't complicate your code for nothing. All you need is a simple data<br>
structure such as std::vector<T><br>
You may push and pop your actors easily with built-in iterators.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Storing-actors-into-memory-C-tp5729971p5730046.html" target="_blank">http://vtk.1045678.n5.nabble.com/Storing-actors-into-memory-C-tp5729971p5730046.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<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/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="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div>