diff options
| author | Ray <[email protected]> | 2021-05-20 19:24:28 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-05-20 19:24:28 +0200 |
| commit | e401d5c48e05efdd8b2cd9857df1f26b03299154 (patch) | |
| tree | 1cb7dc5b89dc0003ed9137d8f6843125df711060 | |
| parent | 9360e4e2c130767f58d787193de0b913bab8cddf (diff) | |
| download | raylib-e401d5c48e05efdd8b2cd9857df1f26b03299154.tar.gz raylib-e401d5c48e05efdd8b2cd9857df1f26b03299154.zip | |
WARNING: RENAMED: MeshBoundingBox() -> GetMeshBoundingBox()
Renamed for consistency with other function in raylib.
| -rw-r--r-- | examples/models/models_loading.c | 4 | ||||
| -rw-r--r-- | examples/models/models_mesh_picking.c | 2 | ||||
| -rw-r--r-- | src/models.c | 2 | ||||
| -rw-r--r-- | src/raylib.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/examples/models/models_loading.c b/examples/models/models_loading.c index a7d34bbd..91e25f4d 100644 --- a/examples/models/models_loading.c +++ b/examples/models/models_loading.c @@ -43,7 +43,7 @@ int main(void) Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position - BoundingBox bounds = MeshBoundingBox(model.meshes[0]); // Set model bounds + BoundingBox 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 @@ -78,7 +78,7 @@ int main(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/models/models_mesh_picking.c b/examples/models/models_mesh_picking.c index 78c7c45c..5dda8df5 100644 --- a/examples/models/models_mesh_picking.c +++ b/examples/models/models_mesh_picking.c @@ -40,7 +40,7 @@ int main(void) tower.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set model diffuse texture Vector3 towerPos = { 0.0f, 0.0f, 0.0f }; // Set model position - BoundingBox towerBBox = MeshBoundingBox(tower.meshes[0]); // Get mesh bounding box + BoundingBox towerBBox = GetMeshBoundingBox(tower.meshes[0]); // Get mesh bounding box bool hitMeshBBox = false; bool hitTriangle = false; diff --git a/src/models.c b/src/models.c index 1e0297d6..f21c930d 100644 --- a/src/models.c +++ b/src/models.c @@ -2617,7 +2617,7 @@ Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize) // Compute mesh bounding box limits // NOTE: minVertex and maxVertex should be transformed by model transform matrix -BoundingBox MeshBoundingBox(Mesh mesh) +BoundingBox GetMeshBoundingBox(Mesh mesh) { // Get min and max vertex to construct bounds (AABB) Vector3 minVertex = { 0 }; diff --git a/src/raylib.h b/src/raylib.h index 51be68d7..916ea372 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1433,7 +1433,7 @@ RLAPI Mesh GenMeshHeightmap(Image heightmap, Vector3 size); RLAPI Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize); // Generate cubes-based map mesh from image data // Mesh manipulation functions -RLAPI BoundingBox MeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits +RLAPI BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits RLAPI void MeshTangents(Mesh *mesh); // Compute mesh tangents RLAPI void MeshBinormals(Mesh *mesh); // Compute mesh binormals |
