i have to extend the boundingbox of a triangle, but its not working. tried to make the boundingbox smaller but its not working as well.
The change of the intersection programm of the mesh_triangle works.
the triangle is now a biqaudratic patch.
whats going wrong? is there a bug xD?
maybe it make sense not allow the boundingbox beeing smaller, so that the vertices would lay outside the boundingbox.
but making it bigger shouldnt be a problem.
if i choose the vertices that makes the biggest bounding box, i have no problems with my patch.
(v1(0.5 0.0 0.0), v2(0.0 0.5 0.0), v3(0.0 0.0 0.5))
but if i take vertices all lay on an axis, i ll get trouble with the patch. it seems to be cutted by the boundingbox.
tried different ways to make the boundingbox greater e.g.:
float3 tmp_min = fminf( fminf( v0, v1), v2 );
float3 tmp_max = fmaxf( fmaxf( v0, v1), v2 );
aabb->m_min = make_float3(tmp_min.x-1000,tmp_min.y-1000,tmp_min.z-1000));
aabb->m_max = make_float3(tmp_max.x+1000,tmp_max.y+1000,tmp_max.z+1000));
i checked if i made mistakes with the setup of the right bounding box:
1.loading the right .cu files with correct programm name
std::string path = std::string(sutilSamplesPtxDir()) + "/MyProject_generated_triangle_mesh.cu.ptx";
m_bbox_program = m_context->createProgramFromPTXFile( path, "mesh_bounds" );
same path like the intersectionprogramm, which is working.
2.set the boundingbox
mesh = m_context->createGeometry();
mesh->setPrimitiveCount( num_triangles );
mesh->setIntersectionProgram( m_intersect_program);
mesh->setBoundingBoxProgram( m_bbox_program );
where could be a mistake?