[Bf-blender-cvs] [1ed18b9] cycles_hair_bvh: Merge branch 'master' into cycles_hair_bvh

Sergey Sharybin noreply at git.blender.org
Thu Apr 21 15:45:36 CEST 2016


Commit: 1ed18b996872a0cdcbbe9b2757ed5b163794c7ef
Author: Sergey Sharybin
Date:   Thu Apr 21 15:41:15 2016 +0200
Branches: cycles_hair_bvh
https://developer.blender.org/rB1ed18b996872a0cdcbbe9b2757ed5b163794c7ef

Merge branch 'master' into cycles_hair_bvh

===================================================================



===================================================================

diff --cc intern/cycles/render/mesh.cpp
index 6a4be69,990f725..cb15f38
--- a/intern/cycles/render/mesh.cpp
+++ b/intern/cycles/render/mesh.cpp
@@@ -496,35 -494,6 +496,35 @@@ void Mesh::pack_curves(Scene *scene, fl
  	}
  }
  
 +void Mesh::refit_bvh(Progress *progress, BVH *bvh)
 +{
 +	Object object;
 +	object.mesh = this;
 +	vector<Object*> objects;
 +	objects.push_back(&object);
 +
 +	bvh->objects = objects;
 +	bvh->refit(*progress);
 +}
 +
 +BVH *Mesh::create_bvh(SceneParams *params,
 +                      Progress *progress,
 +                      int primitive_mask)
 +{
 +	Object object;
 +	object.mesh = this;
 +	vector<Object*> objects;
 +	objects.push_back(&object);
 +
 +	BVHParams bparams;
 +	bparams.use_spatial_split = params->use_bvh_spatial_split;
 +	bparams.use_qbvh = params->use_qbvh;
 +	bparams.primitive_mask = primitive_mask;
 +	BVH *bvh = BVH::create(bparams, objects);
- 	bvh->build(*progress);
++	MEM_GUARDED_CALL(progress, bvh->build, *progress);
 +	return bvh;
 +}
 +
  void Mesh::compute_bvh(SceneParams *params, Progress *progress, int n, int total)
  {
  	if(progress->get_cancel())




More information about the Bf-blender-cvs mailing list