|
![](/i/fill.gif) |
Hello!
I tried to use trace function from superpatch and trace intersection
with mesh object, but superpatch gave access violation. I D/L SuperPatch
source code and rebuilt project and as it appears, problem is with
uninitialized mesh queue.
Parse_Trace function calling results finally in calling function
intersect_bbox_tree (mesh.c):
*************************************
static int intersect_bbox_tree(MESH *Mesh, RAY *Ray, RAY *Orig_Ray, DBL
len, ISTACK *Depth_Stack)
{
int i, found;
DBL Best, Depth;
RAYINFO rayinfo;
BBOX_TREE *Node, *Root;
/* Create the direction vectors for this ray. */
Create_Rayinfo(Ray, &rayinfo);
/* Start with an empty priority queue. */
found = 0;
Mesh_Queue->QSize = 0;
/\
---------
But Mesh_Queue is initialized after parse (in function
Initialize_Mesh_Code) and null pointer exception occurs. I put
Initialize_Mesh_Code call before calling Parse (after Init_Blob_Queue)
in FrameRender function (povray.c) and this seemed to fix this problem.
Perhaps there is other uninitialized structures as well, which could
cause problems during this trace function, but at first sight I haven't
noticed such ones.
Post a reply to this message
|
![](/i/fill.gif) |