void VTKItem::CreateEditingPoints(vtkSmartPointer pEditingPointData) { // Create the selection glyph if it doesn't already exist if (!m_pSelectionGlyph) { // Store the editing data so that we can refer to it later m_pEditingPointData = pEditingPointData; // Create the glyph representation vtkSmartPointer pSphere = vtkSmartPointer::New(); pSphere->SetThetaResolution(16); pSphere->SetRadius(0.05); pSphere->SetPhiResolution(16); // Create the glyph object vtkSmartPointer pGlyph = vtkSmartPointer::New(); pGlyph->SetSourceConnection(pSphere->GetOutputPort()); pGlyph->SetInputData(pEditingPointData->GetOutput()); pGlyph->ScalingOff(); pGlyph->SetScaleModeToDataScalingOff(); pGlyph->GeneratePointIdsOn(); pGlyph->Update(); // Visualize the actor vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(pGlyph->GetOutputPort()); mapper->SetScalarVisibility(0); // Create the actor m_pSelectionGlyph = vtkSmartPointer::New(); m_pSelectionGlyph->SetMapper(mapper); // Add the actor to the scene m_pRenderer->AddActor(m_pSelectionGlyph); } }