Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/135.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ PBRT到世界变换_C++_Transformation_Coordinate Systems_Pbr_Pbrt - Fatal编程技术网

C++ PBRT到世界变换

C++ PBRT到世界变换,c++,transformation,coordinate-systems,pbr,pbrt,C++,Transformation,Coordinate Systems,Pbr,Pbrt,我习惯于使用nori渲染引擎,并尝试将一些代码转换为pbrt,以便更轻松地创建具有分析球体的场景。我试图从半球体中提取一个向量,将其转换为着色法线的坐标系,但我很难找到清晰的方法。我希望我的代码看起来像这样: scene.Intersection(ray,&isect); Vector3f localDir = SampleUniformHemisphere(); Vector3f worldDir = isect.shadingFrame.toWorld(loc

我习惯于使用nori渲染引擎,并尝试将一些代码转换为pbrt,以便更轻松地创建具有分析球体的场景。我试图从半球体中提取一个向量,将其转换为着色法线的坐标系,但我很难找到清晰的方法。我希望我的代码看起来像这样:

    scene.Intersection(ray,&isect);
    Vector3f localDir = SampleUniformHemisphere();
    Vector3f worldDir = isect.shadingFrame.toWorld(localDir);
你有什么建议吗