POV-Ray : Newsgroups : povray.programming : povray crashes : Re: povray crashes Server Time
29 Jul 2024 06:18:25 EDT (-0400)
  Re: povray crashes  
From: Ron Parker
Date: 3 Aug 1998 10:57:47
Message: <35c5c1db.0@news.povray.org>
On Sun, 02 Aug 1998 16:31:07 -0500, Lothar Esser 
<ess### [at] chopswmededu> wrote:
>Can anyone tell me where the code for Normal () is ?
>( Normal has been defined in frame.h as :
>#define Normal(x,y,z) ((*((y)->Methods->Normal_Method)) (x,y,z))
>so the argument y ( here Ray_Intersection->Object ) is a struct that
>contains the information
>I need i.e. Ray_Intersection->Object->Methods->Normal_Method - the
>address of a function.
>But again I somehow lost track. Can anyone tell me where to find the
>code that calculates
>whatever it is that Normal does  ?

It depends on what object type you're using.  If you're using a sphere,
for example, you'd look in spheres.c.  For a Height Field, look in hfield.c.
Each of the object types initializes an array of pointers to point to their
individual implementations of a number of common functions, including 
Normal().  This is the object-oriented part of POV-Ray.

>Even better,  can any experienced povray programmer look into that
>problem himself ?

I'd be happy to take a look at it, but you don't seem to mention the type
of object you're working with.


Post a reply to this message

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