34 vtkNew<vtkPoints> points;
37 Vec3f bbox0 = scn->getLowerBound();
38 Vec3f bbox1 = scn->getUpperBound();
39 points->InsertNextPoint(bbox0[0], bbox0[1], bbox0[2]);
40 points->InsertNextPoint(bbox1[0], bbox1[1], bbox1[2]);
42 vtkNew<vtkPolyData> polyData;
43 polyData->SetPoints(points);
44 SetInputData(polyData);
49 vtkOpenGLFluidMapper::Update();
52 vtkOpenGLVertexBufferObject* vertexBuffer = this->VBOs->GetVBO(
"vertexMC");
55 if (vertexBuffer == NULL)
60 this->VBOBuildTime.Modified();
69 auto pSet =
m_module->inPointSet()->getDataPtr();
70 auto verts = pSet->getPoints();
77 printf(
"Intialize\n");
80 vtkNew<vtkPoints> points;
81 points->SetNumberOfPoints(verts.size());
82 vertexBuffer->UploadDataArray(points->GetData());
85 error = cudaGraphicsGLRegisterBuffer(&
m_cudaVBO, vertexBuffer->GetHandle(), cudaGraphicsRegisterFlagsWriteDiscard);
95 error = cudaGraphicsMapResources(1, &
m_cudaVBO);
97 error = cudaGraphicsResourceGetMappedPointer(&cudaPtr, &size,
m_cudaVBO);
99 error = cudaMemcpy(cudaPtr, verts.begin(), verts.size() *
sizeof(
float) * 3, cudaMemcpyDeviceToDevice);
101 error = cudaGraphicsUnmapResources(1, &
m_cudaVBO);
106 vtkIdType numPts = verts.size();
107 this->GLHelperDepthThickness.IBO->IndexCount =
static_cast<size_t>(numPts);