M
Marc
Dear Group,
I am attempting to modify a portion of the source code for the global
illumination raytracer, RADIANCE. Specifically, I am trying to
implement a different ray/triangle intersection algorithm. My C
programming skills are laymen at best but I have successfully
implemented this algorithm for triangle polygons (the source code that
I am trying to modify is for a triangular mesh) previously. I have a
question concerning passing arguments on to functions. For all that I
have read and experienced, if there is a function that requires two
arguments, then those arguments must be with the function call (i.e.
function(arg1,arg2)) and the argument types must match the types in the
declared function. In the source code that I am modifying, I have come
across an instance wherein a function that is being called, which
requires two arguments, is being called without any arguments. In the
following file:
http://www.radiance-online.org/cgi-bin/viewcvs.cgi/*checkout*/ray/src/rt/o_mesh.c?
on line 167, it appears to me that the function mesh_hit is being
called but no arguments are being passed to it. The function mesh_hit
requires two arguments (oset, r). This code does successfully execute
but I do not know how it works. I have searched through all of my C
books and I have searched the web and usenet but I can not find any
answers. Can anyone explain this to me?
BTW
For anyone who wishes to tackle this issues, here is the address to
download ray.h (for the RAY type):
http://www.radiance-online.org/cgi-bin/viewcvs.cgi/*checkout*/ray/src/rt/ray.h?
and object.h (for the OBJECT type):
http://www.radiance-online.org/cgi-...mon/object.h?rev=2.18&content-type=text/plain
Thanks
Marcus
I am attempting to modify a portion of the source code for the global
illumination raytracer, RADIANCE. Specifically, I am trying to
implement a different ray/triangle intersection algorithm. My C
programming skills are laymen at best but I have successfully
implemented this algorithm for triangle polygons (the source code that
I am trying to modify is for a triangular mesh) previously. I have a
question concerning passing arguments on to functions. For all that I
have read and experienced, if there is a function that requires two
arguments, then those arguments must be with the function call (i.e.
function(arg1,arg2)) and the argument types must match the types in the
declared function. In the source code that I am modifying, I have come
across an instance wherein a function that is being called, which
requires two arguments, is being called without any arguments. In the
following file:
http://www.radiance-online.org/cgi-bin/viewcvs.cgi/*checkout*/ray/src/rt/o_mesh.c?
on line 167, it appears to me that the function mesh_hit is being
called but no arguments are being passed to it. The function mesh_hit
requires two arguments (oset, r). This code does successfully execute
but I do not know how it works. I have searched through all of my C
books and I have searched the web and usenet but I can not find any
answers. Can anyone explain this to me?
BTW
For anyone who wishes to tackle this issues, here is the address to
download ray.h (for the RAY type):
http://www.radiance-online.org/cgi-bin/viewcvs.cgi/*checkout*/ray/src/rt/ray.h?
and object.h (for the OBJECT type):
http://www.radiance-online.org/cgi-...mon/object.h?rev=2.18&content-type=text/plain
Thanks
Marcus