[vtkusers] About drawing a cube

Jothybasu Selvaraj jothybasu at gmail.com
Wed Apr 18 08:46:53 EDT 2012


Did you call cubeSource->Update() ?

Jothy

2012/4/18 Rong Xu <xurong1981 at gmail.com>

> Dear David Doria :
>
> 2012/4/18 David Doria <daviddoria at gmail.com>
>
>> 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);
>>
>
> Thank you for your help!
>
> But I used "cubeSource->GetOutput()->SetPoints(points);" that you
> introduced, the cube created still has default attributes. Do you have any
> ideas ?
>
>
>>
>> David
>>
>
>
>
> --
>
> ---------------------
> Best Regards!
>
> ===============================================
> Rong Xu,  Ph.D Student
> Ohya Lab
> Graduate School of Global Information and Telecommunication
> Studies (GITS), Waseda University
> 1-6-1 Nishi Waseda, Shinjuku-ku, Tokyo, Japan (¨“169-8050)
>
> Tel:          +81-80-4208-1207
> E-mail:     xurong1981 at gmail.com
>                xurong at fuji.waseda.jp
> ===============================================
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120418/985630ff/attachment.htm>


More information about the vtkusers mailing list