Updated example ex07b_3d_shapes
This commit is contained in:
parent
907fb14c79
commit
4df2c5e06e
3 changed files with 13 additions and 15 deletions
|
@ -18,8 +18,6 @@ int main()
|
||||||
int screenWidth = 800;
|
int screenWidth = 800;
|
||||||
int screenHeight = 450;
|
int screenHeight = 450;
|
||||||
|
|
||||||
Vector3 position = { 0.0, 0.0, 0.0 };
|
|
||||||
|
|
||||||
// Define the camera to look into our 3d world
|
// Define the camera to look into our 3d world
|
||||||
Camera camera = {{ 0.0, 10.0, 10.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }};
|
Camera camera = {{ 0.0, 10.0, 10.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }};
|
||||||
|
|
||||||
|
@ -44,20 +42,20 @@ int main()
|
||||||
|
|
||||||
Begin3dMode(camera);
|
Begin3dMode(camera);
|
||||||
|
|
||||||
DrawCube(position, 2, 2, 2, RED); // Draw a cube
|
DrawCube((Vector3){-4, 0, 2}, 2, 5, 2, RED);
|
||||||
DrawCubeWires(position, 2, 2, 2, MAROON); // Draw a wired-cube
|
DrawCubeWires((Vector3){-4, 0, 2}, 2, 5, 2, GOLD);
|
||||||
|
DrawCubeWires((Vector3){-4, 0, -2}, 3, 6, 2, MAROON);
|
||||||
|
|
||||||
// TODO: Draw some basic 3d shapes
|
DrawSphere((Vector3){-1, 0, -2}, 1, GREEN);
|
||||||
/*
|
DrawSphereWires((Vector3){1, 0, 2}, 2, LIME);
|
||||||
void DrawCube(Vector3 position, float width, float height, float lenght, Color color);
|
|
||||||
void DrawCubeV(Vector3 position, Vector3 size, Color color);
|
DrawCylinder((Vector3){4, 0, -2}, 1, 2, 3, 4, SKYBLUE);
|
||||||
void DrawCubeWires(Vector3 position, float width, float height, float lenght, Color color);
|
DrawCylinderWires((Vector3){4, 0, -2}, 1, 2, 3, 4, DARKBLUE);
|
||||||
void DrawSphere(Vector3 centerPos, float radius, Color color);
|
DrawCylinderWires((Vector3){4.5, -1, 2}, 1, 1, 2, 6, BROWN);
|
||||||
void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color);
|
|
||||||
void DrawSphereWires(Vector3 centerPos, float radius, Color color);
|
DrawCylinder((Vector3){1, 0, -4}, 0, 1.5, 3, 8, GOLD);
|
||||||
void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color);
|
DrawCylinderWires((Vector3){1, 0, -4}, 0, 1.5, 3, 8, PINK);
|
||||||
void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color);
|
|
||||||
*/
|
|
||||||
DrawGrid(10.0, 1.0); // Draw a grid
|
DrawGrid(10.0, 1.0); // Draw a grid
|
||||||
|
|
||||||
End3dMode();
|
End3dMode();
|
||||||
|
|
BIN
examples/ex07b_3d_shapes.exe
Normal file
BIN
examples/ex07b_3d_shapes.exe
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 24 KiB |
Loading…
Add table
Add a link
Reference in a new issue