[vtkusers] Drawing half a million "vtkParametricEllipsoid"s
VoodooCode
MaxSchererMax at gmail.com
Wed May 22 10:54:46 EDT 2013
I think I almost got it. I created the map, inserted the spheres and if I can
manipulate each of them independently it should work. Using the actors I can
rotate and scale the objects, but how to access a single sphere to apply its
scaling and rotation?
I added a new code snippet.
//Sample start
vtkSmartPointer<vtkSphereSource> baseSphere =
vtkSmartPointer<vtkSphereSource>::New();
baseSphere->SetRadius(1);
glyph_->SetInput(polyMap_);
glyph_->SetSourceConnection(baseSphere->GetOutputPort());
glyph_->Update();
mapper_->SetInputConnection(glyph_->GetOutputPort());
for(int i = 0; i < radius.size(); i++)
{
//Configuration of the rotation/translation
vtkSmartPointer<vtkMatrix4x4> transformationMatrix =
vtkSmartPointer<vtkMatrix4x4>::New();
vtkSmartPointer<vtkMatrixToLinearTransform> matrixToLinearTransform =
vtkSmartPointer<vtkMatrixToLinearTransform>::New();
configureMatrix(rotation[i], transformationMatrix);
matrixToLinearTransform->SetInput(transformationMatrix);
matrixToLinearTransform->Update();
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
actor->SetMapper(???);
actor->SetScale(radius.data);
actor->SetUserTransform(matrixToLinearTransform);
}
//Sample end
--
View this message in context: http://vtk.1045678.n5.nabble.com/Drawing-half-a-million-vtkParametricEllipsoid-s-tp5720865p5720874.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list