extendDirection is already defines as glm::vec3 in that particular scope.