class Node mutable mat4 localmatrix; ... const mat4& getLocalMatrix() const; .... const mat4& getLocalMatrix() const { if(need_reaclc) localmatrix = CalcLocalMatrix(position,orient,scale); return localmatrix; }