[Bf-committers] A little Editface Question

Martin Poirier theeth at yahoo.com
Thu Jun 9 00:49:43 CEST 2005



--- Johnny Matthews <johnny.matthews at gmail.com> wrote:

> Ok, This is for any self-professed Mesh Gurus out
> there,
> 
> I am getting very close to having a working version
> of the edge-based 
> subdivide with the option of 1 or more even cuts.
> The
> hitch I have is this. I have a function that takes
> each new internal 
> face as it is created and copies information from
> the parent
> face kinda like facecopy(EditFace source,EditFace
> target), where target 
> is always a subface of source. Can you think of a
> way, without passing any more information to the
> function to extrapolate 
> the UV and Vertcol information from the source face
> to the target face.

This one's for me.

You'll want to call the function: set_wuv in
editmesh_tools.c
First argument is the number of verts (could easily be
removed).
Second argument is the new face, then the vertex flags
(explained in the nice ascii drawing in the fonction's
body) and then the pinned face (original face
containing pinned uvs flags and the like).

To use the function correctly, you have to call it
with the proper vertex flags AND also set the f1 flag
for each edge that is being cut. This sets the factor
of where the cut is along the edge starting from the
first vertex in the edge (0.0) to the last (1.0)
stored in a short (multiplied by 32768).

If you have more questions, you can contact me
directly.

Martin


		
__________________________________ 
Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html


More information about the Bf-committers mailing list