[vtkusers] How to get all visible Triangles?

s61500 at htw-dresden.de s61500 at htw-dresden.de
Thu Oct 14 05:27:37 EDT 2010


Sorry I forgot to attach the screenshot

> Hello,
>
> I've found the error in the example code.
>
> int* temp = this->Interactor->GetRenderWindow()->GetSize();
> unsigned int windowSize[4];
> for(unsigned int i = 0; i < 4; i++)
> {
>    windowSize[i] = temp[i];
> }
>
>
> There you get an array with [300, 300, 1, 1] and there is a problem when
> you set the area in this order.
> Either you have to write the coordinates in the code or you have to switch
> the order of the elements in the array.
>
> But the result of the selection is not perfect. Some visible triangles are
> deleted (see the screenshot).
> Maybe someone knows where the problem is, could it be the regularity of
> the model or something else?
>
> Stefan
>
>
>> n Mon, Oct 11, 2010 at 9:38 AM, Eric E. Monson <emonson at cs.duke.edu>
>> wrote:
>>> That basic idea seems to work for me. To try it quickly I did it in
>>> Python instead, and I just printed out the SelectionList from the
>>> vtkSelectionNode that's attached to the vtkSelection returned by the
>>> hardware selector instead of trying to use vtkExtractSelection. The
>>> "UserEvent" looks for the "u" key.
>>
>> Thanks Eric. I added a python example:
>> http://www.vtk.org/Wiki/VTK/Examples/Python/Visualization/HardwareSelector
>>
>> Stefan, once you get it working in c++ if you could update the c++
>> example that would be great. I still think we should get it to work
>> with the ExtractSelection filter, but hopefully this will work for you
>> for now.
>>
>> David
>>
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.png
Type: image/png
Size: 16798 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101014/84936315/attachment.png>


More information about the vtkusers mailing list