From 0483b89b22f0ba3fce6c6e5751a567c8b5df8877 Mon Sep 17 00:00:00 2001 From: PtitLuca <61348595+PtitLuca@users.noreply.github.com> Date: Fri, 18 Jun 2021 11:07:13 +0200 Subject: fix: change MeshBoundingBox to GetMeshBoundingBox I'm currently working with collision for a school project. But I've found that the function's name to get the BoundingBox from a Mesh is not the correct one. --- cheatsheet/raylib_models.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheatsheet/raylib_models.c b/cheatsheet/raylib_models.c index f4721be..6e3c4bb 100644 --- a/cheatsheet/raylib_models.c +++ b/cheatsheet/raylib_models.c @@ -60,7 +60,7 @@ Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize); // Generate cubes-based map mesh from image data // Mesh manipulation functions - BoundingBox MeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits + BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits void MeshTangents(Mesh *mesh); // Compute mesh tangents void MeshBinormals(Mesh *mesh); // Compute mesh binormals -- cgit v1.2.3 From 448d8308b6ee1703d386c230fbd3010a2357695a Mon Sep 17 00:00:00 2001 From: PtitLuca Date: Fri, 18 Jun 2021 11:26:59 +0200 Subject: fix: change all occurences of MeshBoundingBox to GetMeshBoundingBox --- cheatsheet/raylib_models.c | 2 +- examples/web/models/models_loading.c | 4 ++-- examples/web/models/models_mesh_picking.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cheatsheet/raylib_models.c b/cheatsheet/raylib_models.c index f4721be..6e3c4bb 100644 --- a/cheatsheet/raylib_models.c +++ b/cheatsheet/raylib_models.c @@ -60,7 +60,7 @@ Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize); // Generate cubes-based map mesh from image data // Mesh manipulation functions - BoundingBox MeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits + BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits void MeshTangents(Mesh *mesh); // Compute mesh tangents void MeshBinormals(Mesh *mesh); // Compute mesh binormals diff --git a/examples/web/models/models_loading.c b/examples/web/models/models_loading.c index e88c902..439bf49 100644 --- a/examples/web/models/models_loading.c +++ b/examples/web/models/models_loading.c @@ -68,7 +68,7 @@ int main(void) texture = LoadTexture("resources/models/castle_diffuse.png"); // Load model texture model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set map diffuse texture - bounds = MeshBoundingBox(model.meshes[0]); // Set model bounds + bounds = GetMeshBoundingBox(model.meshes[0]); // Set model bounds // NOTE: bounds are calculated from the original size of the model, // if model is scaled on drawing, bounds must be also scaled @@ -124,7 +124,7 @@ void UpdateDrawFrame(void) model = LoadModel(droppedFiles[0]); // Load new model model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set current map diffuse texture - bounds = MeshBoundingBox(model.meshes[0]); + bounds = GetMeshBoundingBox(model.meshes[0]); // TODO: Move camera position from target enough distance to visualize model properly } diff --git a/examples/web/models/models_mesh_picking.c b/examples/web/models/models_mesh_picking.c index 2751918..90105ef 100644 --- a/examples/web/models/models_mesh_picking.c +++ b/examples/web/models/models_mesh_picking.c @@ -72,7 +72,7 @@ int main(void) texture = LoadTexture("resources/models/turret_diffuse.png"); // Load model texture tower.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set model diffuse texture - towerBBox = MeshBoundingBox(tower.meshes[0]); // Get mesh bounding box + towerBBox = GetMeshBoundingBox(tower.meshes[0]); // Get mesh bounding box SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode -- cgit v1.2.3