Skip to content

Instantly share code, notes, and snippets.

@cdoger
Created August 27, 2013 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdoger/6354981 to your computer and use it in GitHub Desktop.
Save cdoger/6354981 to your computer and use it in GitHub Desktop.
//...
vtkPolyData *polyData = vtkPolyData::New();
vtkPoints *points = vtkPoints::New();
//...
points->InsertPoint(count, p[0],p[1],p[2]); // I add several points inside a loop with this function
//...
polyData->SetPoints(points);
points->Delete();
app->addPolyDataRepresentation(polyData, app->shaderProgram());
std::vector<vesSharedPtr<vesActor> > actors = app->renderer()->sceneActors();
// Since it's the second actor added to the scene I call the functions on top of actors[1]
actors[1]->mapper()->setColor(1, 0, 0, 1); // This works
actors[1]->mapper()->setPointSize(3); // This doesn't work
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment