[spline/bezier]Put the control points stuffs all in one structure.

This commit is contained in:
xebra committed 2018-10-07 23:54:19 +09:00
1 parent 66833513c0
commit 1c604d5b60
2 files changed
+32 -23

No files matched your search

+16
View File
@@ -198,6 +198,22 @@ struct Weight2D {
}
};
struct ControlPoints {
Vec3f *pos;
Vec2f *tex;
Vec4f *col;
u32_le defcolor;
void Convert(const SimpleVertex *const *points, int size) {
for (int i = 0; i < size; ++i) {
pos[i] = Vec3f(points[i]->pos);
tex[i] = Vec2f(points[i]->uv);
col[i] = Vec4f::FromRGBA(points[i]->color_32);
}
defcolor = points[0]->color_32;
}
};
struct OutputBuffers {
SimpleVertex *vertices;
u16 *indices;