everness/types/pointed-thing.type.lua

13 lines
1.2 KiB
Lua

---@diagnostic disable: codestyle-check, duplicate-doc-alias, duplicate-doc-field
---https://github.com/sumneko/lua-language-server/wiki
---Pointed thing definition
---@class PointedThingDef
---@field type string e.g. `{type="nothing"}` `{type="node"}` `{type="object"}`
---@field under Vector Refers to the node position behind the pointed face.
---@field above Vector Refers to the node position in front of the pointed face.
---@field ref ObjectRef e.g. `{type="object", ref=ObjectRef}`
---@field intersection_point Vector Exact pointing location (currently only `Raycast` supports these field). The absolute world coordinates of the point on the selection box which is pointed at. May be in the selection box if the pointer is in the box too.
---@field box_id number|integer Exact pointing location (currently only `Raycast` supports these field). The ID of the pointed selection box (counting starts from 1).
---@field intersection_normal Vector Exact pointing location (currently only `Raycast` supports these field). Unit vector, points outwards of the selected selection box. This specifies which face is pointed at. Is a null vector `vector.zero()` when the pointer is inside the selection box.