[vtkusers] How to get the visible face?

Larry larry74 at 163.com
Fri Apr 23 04:54:31 EDT 2004


Hello, Dave,

Thank you very much for your reply, it's very helpful!

But I am still not very clear how to do it, I am new to this.

1.How to do caculate the normal?
suppose the cell has 3 points, p0,p1,p2
the normal could be caculated as n=(p1-p0)X(p2-p0).
but the 3 points maybe in any order, so the normal vector could point to any
direction(to inside or outside to the 3d object). Then the dot product with
camera vector(cameraPoint - p0) could be - or +.

ps., those triangles face of 3d object is generated by vtk, after cut by
planes.

2. vtkCell::IntersectWithLine
I am using vtk4.2 with Java wrapper, I can not see this method. But I can
find it in the html document of vtk4.0, is that meant that the latest
version doesn't support this method.

And again thanks for your kind help!

Best Regards,
Larry

----- Original Message ----- 
From: <David.Pont at ForestResearch.co.nz>
To: "Larry" <larry74 at 163.com>
Cc: <vtkusers at vtk.org>
Sent: Thursday, April 22, 2004 11:31 PM
Subject: Re: [vtkusers] How to get the visible face?


>
> Hi Larry,
>    you could traverse all cells, get or calculate a cell normal and use
dot
> product with camera vector. To handle occlusion would be more tricky...
>   Dave P
>
>
> |---------+---------------------------->
> |         |           "Larry"          |
> |         |           <larry74 at 163.com>|
> |         |           Sent by:         |
> |         |           vtkusers-admin at vt|
> |         |           k.org            |
> |         |                            |
> |         |                            |
> |         |           23/04/2004 02:10 |
> |         |                            |
> |---------+---------------------------->
>
>---------------------------------------------------------------------------
-----------------------------------------------------|
>   |
|
>   |       To:       <vtkusers at vtk.org>
|
>   |       cc:
|
>   |       Subject:  [vtkusers] How to get the visible face?
|
>
>---------------------------------------------------------------------------
-----------------------------------------------------|
>
>
>
>
> Hello, everyone!
> Suppose I have a polydata, which is consisted of triangles, I'd like to
get
> the faces which can be seen by the camera.
> That's to say, there is a point M, and an object whose faces is a set of
> triangles, How can I get the faces that can be seen by the point M? and
how
> can I get the faces that is not seen by the point M?
>
> Thanks!
> Larry
> _
>
>
>
>
>





More information about the vtkusers mailing list