POV-Ray : Newsgroups : povray.programming : About the Mesh : Re: About the Mesh Server Time
28 Jul 2024 06:10:10 EDT (-0400)
  Re: About the Mesh  
From: Wu Yang
Date: 24 Oct 2002 10:49:33
Message: <3db8087d@news.povray.org>
I got it. Thank you very much.
Best Regard
Wu Yang

"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:3db8043c$1@news.povray.org...
> In article <3db7ed1f@news.povray.org> , "Wu Yang" <wya### [at] cswrightedu>
> wrote:
>
> > Thank you for your reply. What I mean is that: when I see the value of
> > Mesh->Data->Vertices, I can get three values. These three values is the
x
> > values of a triangle's three corners, not (x,y,z) of a corner.
>
> No, a vertex is a "corner".  And "vertices" is the plural of "vertex".
>
> > I want get
> > the (x,y,z) of every corner. Could you please give me some advice?
Thanks
>
> You need to know the index of the three triangle vertices, as the whole
> mesh.cpp code does all over the place:
>
> MESH *Mesh = ...;
> MESH_TRIANGLE *Triangle = &(Mesh->Triangles[index]);
>
> Mesh->Data->Vertices[Triangle->P1][X]
> Mesh->Data->Vertices[Triangle->P1][Y]
> Mesh->Data->Vertices[Triangle->P1][Z]
>
> Mesh->Data->Vertices[Triangle->P2][X]
> Mesh->Data->Vertices[Triangle->P2][Y]
> Mesh->Data->Vertices[Triangle->P2][Z]
>
> Mesh->Data->Vertices[Triangle->P3][X]
> Mesh->Data->Vertices[Triangle->P3][Y]
> Mesh->Data->Vertices[Triangle->P3][Z]
>
> Really, I don't want to be discouraging, but if you have such problems, it
> will be a very frustrating experience to look at the POV-Ray source code.
> And you won't be learning much from it...
>
>     Thorsten


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.