WARNING: Redesigned structs
- Mesh, Shader, Material structs have been reviewed to minimize size when passed by value, all required code has been reviewed. - GetCollisionRayModel() reviewed to avoid pointer, not required because model is not modified inside the function - UnloadMesh() reviewed, pointer not required - CheckCollisionRay*() parameters name reviewed
This commit is contained in:
parent
2a913b6587
commit
3d5fa81bf2
5 changed files with 105 additions and 81 deletions
|
@ -105,7 +105,7 @@ int main(void)
|
|||
|
||||
// Check ray collision against model
|
||||
// NOTE: It considers model.transform matrix!
|
||||
meshHitInfo = GetCollisionRayModel(ray, &tower);
|
||||
meshHitInfo = GetCollisionRayModel(ray, tower);
|
||||
|
||||
if ((meshHitInfo.hit) && (meshHitInfo.distance < nearestHit.distance))
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@ int main(void)
|
|||
{
|
||||
if (IsFileExtension(droppedFiles[0], ".obj"))
|
||||
{
|
||||
for (int i = 0; i < model.meshCount; i++) UnloadMesh(&model.meshes[i]);
|
||||
for (int i = 0; i < model.meshCount; i++) UnloadMesh(model.meshes[i]);
|
||||
model.meshes = LoadMeshes(droppedFiles[0], &model.meshCount);
|
||||
bounds = MeshBoundingBox(model.meshes[0]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue