<div class="gmail_quote">On Thu, Jul 2, 2009 at 8:06 AM, ClaudeG <span dir="ltr"><<a href="mailto:claude.gangolf@gmail.com">claude.gangolf@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
/// map containing mappers<br>
std::map<unsigned long, vtkPolyDataMapper *, std::less<unsigned long> ><br>
mapper;<br>
/// iterator for mapper<br>
std::map<unsigned long, vtkPolyDataMapper *, std::less<unsigned long><br>
>::iterator mapper_pos;<br>
<br>
<br>
//function to setup the mapper and the actors, with the fin, i read a file<br>
to get all the properties of the cylinder which are stored in a file<br>
steup(vtkRenderer *renderer, std::ifstream &fin)<br>
{<br>
/// map containing actors<br>
std::map<unsigned long, vtkActor *, std::less<unsigned long> > actors;<br>
/// iterator for actors<br>
std::map<unsigned long, vtkActor *, std::less<unsigned long> >::iterator<br>
actors_pos;<br>
<br>
<br>
// mapper responsible for pushing the geometry into the graphics library<br>
mapper[particle_counter] = vtkPolyDataMapper::New();<br>
<br>
mapper[particle_counter]->SetInputConnection(CylinderSource->GetOutputPort());<br>
<br>
// The actor is a grouping mechanism: besides the geometry (mapper), it<br>
// also has a property, transformation matrix, and/or texture map.<br>
actors[particle_counter] = vtkActor::New();<br>
actors[particle_counter]->SetMapper(mapper[particle_counter]);<br>
<br>
// Add the actors to the renderer<br>
renderer->AddActor(actors[particle_counter]);<br>
<br>
// increment particle count<br>
particle_counter++;<br>
}<br>
<br>
//function to manipulate the actors<br>
manipulate(vtkRenderer *renderer, std::ifstream &fin)<br>
{<br>
actors[particle_counter]->SetPosition(3,4,2);<br>
}<br>
<br>
It is a simplification of my code but when i start the program i see the<br>
cylinder (to talk in the example-term) but no manipulation has been done to<br>
him<br>
<font color="#888888"></font></blockquote><div><br>I understand that it's a simplification, but it doesn't show that you
are even calling manipulate(), so I can't look into why it is not being
manipulated! haha<br>
<br clear="all">
Thanks,<br>
<br>
David <br></div></div>