阅读背景:

如何声明操作符/重载函数来操作const变量和非const变量?

来源:互联网 

I have the following code

我有以下代码

#pragma once

#include "material.h"
#include "../Math/vector.h"
#include <cmath>

class LambertianMaterial : public Material
{
public:
    LambertianMaterial(Vector rho);
    Vector brdf(Vector wi) const
    {
        return mRho / M_PI; // Error here
    }

private:
    Vector mRho;
};
#pragma on



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: