mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-27 17:43:53 +01:00
torus: add comment
This commit is contained in:
parent
bf8c847dc1
commit
57ff577694
@ -4,7 +4,7 @@
|
|||||||
--- Generates a torus shape at the given position with the given parameters.
|
--- Generates a torus shape at the given position with the given parameters.
|
||||||
-- @param position Vector The position at which to generate the torus.
|
-- @param position Vector The position at which to generate the torus.
|
||||||
-- @param major_radius number The major radius of the torus - i.e. the distance from the middle to the ring.
|
-- @param major_radius number The major radius of the torus - i.e. the distance from the middle to the ring.
|
||||||
-- @param minor_radius number The minor radius of the torus - i.e. the radaius fo the ring itself.
|
-- @param minor_radius number The minor radius of the torus - i.e. the radius fo the ring itself.
|
||||||
-- @param target_node string The name of the target node to generate the torus with.
|
-- @param target_node string The name of the target node to generate the torus with.
|
||||||
-- @param axes=xz string|nil The axes upon which the torus should lay flat.
|
-- @param axes=xz string|nil The axes upon which the torus should lay flat.
|
||||||
-- @param hollow=false boolean Whether the generated torus should be hollow or not.
|
-- @param hollow=false boolean Whether the generated torus should be hollow or not.
|
||||||
@ -20,6 +20,7 @@ function worldeditadditions.torus(position, major_radius, minor_radius, target_n
|
|||||||
|
|
||||||
-- Fetch the nodes in the specified area
|
-- Fetch the nodes in the specified area
|
||||||
-- OPTIMIZE: We should be able to calculate a more efficient box-area here
|
-- OPTIMIZE: We should be able to calculate a more efficient box-area here
|
||||||
|
-- This is complicated by the multiple possible axes though
|
||||||
local manip, area = worldedit.manip_helpers.init_radius(position, total_radius)
|
local manip, area = worldedit.manip_helpers.init_radius(position, total_radius)
|
||||||
local data = manip:get_data()
|
local data = manip:get_data()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user