How do I print vector values of type glm::vec3 that have been passed by reference?

前端 未结 5 1615
星月不相逢
星月不相逢 2020-12-25 10:12

I have a small obj loader and it takes two parameters and passes them back to the input variables.. however this is my first time doing this and i\'m not sure how to print s

5条回答
  •  时光取名叫无心
    2020-12-25 10:44

    GLM has operator<<() in

    #include 
    #include 
    #include 
    
    int main()
    {
       glm::vec3 v(1.0f, 2.0f, 3.0f);
       std::cout << v << std::endl;
    }
    

    Output is:

    [    1.000,    2.000,    3.000]
    

提交回复
热议问题