瀏覽代碼

REVIEWED: GenMeshCylinder(), solved issue #1088

pull/1097/head
raysan5 5 年之前
父節點
當前提交
becd3c3831
共有 1 個檔案被更改,包括 1 行新增0 行删除
  1. +1
    -0
      src/models.c

+ 1
- 0
src/models.c 查看文件

@ -1655,6 +1655,7 @@ Mesh GenMeshCylinder(float radius, float height, int slices)
par_shapes_mesh *cylinder = par_shapes_create_cylinder(slices, 8); par_shapes_mesh *cylinder = par_shapes_create_cylinder(slices, 8);
par_shapes_scale(cylinder, radius, radius, height); par_shapes_scale(cylinder, radius, radius, height);
par_shapes_rotate(cylinder, -PI/2.0f, (float[]){ 1, 0, 0 }); par_shapes_rotate(cylinder, -PI/2.0f, (float[]){ 1, 0, 0 });
par_shapes_rotate(cylinder, PI/2.0f, (float[]){ 0, 1, 0});
// Generate an orientable disk shape (top cap) // Generate an orientable disk shape (top cap)
par_shapes_mesh *capTop = par_shapes_create_disk(radius, slices, (float[]){ 0, 0, 0 }, (float[]){ 0, 0, 1 }); par_shapes_mesh *capTop = par_shapes_create_disk(radius, slices, (float[]){ 0, 0, 0 }, (float[]){ 0, 0, 1 });

Loading…
取消
儲存