[vtkusers] How to get all visible Triangles?

David Doria daviddoria at gmail.com
Thu Oct 14 07:57:39 EDT 2010


On Thu, Oct 14, 2010 at 5:27 AM,  <s61500 at htw-dresden.de> wrote:
> 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.


I changed that loop to:
        windowSize[0] = temp[2];
        windowSize[1] = temp[0];
        windowSize[2] = temp[3];
        windowSize[3] = temp[1];

but I still get the "Selection must have a single node" error. Can you
send your working code (or preferably edit the wiki page directly :)
).

David



More information about the vtkusers mailing list