예제 #1
0
파일: bvh4.cpp 프로젝트: baxelrod/embree
 Accel* BVH4::BVH4Triangle4ObjectSplit(TriangleMesh* mesh)
 {
   BVH4* accel = new BVH4(Triangle4::type,mesh->parent,LeafMode);
   Builder* builder = BVH4Triangle4MeshBuilderSAH(accel,mesh,LeafMode);
   Accel::Intersectors intersectors = BVH4Triangle4IntersectorsHybrid(accel);
   return new AccelInstance(accel,builder,intersectors);
 }
예제 #2
0
파일: bvh4.cpp 프로젝트: baxelrod/embree
 void createTriangleMeshTriangle4(TriangleMesh* mesh, AccelData*& accel, Builder*& builder)
 {
   if (mesh->numTimeSteps != 1) THROW_RUNTIME_ERROR("internal error");
   accel = new BVH4(Triangle4::type,mesh->parent,LeafMode);
   switch (mesh->flags) {
   case RTC_GEOMETRY_STATIC:     builder = BVH4Triangle4MeshBuilderSAH(accel,mesh,LeafMode); break;
   case RTC_GEOMETRY_DEFORMABLE: builder = BVH4Triangle4MeshRefitSAH(accel,mesh,LeafMode); break;
   case RTC_GEOMETRY_DYNAMIC:    builder = BVH4Triangle4MeshBuilderMortonGeneral(accel,mesh,LeafMode); break;
   default: THROW_RUNTIME_ERROR("internal error"); 
   }
 } 
예제 #3
0
 Builder* BVH4Triangle4MeshRefitSAH  (void* accel, TriangleMesh* mesh, size_t mode) { return new BVHNRefitT<4,TriangleMesh,Triangle4> ((BVH4*)accel,BVH4Triangle4MeshBuilderSAH (accel,mesh,mode),mesh,mode); }