【发布时间】:2014-03-21 14:23:01
【问题描述】:
我和我的朋友正在使用 Visual Basic 6 开发类似厄运的游戏。我们之前找到了一个示例程序,我们用来创建可以在 3D 平面上渲染顶点的东西。我们只能使用示例程序在顶点组角落的 Y 轴上旋转。但我们希望能够从不同的点旋转顶点。
What we are using to rotate vertices around origin point:
Temp(Current_Vertex).X = (Vertex_List(Current_Vertex).X * Cos(Angle_Y * RADIAN)) + (Vertex_List(Current_Vertex).Z * Sin(Angle_Y * RADIAN))
Temp(Current_Vertex).Y = Vertex_List(Current_Vertex).Y
Temp(Current_Vertex).Z = (Vertex_List(Current_Vertex).X * Sin(Angle_Y * RADIAN)) - (Vertex_List(Current_Vertex).Z * Cos(Angle_Y * RADIAN))
【问题讨论】: