c++ - 在 C++ 中打印 float3& 值
问题描述
这可能是一个非常微不足道的问题,但我通过函数获取参数
bool intersectRaySphere(const float3& p, const float3& d, const float3& c, float r, float& t)
现在我必须使用其中的几个参数。所以我尝试以不同的方式打印 float3&c 的值,例如
float my_value = c[2];
std::cout << "SphereCenter: " << my_value << std::endl;
但是我每次都会遇到编译器错误......我该如何正确地做到这一点?
解决方案
推荐阅读
- jquery - jQuery DataTables Ajax.Data 动态填充复选框选中状态不起作用
- c++ - 模板参数包扩展为单参数模板
- hibernate - JPA @ManyToMany 与 JoinTable 重复条目问题
- typescript - 如何从映射类型变为可区分的联合
- mesos - 当通过马拉松部署 pod 时,mesos master 停用代理
- python - 将预定义的数字分配给数据框中列行的值
- html - CSS 改变列之间内容的顺序
- c# - 依赖解析器的 Automapper IMapper 问题
- vb.net - 从另一个类调用 new() 函数
- sql - 添加一列以填充每个组的排名