Renamed RayHitInfo variables
This commit is contained in:
parent
7f6b16add4
commit
0880be638e
2 changed files with 7 additions and 7 deletions
10
src/models.c
10
src/models.c
|
@ -1541,11 +1541,11 @@ RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3)
|
||||||
result.hit = true;
|
result.hit = true;
|
||||||
result.distance = t;
|
result.distance = t;
|
||||||
result.hit = true;
|
result.hit = true;
|
||||||
result.hitNormal = VectorCrossProduct(edge1, edge2);
|
result.normal = VectorCrossProduct(edge1, edge2);
|
||||||
VectorNormalize(&result.hitNormal);
|
VectorNormalize(&result.normal);
|
||||||
Vector3 rayDir = ray.direction;
|
Vector3 rayDir = ray.direction;
|
||||||
VectorScale(&rayDir, t);
|
VectorScale(&rayDir, t);
|
||||||
result.hitPosition = VectorAdd(ray.position, rayDir);
|
result.position = VectorAdd(ray.position, rayDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -1568,8 +1568,8 @@ RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight)
|
||||||
VectorScale(&rayDir, t);
|
VectorScale(&rayDir, t);
|
||||||
result.hit = true;
|
result.hit = true;
|
||||||
result.distance = t;
|
result.distance = t;
|
||||||
result.hitNormal = (Vector3){ 0.0, 1.0, 0.0 };
|
result.normal = (Vector3){ 0.0, 1.0, 0.0 };
|
||||||
result.hitPosition = VectorAdd(ray.position, rayDir);
|
result.position = VectorAdd(ray.position, rayDir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -479,8 +479,8 @@ typedef struct Ray {
|
||||||
typedef struct RayHitInfo {
|
typedef struct RayHitInfo {
|
||||||
bool hit; // Did the ray hit something?
|
bool hit; // Did the ray hit something?
|
||||||
float distance; // Distance to nearest hit
|
float distance; // Distance to nearest hit
|
||||||
Vector3 hitPosition; // Position of nearest hit
|
Vector3 position; // Position of nearest hit
|
||||||
Vector3 hitNormal; // Surface normal of hit
|
Vector3 normal; // Surface normal of hit
|
||||||
} RayHitInfo;
|
} RayHitInfo;
|
||||||
|
|
||||||
// Wave type, defines audio wave data
|
// Wave type, defines audio wave data
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue