@@ -431,28 +431,28 @@ namespace embree
431431
432432 registerOption (" ambientlight" , [this ] (Ref<ParseStream> cin, const FileName& path) {
433433 const Vec3f L = cin->getVec3f ();
434- futures.push_back ([=]() { scene->add (new SceneGraph::LightNodeImpl<SceneGraph::AmbientLight>(SceneGraph::AmbientLight (L))); });
434+ futures.push_back ([=, this ]() { scene->add (new SceneGraph::LightNodeImpl<SceneGraph::AmbientLight>(SceneGraph::AmbientLight (L))); });
435435 }, " --ambientlight r g b: adds an ambient light with intensity rgb" );
436436 registerOptionAlias (" ambientlight" ," ambient" );
437437
438438 registerOption (" pointlight" , [this ] (Ref<ParseStream> cin, const FileName& path) {
439439 const Vec3f P = cin->getVec3f ();
440440 const Vec3f I = cin->getVec3f ();
441- futures.push_back ([=]() { scene->add (new SceneGraph::LightNodeImpl<SceneGraph::PointLight>(SceneGraph::PointLight (P,I))); });
441+ futures.push_back ([=, this ]() { scene->add (new SceneGraph::LightNodeImpl<SceneGraph::PointLight>(SceneGraph::PointLight (P,I))); });
442442 }, " --pointlight x y z r g b: adds a point light at position xyz with intensity rgb" );
443443
444444 registerOption (" directionallight" , [this ] (Ref<ParseStream> cin, const FileName& path) {
445445 const Vec3f D = cin->getVec3f ();
446446 const Vec3f E = cin->getVec3f ();
447- futures.push_back ([=]() { scene->add (new SceneGraph::LightNodeImpl<SceneGraph::DirectionalLight>(SceneGraph::DirectionalLight (D,E))); });
447+ futures.push_back ([=, this ]() { scene->add (new SceneGraph::LightNodeImpl<SceneGraph::DirectionalLight>(SceneGraph::DirectionalLight (D,E))); });
448448 }, " --directionallight x y z r g b: adds a directional light with direction xyz and intensity rgb" );
449449 registerOptionAlias (" directionallight" ," dirlight" );
450450
451451 registerOption (" distantlight" , [this ] (Ref<ParseStream> cin, const FileName& path) {
452452 const Vec3f D = cin->getVec3f ();
453453 const Vec3f L = cin->getVec3f ();
454454 const float halfAngle = cin->getFloat ();
455- futures.push_back ([=]() { scene->add (new SceneGraph::LightNodeImpl<SceneGraph::DistantLight>(SceneGraph::DistantLight (D,L,halfAngle))); });
455+ futures.push_back ([=, this ]() { scene->add (new SceneGraph::LightNodeImpl<SceneGraph::DistantLight>(SceneGraph::DistantLight (D,L,halfAngle))); });
456456 }, " --distantlight x y z r g b a: adds a distant light with direction xyz, intensity rgb, and opening angle a" );
457457
458458 registerOption (" triangle-plane" , [this ] (Ref<ParseStream> cin, const FileName& path) {
@@ -461,7 +461,7 @@ namespace embree
461461 const Vec3f dy = cin->getVec3f ();
462462 const size_t width = cin->getInt ();
463463 const size_t height = cin->getInt ();
464- futures.push_back ([=]() { scene->add (SceneGraph::createTrianglePlane (p0,dx,dy,width,height,new OBJMaterial)); });
464+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createTrianglePlane (p0,dx,dy,width,height,new OBJMaterial)); });
465465 }, " --triangle-plane p.x p.y p.z dx.x dx.y dx.z dy.x dy.y dy.z width height: adds a plane build of triangles originated at p0 and spanned by the vectors dx and dy with a tessellation width/height." );
466466
467467 registerOption (" quad-plane" , [this ] (Ref<ParseStream> cin, const FileName& path) {
@@ -470,7 +470,7 @@ namespace embree
470470 const Vec3f dy = cin->getVec3f ();
471471 const size_t width = cin->getInt ();
472472 const size_t height = cin->getInt ();
473- futures.push_back ([=]() { scene->add (SceneGraph::createQuadPlane (p0,dx,dy,width,height,new OBJMaterial)); });
473+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createQuadPlane (p0,dx,dy,width,height,new OBJMaterial)); });
474474 }, " --quad-plane p.x p.y p.z dx.x dx.y dx.z dy.x dy.y dy.z width height: adds a plane build of quadrilaterals originated at p0 and spanned by the vectors dx and dy with a tessellation width/height." );
475475
476476 registerOption (" grid-plane" , [this ] (Ref<ParseStream> cin, const FileName& path) {
@@ -479,7 +479,7 @@ namespace embree
479479 const Vec3f dy = cin->getVec3f ();
480480 const size_t width = cin->getInt ();
481481 const size_t height = cin->getInt ();
482- futures.push_back ([=]() { scene->add (SceneGraph::createGridPlane (p0,dx,dy,width,height,new OBJMaterial)); });
482+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createGridPlane (p0,dx,dy,width,height,new OBJMaterial)); });
483483 }, " --grid-plane p.x p.y p.z dx.x dx.y dx.z dy.x dy.y dy.z width height: adds a plane using a grid mesh build. The plane is originated at p0 and spanned by the vectors dx and dy with a tessellation width/height." );
484484
485485 registerOption (" subdiv-plane" , [this ] (Ref<ParseStream> cin, const FileName& path) {
@@ -489,7 +489,7 @@ namespace embree
489489 const size_t width = cin->getInt ();
490490 const size_t height = cin->getInt ();
491491 const float tessellationRate = cin->getFloat ();
492- futures.push_back ([=]() { scene->add (SceneGraph::createSubdivPlane (p0,dx,dy,width,height,tessellationRate,new OBJMaterial)); });
492+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createSubdivPlane (p0,dx,dy,width,height,tessellationRate,new OBJMaterial)); });
493493 }, " --subdiv-plane p.x p.y p.z dx.x dx.y dx.z dy.x dy.y dy.z width height tessellationRate: adds a plane build as a Catmull Clark subdivision surface originated at p0 and spanned by the vectors dx and dy. The plane consists of widt x height many patches, and each patch has the specified tessellation rate." );
494494
495495 registerOption (" hair-plane" , [this ] (Ref<ParseStream> cin, const FileName& path) {
@@ -499,7 +499,7 @@ namespace embree
499499 const float len = cin->getFloat ();
500500 const float r = cin->getFloat ();
501501 const size_t N = cin->getInt ();
502- futures.push_back ([=]() { scene->add (SceneGraph::createHairyPlane (0 ,p0,dx,dy,len,r,N,SceneGraph::FLAT_CURVE ,new OBJMaterial)); });
502+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createHairyPlane (0 ,p0,dx,dy,len,r,N,SceneGraph::FLAT_CURVE ,new OBJMaterial)); });
503503 }, " --hair-plane p.x p.y p.z dx.x dx.y dx.z dy.x dy.y dy.z length radius num: adds a hair plane originated at p0 and spanned by the vectors dx and dy. num hairs are generated with specified length and radius." );
504504
505505 registerOption (" curve-plane" , [this ] (Ref<ParseStream> cin, const FileName& path) {
@@ -509,42 +509,42 @@ namespace embree
509509 const float len = cin->getFloat ();
510510 const float r = cin->getFloat ();
511511 const size_t N = cin->getInt ();
512- futures.push_back ([=]() { scene->add (SceneGraph::createHairyPlane (0 ,p0,dx,dy,len,r,N,SceneGraph::ROUND_CURVE ,new OBJMaterial)); });
512+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createHairyPlane (0 ,p0,dx,dy,len,r,N,SceneGraph::ROUND_CURVE ,new OBJMaterial)); });
513513 }, " --curve-plane p.x p.y p.z dx.x dx.y dx.z dy.x dy.y dy.z length radius: adds a plane build of bezier curves originated at p0 and spanned by the vectors dx and dy. num curves are generated with specified length and radius." );
514514
515515 registerOption (" sphere" , [this ] (Ref<ParseStream> cin, const FileName& path) {
516516 const Vec3f p = cin->getVec3f ();
517517 const float r = cin->getFloat ();
518- futures.push_back ([=]() { scene->add (SceneGraph::createSphere (p, r, new OBJMaterial)); });
518+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createSphere (p, r, new OBJMaterial)); });
519519 }, " --sphere p.x p.y p.z r: adds a sphere at position p with radius r" );
520520
521521 registerOption (" triangle-sphere" , [this ] (Ref<ParseStream> cin, const FileName& path) {
522522 const Vec3f p = cin->getVec3f ();
523523 const float r = cin->getFloat ();
524524 const size_t numPhi = cin->getInt ();
525- futures.push_back ([=]() { scene->add (SceneGraph::createTriangleSphere (p,r,numPhi,new OBJMaterial)); });
525+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createTriangleSphere (p,r,numPhi,new OBJMaterial)); });
526526 }, " --triangle-sphere p.x p.y p.z r numPhi: adds a sphere at position p with radius r and tessellation numPhi build of triangles." );
527527
528528 registerOption (" quad-sphere" , [this ] (Ref<ParseStream> cin, const FileName& path) {
529529 const Vec3f p = cin->getVec3f ();
530530 const float r = cin->getFloat ();
531531 const size_t numPhi = cin->getInt ();
532- futures.push_back ([=]() { scene->add (SceneGraph::createQuadSphere (p,r,numPhi,new OBJMaterial)); });
532+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createQuadSphere (p,r,numPhi,new OBJMaterial)); });
533533 }, " --quad-sphere p.x p.y p.z r numPhi: adds a sphere at position p with radius r and tessellation numPhi build of quadrilaterals." );
534534
535535 registerOption (" grid-sphere" , [this ] (Ref<ParseStream> cin, const FileName& path) {
536536 const Vec3f p = cin->getVec3f ();
537537 const float r = cin->getFloat ();
538538 const size_t N = cin->getInt ();
539- futures.push_back ([=]() { scene->add (SceneGraph::createGridSphere (p,r,N,new OBJMaterial)); });
539+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createGridSphere (p,r,N,new OBJMaterial)); });
540540 }, " --grid-sphere p.x p.y p.z r N: adds a grid sphere at position p with radius r using a cube topology and N*N quads at each face." );
541541
542542 registerOption (" triangle-sphere-mblur" , [this ] (Ref<ParseStream> cin, const FileName& path) {
543543 const Vec3f p = cin->getVec3f ();
544544 const Vec3f dp = cin->getVec3f ();
545545 const float r = cin->getFloat ();
546546 const size_t numPhi = cin->getInt ();
547- futures.push_back ([=]() {
547+ futures.push_back ([=, this ]() {
548548 Ref<SceneGraph::Node> mesh = SceneGraph::createTriangleSphere (p,r,numPhi,new OBJMaterial);
549549 mesh->set_motion_vector (dp);
550550 scene->add (mesh);
@@ -556,7 +556,7 @@ namespace embree
556556 const Vec3f dp = cin->getVec3f ();
557557 const float r = cin->getFloat ();
558558 const size_t numPhi = cin->getInt ();
559- futures.push_back ([=]() {
559+ futures.push_back ([=, this ]() {
560560 Ref<SceneGraph::Node> mesh = SceneGraph::createQuadSphere (p,r,numPhi,new OBJMaterial);
561561 mesh->set_motion_vector (dp);
562562 scene->add (mesh);
@@ -568,15 +568,15 @@ namespace embree
568568 const float r = cin->getFloat ();
569569 const size_t numPhi = cin->getInt ();
570570 const float tessellationRate = cin->getFloat ();
571- futures.push_back ([=]() { scene->add (SceneGraph::createSubdivSphere (p,r,numPhi,tessellationRate,new OBJMaterial)); });
571+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createSubdivSphere (p,r,numPhi,tessellationRate,new OBJMaterial)); });
572572 }, " --subdiv-sphere p.x p.y p.z r numPhi: adds a sphere at position p with radius r build of Catmull Clark subdivision surfaces. The sphere consists of numPhi x numPhi many patches and each path has the specified tessellation rate." );
573573
574574 registerOption (" point-sphere" , [this ] (Ref<ParseStream> cin, const FileName& path) {
575575 const Vec3f p = cin->getVec3f ();
576576 const float r = cin->getFloat ();
577577 const float pointR = cin->getFloat ();
578578 const size_t numPhi = cin->getInt ();
579- futures.push_back ([=]() { scene->add (SceneGraph::createPointSphere (p, r, pointR, numPhi, SceneGraph::SPHERE , new OBJMaterial)); });
579+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createPointSphere (p, r, pointR, numPhi, SceneGraph::SPHERE , new OBJMaterial)); });
580580 }, " --point-sphere p.x p.y p.z r pointR numPhi: adds a sphere at position p with radius r and tessellation numPhi build of spheres." );
581581
582582 registerOption (" point-sphere-mblur" , [this ] (Ref<ParseStream> cin, const FileName& path) {
@@ -585,23 +585,23 @@ namespace embree
585585 const float r = cin->getFloat ();
586586 const float pointR = cin->getFloat ();
587587 const size_t numPhi = cin->getInt ();
588- futures.push_back ([=]() { scene->add (SceneGraph::createPointSphere (p, r, pointR, numPhi, SceneGraph::SPHERE , new OBJMaterial)->set_motion_vector (dp)); });
588+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createPointSphere (p, r, pointR, numPhi, SceneGraph::SPHERE , new OBJMaterial)->set_motion_vector (dp)); });
589589 }, " --point-sphere p.x p.y p.z d.x d.y d.z r pointR numPhi: adds a sphere at position p, motion vector d, with radius r and tessellation numPhi build of spheres." );
590590
591591 registerOption (" disc-sphere" , [this ] (Ref<ParseStream> cin, const FileName& path) {
592592 const Vec3f p = cin->getVec3f ();
593593 const float r = cin->getFloat ();
594594 const float pointR = cin->getFloat ();
595595 const size_t numPhi = cin->getInt ();
596- futures.push_back ([=]() { scene->add (SceneGraph::createPointSphere (p, r, pointR, numPhi, SceneGraph::DISC , new OBJMaterial)); });
596+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createPointSphere (p, r, pointR, numPhi, SceneGraph::DISC , new OBJMaterial)); });
597597 }, " --disc-sphere p.x p.y p.z r pointR numPhi: adds a sphere at position p with radius r and tessellation numPhi build of discs." );
598598
599599 registerOption (" oriented-disc-sphere" , [this ] (Ref<ParseStream> cin, const FileName& path) {
600600 const Vec3f p = cin->getVec3f ();
601601 const float r = cin->getFloat ();
602602 const float pointR = cin->getFloat ();
603603 const size_t numPhi = cin->getInt ();
604- futures.push_back ([=]() { scene->add (SceneGraph::createPointSphere (p, r, pointR, numPhi, SceneGraph::ORIENTED_DISC , new OBJMaterial)); });
604+ futures.push_back ([=, this ]() { scene->add (SceneGraph::createPointSphere (p, r, pointR, numPhi, SceneGraph::ORIENTED_DISC , new OBJMaterial)); });
605605 }, " --oriented-disc-sphere p.x p.y p.z r pointR numPhi: adds a sphere at position p with radius r and tessellation numPhi build of oriented discs." );
606606
607607 registerOption (" print-cameras" , [this ] (Ref<ParseStream> cin, const FileName& path) {
0 commit comments