Commit Graph

14 Commits

Author SHA1 Message Date
sfan5 9c3c286aab Optimize code patterns around raycasting 2024-05-03 16:28:29 +02:00
cx384 5958714309
Tool specific pointing and blocking pointable type (#13992) 2024-01-22 18:27:08 +01:00
cx384 2ea8d9ca11
Fix out of range enum casts in deSerialize functions (#14090) 2024-01-17 20:05:46 +01:00
Lars Müller 077627181e
Allow rotating entity selectionboxes (#12379) 2022-10-30 16:53:14 +01:00
fluxionary 6b6f886bcd
object ids are u16, not s16 (#12848) 2022-10-13 08:46:48 -04:00
Dániel Juhász 325bf68041 Raycast: export exact pointing location (#6304)
* Return intersection point in node coordinates.
* Clarify 'intersection_point' documentation
2018-08-16 20:10:08 +02:00
Vitaliy 20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01:00
Dániel Juhász 3caad3f3c9 Expose getPointedThing to Lua
This commit introduces Raycast, a Lua user object, which can be
used to perform a raycast on the map. The ray is continuable, so one can
also get hidden nodes (for example to see trough glass).
2017-07-07 22:28:23 +01:00
Vincent Glize 4a5e8ad343 C++11 cleanup on constructors (#6000)
* C++11 cleanup on constructors dir script
2017-06-19 23:54:58 +02:00
Dániel Juhász 3f8261830e Improve getPointedThing() (#4346)
* Improved getPointedThing()

The new algorithm checks every node exactly once.
Now the point and normal vector of the collision is also returned in the
PointedThing (currently they are not used outside of the function).
Now the CNodeDefManager keeps the union of all possible nodeboxes, so
the raycast won't miss any nodes. Also if there are only small
nodeboxes, getPointedThing() is exceptionally fast.
Also adds unit test for VoxelLineIterator.

* Cleanup, code move

This commit moves getPointedThing() and
Client::getSelectedActiveObject() to ClientEnvironment.
The map nodes now can decide which neighbors they are connecting to
(MapNode::getNeighbors()).
2017-01-04 19:18:40 +01:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
Sfan5 6d0ea26c2d Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam 497ff1ecd6 Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Perttu Ahola 1bc37d576c Initially split utility.h to multiple files in util/ 2012-06-17 01:29:13 +03:00