Sometimes, but not always, Create implementation adds the class name to the return value, like this.
mat4::mat4& mat4::setPos(const vec3& pos)
{
}
Notice the "mat4::" prepended to the return value.
I don't know why this is happening for this class, but not others. The class is below:
struct mat4
{
mat4();
mat4( float cxrx, float cxry, float cxrz, float cxrw,
float cyrx, float cyry, float cyrz, float cyrw,
float czrx, float czry, float czrz, float czrw,
float cwrx, float cwry, float cwrz, float cwrw);
void set(float cxrx, float cxry, float cxrz, float cxrw,
float cyrx, float cyry, float cyrz, float cyrw,
float czrx, float czry, float czrz, float czrw,
float cwrx, float cwry, float cwrz, float cwrw);
mat4& identity();
mat4& transform(const vec3& pos);
mat4& setPos(const vec3& pos);
mat4& lookAt(const vec4& eye, const vec4& target, const vec4& up);
mat4& perspective(float fovY, float aspect, float zNear, float zFar);
mat4& rotate(float rad, const vec3& axis);
mat4& rotateAbout(float rad, const vec3& axis, const vec3& pos = vec3(0.f));
mat4& operator *=(const mat4& n);
mat4 operator *(const mat4& n);
vec4 operator *(const vec4& u);
operator float*();
operator const float*() const;
vec4 x, y, z, w;
};
If need be I can send the referenced header files.