summaryrefslogtreecommitdiffhomepage
path: root/examples/models
diff options
context:
space:
mode:
authorRay <[email protected]>2017-05-17 01:06:05 +0200
committerGitHub <[email protected]>2017-05-17 01:06:05 +0200
commitb6b01f5420935c770e15ca60dd40147d0e5487aa (patch)
treeef37651bcfae038ef059e2813413857aec6f7b11 /examples/models
parentf8a4498a242e685e528bd1ac6d84378947daff7d (diff)
parent1e2d3d93fe7808f27a4d1ac1d43133f785694019 (diff)
downloadraylib-b6b01f5420935c770e15ca60dd40147d0e5487aa.tar.gz
raylib-b6b01f5420935c770e15ca60dd40147d0e5487aa.zip
Merge pull request #287 from raysan5/develop
Integrate develop branch
Diffstat (limited to 'examples/models')
-rw-r--r--examples/models/models_mesh_picking.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/examples/models/models_mesh_picking.c b/examples/models/models_mesh_picking.c
index 0b5247ec..ec151599 100644
--- a/examples/models/models_mesh_picking.c
+++ b/examples/models/models_mesh_picking.c
@@ -89,7 +89,7 @@ int main()
cursorColor = PURPLE;
hitObjectName = "Triangle";
- bary = VectorBarycenter(nearestHit.hitPosition, ta, tb, tc);
+ bary = VectorBarycenter(nearestHit.position, ta, tb, tc);
hitTriangle = true;
}
else hitTriangle = false;
@@ -136,15 +136,15 @@ int main()
// If we hit something, draw the cursor at the hit point
if (nearestHit.hit)
{
- DrawCube(nearestHit.hitPosition, 0.3, 0.3, 0.3, cursorColor);
- DrawCubeWires(nearestHit.hitPosition, 0.3, 0.3, 0.3, RED);
+ DrawCube(nearestHit.position, 0.3, 0.3, 0.3, cursorColor);
+ DrawCubeWires(nearestHit.position, 0.3, 0.3, 0.3, RED);
Vector3 normalEnd;
- normalEnd.x = nearestHit.hitPosition.x + nearestHit.hitNormal.x;
- normalEnd.y = nearestHit.hitPosition.y + nearestHit.hitNormal.y;
- normalEnd.z = nearestHit.hitPosition.z + nearestHit.hitNormal.z;
+ normalEnd.x = nearestHit.position.x + nearestHit.normal.x;
+ normalEnd.y = nearestHit.position.y + nearestHit.normal.y;
+ normalEnd.z = nearestHit.position.z + nearestHit.normal.z;
- DrawLine3D(nearestHit.hitPosition, normalEnd, RED);
+ DrawLine3D(nearestHit.position, normalEnd, RED);
}
DrawRay(ray, MAROON);
@@ -163,14 +163,14 @@ int main()
DrawText(FormatText("Distance: %3.2f", nearestHit.distance), 10, ypos, 10, BLACK);
DrawText(FormatText("Hit Pos: %3.2f %3.2f %3.2f",
- nearestHit.hitPosition.x,
- nearestHit.hitPosition.y,
- nearestHit.hitPosition.z), 10, ypos + 15, 10, BLACK);
+ nearestHit.position.x,
+ nearestHit.position.y,
+ nearestHit.position.z), 10, ypos + 15, 10, BLACK);
DrawText(FormatText("Hit Norm: %3.2f %3.2f %3.2f",
- nearestHit.hitNormal.x,
- nearestHit.hitNormal.y,
- nearestHit.hitNormal.z), 10, ypos + 30, 10, BLACK);
+ nearestHit.normal.x,
+ nearestHit.normal.y,
+ nearestHit.normal.z), 10, ypos + 30, 10, BLACK);
if (hitTriangle) DrawText(FormatText("Barycenter: %3.2f %3.2f %3.2f", bary.x, bary.y, bary.z), 10, ypos + 45, 10, BLACK);
}