POV-Ray : Newsgroups : povray.programming : About Intersection points : About Intersection points Server Time
6 Oct 2024 13:41:47 EDT (-0400)
  About Intersection points  
From: Wu Yang
Date: 7 Nov 2002 23:26:00
Message: <3dcb3cd8$1@news.povray.org>
Hi, all
    I want to get the (x,y,z) values of all Intersection points. The
following is what I added into the Intersect_Mesh() function in mesh.cpp
file:

    found = intersect_bbox_tree(Mesh, &New_Ray, Ray, len, Depth_Stack);
// return(intersect_bbox_tree(Mesh, &New_Ray, Ray, len, Depth_Stack));
  }
  if (found == true)
  {
   ofstream output;
   output.open("C:\\Documents and Settings\\Wu Yang.WORK\\My
Documents\\project\\out.dat",ios::out|ios::app);
   if (Ray->Initial[0] == 20)
   {
    output << Ray->Initial[0] << " " << Ray->Initial[1] << " " <<
Ray->Initial[2] << " "
     << Mesh->Data->Vertices[0][0] << " " << Mesh->Data->Vertices[0][1] << "
" << Mesh->Data->Vertices[0][2] << " "
     << Mesh->Data->Vertices[1][0] << " " << Mesh->Data->Vertices[1][1] << "
" << Mesh->Data->Vertices[1][2] << " "
     << Mesh->Data->Vertices[2][0] << " " << Mesh->Data->Vertices[2][1] << "
" << Mesh->Data->Vertices[2][2] << " ";
    output.close();
   }
  }

    Is it right?

Thanks a lot
Wu Yang


Post a reply to this message

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