|
|
In article <3a0d736f@news.povray.org>, "Wlodzimierz ABX Skiba"
<abx### [at] abxartpl> wrote:
> >In other words, allowing the function to be called in ordinary scene
> >code...
>
> yes
>
> >this should be pretty easy
>
> I hope
I am thinking something like this, in the Parse_Num_Factor() function in
express.c:
#include "isosrf.h"
...
CASE(FUNC_ID_TOKEN)
{
DBL result = 0;
int i=0;
VECTOR Point;
FUNCTION * TFunc = NULL;
Load_Function(TFunc, ((FUNCTION *)Token.Data)->func_name);/*?*/
GET(LEFT_PAREN_TOKEN)
Parse_Vector(Point);
GET(RIGHT_PAREN_TOKEN)
if(TFunc != NULL)
result = (TFunc->iso_func)(TFunc, Point);
for(i=0; i < *Terms; i++)
Express[i] = Val;
}
END_CASE
I don't know if this will work(it compiles, but it hasn't been tested),
and I have no idea what Load_Function() does...but it's a start.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|