【发布时间】:2013-05-10 10:03:32
【问题描述】:
我需要遍历给定数量的采样点。这些采样点是表示方向的归一化向量。它们应该在代码中计算出来。从前向矢量1, 0 开始,我想围绕原点旋转,以便得出给定数量的方向。
for(int i = 0; i < number_of_sampling_points; ++i)
{
// get direction vector based on i and number_of_sampling_points
// ...
}
例如,number_of_sampling_points 是循环内的4,我想获取值对1, 0、0, 1、-1, 0、0, -1。顺序无关紧要。
【问题讨论】:
标签: c++ for-loop rotation sampling direction