|
|
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
|
|