From 04dcd850d6c5609bd5ecea2c60b0be0148571d61 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Tue, 11 Mar 2014 08:30:01 +0100 Subject: APIDump: Removed old documentation, documented some new functions. --- MCServer/Plugins/APIDump/Classes/Geometry.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'MCServer/Plugins/APIDump/Classes') diff --git a/MCServer/Plugins/APIDump/Classes/Geometry.lua b/MCServer/Plugins/APIDump/Classes/Geometry.lua index e83d6e4b1..6f95c4cbf 100644 --- a/MCServer/Plugins/APIDump/Classes/Geometry.lua +++ b/MCServer/Plugins/APIDump/Classes/Geometry.lua @@ -76,6 +76,7 @@ return DifY = { Params = "", Return = "number", Notes = "Returns the difference between the two Y coords (Y-size minus 1). Assumes sorted." }, DifZ = { Params = "", Return = "number", Notes = "Returns the difference between the two Z coords (Z-size minus 1). Assumes sorted." }, DoesIntersect = { Params = "OtherCuboid", Return = "bool", Notes = "Returns true if this cuboid has at least one voxel in common with OtherCuboid. Note that edges are considered inclusive. Assumes both sorted." }, + Engulf = { Params = "{{Vector3i|Point}}", Return = "", Notes = "If needed, expands the cuboid to include the specified point. Doesn't shrink. Assumes sorted. " }, Expand = { Params = "SubMinX, AddMaxX, SubMinY, AddMaxY, SubMinZ, AddMaxZ", Return = "", Notes = "Expands the cuboid by the specified amount in each direction. Works on unsorted cuboids as well. NOTE: this function doesn't check for underflows." }, GetVolume = { Params = "", Return = "number", Notes = "Returns the volume of the cuboid, in blocks. Note that the volume considers both coords inclusive. Works on unsorted cuboids, too." }, IsCompletelyInside = { Params = "OuterCuboid", Return = "bool", Notes = "Returns true if this cuboid is completely inside (in all directions) in OuterCuboid. Assumes both sorted." }, @@ -308,6 +309,7 @@ end }, Equals = { Params = "Vector3i", Return = "bool", Notes = "Returns true if this vector is exactly the same as the specified vector." }, Length = { Params = "", Return = "number", Notes = "Returns the (euclidean) length of this vector." }, + Move = { Params = "X, Y, Z", Return = "", Notes = "Moves the vector by the specified amount in each axis direction." }, Set = { Params = "x, y, z", Return = "", Notes = "Sets all the coords of the vector at once" }, SqrLength = { Params = "", Return = "number", Notes = "Returns the (euclidean) length of this vector, squared. This operation is slightly less computationally expensive than Length(), while it conserves some properties of Length(), such as comparison." }, }, -- cgit v1.2.3 From 0442c41c872badfcc1a7a22c293161cc752623b8 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 15 Mar 2014 07:50:39 +0100 Subject: Added cCuboid:Assign(OtherCuboid) API function. --- MCServer/Plugins/APIDump/Classes/Geometry.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'MCServer/Plugins/APIDump/Classes') diff --git a/MCServer/Plugins/APIDump/Classes/Geometry.lua b/MCServer/Plugins/APIDump/Classes/Geometry.lua index 6f95c4cbf..78cd94f0c 100644 --- a/MCServer/Plugins/APIDump/Classes/Geometry.lua +++ b/MCServer/Plugins/APIDump/Classes/Geometry.lua @@ -63,12 +63,16 @@ return { constructor = { - { Params = "OtheCuboid", Return = "cCuboid", Notes = "Creates a new Cuboid object as a copy of OtherCuboid" }, + { Params = "OtherCuboid", Return = "cCuboid", Notes = "Creates a new Cuboid object as a copy of OtherCuboid" }, { Params = "{{Vector3i|Point1}}, {{Vector3i|Point2}}", Return = "cCuboid", Notes = "Creates a new Cuboid object with the specified points as its corners." }, { Params = "X, Y, Z", Return = "cCuboid", Notes = "Creates a new Cuboid object with the specified point as both its corners (the cuboid has a size of 1 in each direction)." }, { Params = "X1, Y1, Z1, X2, Y2, Z2", Return = "cCuboid", Notes = "Creates a new Cuboid object with the specified points as its corners." }, }, - Assign = { Params = "X1, Y1, Z1, X2, Y2, Z2", Return = "", Notes = "Assigns all the coords stored in the cuboid. Sort-state is ignored." }, + Assign = + { + { Params = "SrcCuboid", Return = "", Notes = "Copies all the coords from the src cuboid to this cuboid. Sort-state is ignored." }, + { Params = "X1, Y1, Z1, X2, Y2, Z2", Return = "", Notes = "Assigns all the coords to the specified values. Sort-state is ignored." }, + }, ClampX = { Params = "MinX, MaxX", Return = "", Notes = "Clamps both X coords into the range provided. Sortedness-agnostic." }, ClampY = { Params = "MinY, MaxY", Return = "", Notes = "Clamps both Y coords into the range provided. Sortedness-agnostic." }, ClampZ = { Params = "MinZ, MaxZ", Return = "", Notes = "Clamps both Z coords into the range provided. Sortedness-agnostic." }, -- cgit v1.2.3 From d364c7befce884cac2347459512376937d2b8e69 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 15 Mar 2014 08:23:06 +0100 Subject: APIDump: Documented a forgotten cCuboid constructor. --- MCServer/Plugins/APIDump/Classes/Geometry.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'MCServer/Plugins/APIDump/Classes') diff --git a/MCServer/Plugins/APIDump/Classes/Geometry.lua b/MCServer/Plugins/APIDump/Classes/Geometry.lua index 78cd94f0c..9887bfb89 100644 --- a/MCServer/Plugins/APIDump/Classes/Geometry.lua +++ b/MCServer/Plugins/APIDump/Classes/Geometry.lua @@ -53,7 +53,7 @@ return { Desc = [[ cCuboid offers some native support for integral-boundary cuboids. A cuboid internally consists of - two {{Vector3i}}s. By default the cuboid doesn't make any assumptions about the defining points, + two {{Vector3i}}-s. By default the cuboid doesn't make any assumptions about the defining points, but for most of the operations in the cCuboid class, the p1 member variable is expected to be the minima and the p2 variable the maxima. The Sort() function guarantees this condition.

@@ -63,6 +63,7 @@ return { constructor = { + { Params = "", Return = "cCuboid", Notes = "Creates a new Cuboid object with all-zero coords" }, { Params = "OtherCuboid", Return = "cCuboid", Notes = "Creates a new Cuboid object as a copy of OtherCuboid" }, { Params = "{{Vector3i|Point1}}, {{Vector3i|Point2}}", Return = "cCuboid", Notes = "Creates a new Cuboid object with the specified points as its corners." }, { Params = "X, Y, Z", Return = "cCuboid", Notes = "Creates a new Cuboid object with the specified point as both its corners (the cuboid has a size of 1 in each direction)." }, -- cgit v1.2.3