[vtkusers] How to get all visible Triangles?

s61500 at htw-dresden.de s61500 at htw-dresden.de
Sun Oct 10 18:39:31 EDT 2010


Hello,

I've tried to implement the code from the example, but I get the same error.
The problem is that the vtkExtractSelection object has 0 nodes, but it has
to have 1 node.

The vtkHardwareSelector seems to be the right way, when I've understand
the documentation.

"Select will cause the attached vtkRenderer  to render in a special color
mode, where each cell/point is given it own color so that later inspection
of the Rendered Pixels can determine what cells are visible. Select()
returns a new vtkSelection instance with the cells/points selected."

This was my first idea to solve the problem before I've worked with VTK.
I've wrote a prototype in Python (without VTK), which solve the problem in
this way, but the prototype is to slow.

Is there maybe another way to get a triangle list with vtkHardwareSelector?



> Probably the vtkAreaPicker should work for that .
>
> Darshan
>
> On Thu, Oct 7, 2010 at 11:11 AM, David Doria <daviddoria at gmail.com> wrote:
>
>> On Thu, Oct 7, 2010 at 9:00 AM, <s61500 at htw-dresden.de> wrote:
>>
>>> Hello,
>>>
>>> I've an object in a STL-File and imported the object. Know I have to
>>> get
>>> all triangles which are visible from a given point, but I don't find a
>>> way
>>> to do this.
>>>
>>> I've searched in several forums and in this mailing list, but I haven't
>>> find any answer.
>>>
>>> May anybody of you can help me.
>>>
>>> Stefan
>>>
>>>
>> I think this is very close to what you're looking for. Unfortunately, I
>> get
>> a "Selection must have a single node" error.
>>
>>
>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/Filtering/ExtractVisibleCells
>>
>> David
>>
>> _______________________________________________
>> 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
>>
>>
>





More information about the vtkusers mailing list