[vtkusers] About drawing a cube

David Doria daviddoria at gmail.com
Wed Apr 18 07:31:55 EDT 2012


2012/4/18 Jothybasu Selvaraj <jothybasu at gmail.com>

> Look at this
>
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cube
>
> SetDimesions and SetOrigin should do what you need.
>
> Jothy
>

Additionally, you can use the vtkCubeSource to setup the topology
(connectivity), then use

vtkPoints* points = vtkPoints::New();

points->InsertNextPoint(x,y,z);
// ... do this 8 times for your 8 points...

cubeSource->GetOutput()->SetPoints(points);

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120418/4e087ba2/attachment.htm>


More information about the vtkusers mailing list