ray casting and printf

Published February 22, 2006
Advertisement
...fun with printf and the ray equation.

...Ray origin (players current position): -24.394674 0.000000 8.963964Normalized Ray vector (direction player wants to move): -0.750111 0.000000 0.661312Point on plane (a point on this polygon): -105.251305 -131.641800 -105.308907Normalized plane normal (normal of the polygon): 0.000070 -1.000000 -0.000217Distance from the coordinate system origin to the plane: 131.657335There is no intersection.Ray origin (players current position): -25.219797 0.000000 9.691408Normalized Ray vector (direction player wants to move): -0.736096 0.000000 0.676877Point on plane (a point on this polygon): -131.641815 -131.641815 -105.251305Normalized plane normal (normal of the polygon): -0.000291 -1.000000 0.000000Distance from the coordinate system origin to the plane: 131.680150An intersection will occur at 614149.375000 units from the ray's origin.Point of intersection: -452098.389435 0.000000 415713.071655Ray origin (players current position): -25.219797 0.000000 9.691408Normalized Ray vector (direction player wants to move): -0.736096 0.000000 0.676877Point on plane (a point on this polygon): -131.641815 -131.641815 -105.251305Normalized plane normal (normal of the polygon): -0.000291 -1.000000 0.000000Distance from the coordinate system origin to the plane: 131.680150An intersection will occur at 614149.375000 units from the ray's origin.Point of intersection: -452098.389435 0.000000 415713.071655Ray origin (players current position): -25.219797 0.000000 9.691408Normalized Ray vector (direction player wants to move): -0.736096 0.000000 0.676877Point on plane (a point on this polygon): -105.251305 -131.641800 -105.308907Normalized plane normal (normal of the polygon): 0.000070 -1.000000 -0.000217Distance from the coordinate system origin to the plane: 131.657335There is no intersection.Ray origin (players current position): -26.029503 0.000000 10.435972Normalized Ray vector (direction player wants to move): -0.724172 0.000000 0.689620Point on plane (a point on this polygon): -131.641815 -131.641815 -105.251305Normalized plane normal (normal of the polygon): -0.000291 -1.000000 0.000000Distance from the coordinate system origin to the plane: 131.680150An intersection will occur at 624261.437500 units from the ray's origin.Point of intersection: -452098.383125 0.000000 430513.545323Ray origin (players current position): -26.029503 0.000000 10.435972Normalized Ray vector (direction player wants to move): -0.724172 0.000000 0.689620Point on plane (a point on this polygon): -131.641815 -131.641815 -105.251305Normalized plane normal (normal of the polygon): -0.000291 -1.000000 0.000000Distance from the coordinate system origin to the plane: 131.680150An intersection will occur at 624261.437500 units from the ray's origin.Point of intersection: -452098.383125 0.000000 430513.545323Ray origin (players current position): -26.029503 0.000000 10.435972Normalized Ray vector (direction player wants to move): -0.724172 0.000000 0.689620Point on plane (a point on this polygon): -105.251305 -131.641800 -105.308907Normalized plane normal (normal of the polygon): 0.000070 -1.000000 -0.000217Distance from the coordinate system origin to the plane: 131.657335There is no intersection.Ray origin (players current position): -26.826092 0.000000 11.194554Normalized Ray vector (direction player wants to move): -0.704634 0.000000 0.709571Point on plane (a point on this polygon): -131.641815 -131.641815 -105.251305Normalized plane normal (normal of the polygon): -0.000291 -1.000000 0.000000Distance from the coordinate system origin to the plane: 131.680150An intersection will occur at 641569.562500 units from the ray's origin.Point of intersection: -452098.407156 0.000000 455250.467820Ray origin (players current position): -26.826092 0.000000 11.194554Normalized Ray vector (direction player wants to move): -0.704634 0.000000 0.709571Point on plane (a point on this polygon): -131.641815 -131.641815 -105.251305Normalized plane normal (normal of the polygon): -0.000291 -1.000000 0.000000Distance from the coordinate system origin to the plane: 131.680150An intersection will occur at 641569.562500 units from the ray's origin.Point of intersection: -452098.407156 0.000000 455250.467820Ray origin (players current position): -26.826092 0.000000 11.194554Normalized Ray vector (direction player wants to move): -0.704634 0.000000 0.709571Point on plane (a point on this polygon): -105.251305 -131.641800 -105.308907Normalized plane normal (normal of the polygon): 0.000070 -1.000000 -0.000217Distance from the coordinate system origin to the plane: 131.657335There is no intersection.Ray origin (players current position): -27.601189 0.000000 11.975082Normalized Ray vector (direction player wants to move): -0.669130 0.000000 0.743145Point on plane (a point on this polygon): -131.641815 -131.641815 -105.251305Normalized plane normal (normal of the polygon): -0.000291 -1.000000 0.000000Distance from the coordinate system origin to the plane: 131.680150An intersection will occur at 675609.437500 units from the ray's origin.Point of intersection: -452098.404160 0.000000 502087.743091Ray origin (players current position): -27.601189 0.000000 11.975082Normalized Ray vector (direction player wants to move): -0.669130 0.000000 0.743145Point on plane (a point on this polygon): -131.641815 -131.641815 -105.251305Normalized plane normal (normal of the polygon): -0.000291 -1.000000 0.000000Distance from the coordinate system origin to the plane: 131.680150An intersection will occur at 675609.437500 units from the ray's origin.Point of intersection: -452098.404160 0.000000 502087.743091Ray origin (players current position): -27.601189 0.000000 11.975082Normalized Ray vector (direction player wants to move): -0.669130 0.000000 0.743145Point on plane (a point on this polygon): -105.251305 -131.641800 -105.308907Normalized plane normal (normal of the polygon): 0.000070 -1.000000 -0.000217Distance from the coordinate system origin to the plane: 131.657335There is no intersection.Ray origin (players current position): -28.337233 0.000000 12.792542Normalized Ray vector (direction player wants to move): -0.634730 0.000000 0.772734Point on plane (a point on this polygon): -131.641815 -131.641815 -105.251305Normalized plane normal (normal of the polygon): -0.000291 -1.000000 0.000000Distance from the coordinate system origin to the plane: 131.680150An intersection will occur at 712224.562500 units from the ray's origin.Point of intersection: -452098.408297 0.000000 550373.130179Ray origin (players current position): -28.337233 0.000000 12.792542Normalized Ray vector (direction player wants to move): -0.634730 0.000000 0.772734Point on plane (a point on this polygon): -131.641815 -131.641815 -105.251305Normalized plane normal (normal of the polygon): -0.000291 -1.000000 0.000000Distance from the coordinate system origin to the plane: 131.680150An intersection will occur at 712224.562500 units from the ray's origin.Point of intersection: -452098.408297 0.000000 550373.130179Ray origin (players current position): -28.337233 0.000000 12.792542Normalized Ray vector (direction player wants to move): -0.634730 0.000000 0.772734Point on plane (a point on this polygon): -105.251305 -131.641800 -105.308907Normalized plane normal (normal of the polygon): 0.000070 -1.000000 -0.000217Distance from the coordinate system origin to the plane: 131.657335There is no intersection.Ray origin (players current position): -29.035435 0.000000 13.642550Normalized Ray vector (direction player wants to move): -0.604598 0.000000 0.796530Point on plane (a point on this polygon): -131.641815 -131.641815 -105.251305Normalized plane normal (normal of the polygon): -0.000291 -1.000000 0.000000Distance from the coordinate system origin to the plane: 131.680150An intersection will occur at 747718.500000 units from the ray's origin.Point of intersection: -452098.401844 0.000000 595594.222113Ray origin (players current position): -29.035435 0.000000 13.642550Normalized Ray vector (direction player wants to move): -0.604598 0.000000 0.796530Point on plane (a point on this polygon): -131.641815 -131.641815 -105.251305Normalized plane normal (normal of the polygon): -0.000291 -1.000000 0.000000Distance from the coordinate system origin to the plane: 131.680150An intersection will occur at 747718.500000 units from the ray's origin.Point of intersection: -452098.401844 0.000000 595594.222113...
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement