In article <3a65b58a@news.povray.org>, Warp <war### [at] tagpovrayorg>
wrote:
> The tesselation patch makes a > Parse_Object_Mods((OBJECT*)tesselationMesh)> after creating the mesh.> I don't know if that's what you mean.
I think he is asking if the tesselated mesh will "inherit" the texture
and other attributes of the original object. Something to think about,
but I think it is sufficient to only do the geometry.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
From: Wlodzimierz ABX Skiba
Subject: Re: Parsing an object
Date: 17 Jan 2001 11:34:25
Message: <3a65c991@news.povray.org>
Warp wrote in message <3a65b58a@news.povray.org>...
>Wlodzimierz ABX Skiba <abx### [at] abxartpl> wrote:>: btw: is there automatic inheriting of parameters such like texture,
no_shadow,
>: etc.?>: I mean in tesselation patch.>> The tesselation patch makes a Parse_Object_Mods((OBJECT*)tesselationMesh)>after creating the mesh.> I don't know if that's what you mean.
I mean that when you generate complicated csg with texturing for every component
and want tesselate it you must rebuild complicated texturing, right ? What about
calculating all parameters of texture at vertex and generate textured triangles
?
ABX
From: Wlodzimierz ABX Skiba
Subject: Re: Parsing an object
Date: 17 Jan 2001 11:41:54
Message: <3a65cb52$1@news.povray.org>
Warp wrote in message <3a65ba93@news.povray.org>...
> I have run into one problem. I get a:>>error: Attempt to malloc zero size block (File: parse.c Line: 4385).>> Shouldn't it be enclosed in an if(number_of_uvcoords)?> Will I break something if I add that condition?
probaly you should write something like
if (number_of_uvcoords>0)
{
Object->Data->UVCoords = (UV_VECT
*)POV_MALLOC(number_of_uvcoords*sizeof(UV_VECT), "triangle mesh data");
}
else
{
Object->Data->UVCoords = NULL;
}
and check all places where Object->Data->UVCoords is used
to avoid refferencing arrays at NULL pointer
for example at POV_FREE for this pointer
ABX