From 05c9c7784e3b54a995cd3bcd38b1d1dc3e166d96 Mon Sep 17 00:00:00 2001 From: alexbol99 Date: Wed, 2 Dec 2020 13:48:12 +0200 Subject: [PATCH] - Updated documentation for Ray constructor - Upgraded dependencies to interval-tree and some dev packages - released patch 1.2.17 --- .idea/workspace.xml | 335 +-- dist/main.cjs.js | 12 +- dist/main.esm.js | 12 +- dist/main.umd.js | 12 +- docs/Arc.html | 964 +++---- docs/Box.html | 310 +- docs/Circle.html | 282 +- docs/CircularLinkedList.html | 4 +- docs/DE9IM.html | 138 +- docs/Edge.html | 290 +- docs/Errors.html | 16 +- docs/Face.html | 552 ++-- docs/Line.html | 394 +-- docs/LinkedList.html | 274 +- docs/Matrix.html | 180 +- docs/Multiline.html | 488 ++-- docs/PlanarSet.html | 190 +- docs/Point.html | 494 ++-- docs/Polygon.html | 916 +++--- docs/Ray.html | 104 +- docs/Segment.html | 604 ++-- docs/Vector.html | 604 ++-- docs/algorithms_boolean_op.js.html | 4 +- docs/algorithms_distance.js.html | 4 +- docs/algorithms_inversion.js.html | 4 +- docs/algorithms_ray_shooting.js.html | 4 +- docs/algorithms_relation.js.html | 4 +- docs/classes_arc.js.html | 4 +- docs/classes_box.js.html | 4 +- docs/classes_circle.js.html | 4 +- docs/classes_edge.js.html | 4 +- docs/classes_face.js.html | 4 +- docs/classes_line.js.html | 4 +- docs/classes_matrix.js.html | 4 +- docs/classes_multiline.js.html | 4 +- docs/classes_point.js.html | 7 +- docs/classes_polygon.js.html | 10 +- docs/classes_ray.js.html | 16 +- docs/classes_segment.js.html | 4 +- docs/classes_vector.js.html | 4 +- ...ta_structures_circular_linked_list.js.html | 4 +- docs/data_structures_de9im.js.html | 4 +- docs/data_structures_linked_list.js.html | 4 +- docs/data_structures_planar_set.js.html | 4 +- docs/global.html | 366 +-- docs/index.html | 10 +- docs/module-BooleanOp.html | 56 +- docs/module-RayShoot.html | 6 +- docs/module-Relation.html | 70 +- docs/utils_constants.js.html | 4 +- docs/utils_errors.js.html | 4 +- docs/utils_utils.js.html | 4 +- package-lock.json | 2537 ++++++++++------- package.json | 8 +- src/classes/ray.js | 12 +- 55 files changed, 5353 insertions(+), 5008 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index d500cfa1..c2b1fa63 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,9 +1,59 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + project @@ -118,6 +165,16 @@ + + + + + diff --git a/docs/Box.html b/docs/Box.html index e52bf22a..76b6ebe0 100644 --- a/docs/Box.html +++ b/docs/Box.html @@ -24,7 +24,7 @@
@@ -289,13 +289,13 @@

Members

-

box

+

xmin :number

- Return property box like all other shapes + Minimal x coordinate
@@ -331,7 +331,7 @@

boxSource:
@@ -344,6 +344,16 @@

boxnumber + + + + + @@ -353,13 +363,13 @@

box -

center

+

ymin :number

- Return center of the box + Minimal y coordinate
@@ -395,7 +405,7 @@

centerSource:
@@ -408,6 +418,16 @@

centerType:

+
    +
  • + +number + + +
  • +
+ @@ -417,13 +437,13 @@

center -

high

+

xmax :number

- Property high need for interval tree interface + Maximal x coordinate
@@ -459,7 +479,7 @@

highSource:
@@ -472,6 +492,16 @@

highnumber + + + + + @@ -481,13 +511,13 @@

high -

low

+

ymax :number

- Property low need for interval tree interface + Maximal y coordinate
@@ -523,7 +553,7 @@

lowSource:
@@ -536,6 +566,16 @@

lownumber + + + + + @@ -545,13 +585,13 @@

low -

max

+

low

- Property max returns the box itself ! + Property low need for interval tree interface
@@ -587,7 +627,7 @@

maxSource:
@@ -609,13 +649,13 @@

max -

xmax :number

+

high

- Maximal x coordinate + Property high need for interval tree interface
@@ -651,7 +691,7 @@

xmaxSource:
@@ -664,16 +704,6 @@

xmaxnumber - - - - - @@ -683,13 +713,13 @@

Type:
-

xmin :number

+

max

- Minimal x coordinate + Property max returns the box itself !
@@ -725,7 +755,7 @@

xminSource:
@@ -738,16 +768,6 @@

xminnumber - - - - - @@ -757,13 +777,13 @@

Type:
-

ymax :number

+

center

- Maximal y coordinate + Return center of the box
@@ -799,7 +819,7 @@

ymaxSource:
@@ -812,16 +832,6 @@

ymaxnumber - - - - - @@ -831,13 +841,13 @@

Type:
-

ymin :number

+

box

- Minimal y coordinate + Return property box like all other shapes
@@ -873,7 +883,7 @@

yminSource:
@@ -886,16 +896,6 @@

yminnumber - - - - - @@ -1018,14 +1018,14 @@

Returns:
-

equal_to(other_box) → {boolean}

+

not_intersect(other_box) → {boolean}

- Returns true if this box is equal to other box, false otherwise + Returns true if not intersected with other box
@@ -1061,7 +1061,7 @@

equal_toSource:
@@ -1122,7 +1122,7 @@
Parameters:
- query box + other box to test @@ -1330,14 +1330,14 @@
Returns:
-

less_than(other_box) → {boolean}

+

merge(other_box) → {Box}

- Defines predicate "less than" between two boxes. Need for interval index + Returns new box merged with other box
@@ -1373,7 +1373,7 @@

less_thanSource:
@@ -1434,7 +1434,7 @@
Parameters:
- other box + Other box to merge with @@ -1467,17 +1467,13 @@
Returns:
-boolean +Box
-
- - true if this box less than other box, false otherwise -
-

@@ -1490,14 +1486,14 @@
Returns:
-

merge(other_box) → {Box}

+

less_than(other_box) → {boolean}

- Returns new box merged with other box + Defines predicate "less than" between two boxes. Need for interval index
@@ -1533,7 +1529,7 @@

mergeSource:
@@ -1594,7 +1590,7 @@
Parameters:
- Other box to merge with + other box @@ -1627,13 +1623,17 @@
Returns:
-Box +boolean
+
+ - true if this box less than other box, false otherwise +
+

@@ -1646,14 +1646,14 @@
Returns:
-

not_intersect(other_box) → {boolean}

+

equal_to(other_box) → {boolean}

- Returns true if not intersected with other box + Returns true if this box is equal to other box, false otherwise
@@ -1689,7 +1689,7 @@

not_inte
Source:
@@ -1750,7 +1750,7 @@

Parameters:
- other box to test + query box @@ -2015,14 +2015,14 @@
Parameters:
-

svg(attrs) → {string}

+

toPoints() → {Array.<Point>}

- Return string to draw circle in svg + Transform box into array of points from low left corner in counter clockwise
@@ -2058,7 +2058,7 @@

svgSource:
@@ -2077,58 +2077,6 @@

svg - - - - Name - - - Type - - - - - - Description - - - - - - - - - attrs - - - - - -Object - - - - - - - - - - - an object with attributes of svg rectangle element, like "stroke", "strokeWidth", "fill"
Defaults are stroke:"black", strokeWidth:"1", fill:"none" - - - - - - - - - @@ -2152,7 +2100,7 @@
Returns:
-string +Array.<Point>
@@ -2171,14 +2119,14 @@
Returns:
-

toPoints() → {Array.<Point>}

+

toSegments() → {Array.<Segment>}

- Transform box into array of points from low left corner in counter clockwise + Transform box into array of segments from low left corner in counter clockwise
@@ -2214,7 +2162,7 @@

toPointsSource:
@@ -2256,7 +2204,7 @@
Returns:
-Array.<Point> +Array.<Segment>
@@ -2275,14 +2223,14 @@
Returns:
-

toSegments() → {Array.<Segment>}

+

svg(attrs) → {string}

- Transform box into array of segments from low left corner in counter clockwise + Return string to draw circle in svg
@@ -2318,7 +2266,7 @@

toSegments<
Source:
@@ -2337,6 +2285,58 @@

toSegments< +

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrs + + +Object + + + + + an object with attributes of svg rectangle element, like "stroke", "strokeWidth", "fill"
Defaults are stroke:"black", strokeWidth:"1", fill:"none" + +
+ + @@ -2360,7 +2360,7 @@
Returns:
-Array.<Segment> +string
@@ -2391,7 +2391,7 @@
Returns:

- Generated by JSDoc 3.6.3 on Wed Sep 09 2020 15:25:03 GMT+0300 (Israel Daylight Time) using the Minami theme. + Generated by JSDoc 3.6.3 on Wed Dec 02 2020 13:41:54 GMT+0200 (Israel Standard Time) using the Minami theme.
diff --git a/docs/Circle.html b/docs/Circle.html index 619cf247..e73ed63b 100644 --- a/docs/Circle.html +++ b/docs/Circle.html @@ -24,7 +24,7 @@
@@ -237,13 +237,13 @@

Members

-

box

+

pc :Point

- Circle bounding box + Circle center
@@ -279,7 +279,7 @@

boxSource:
@@ -292,6 +292,16 @@

boxPoint + + + + + @@ -301,13 +311,13 @@

box -

center

+

r :number

- Circle center + Circle radius
@@ -343,7 +353,7 @@

centerSource:
@@ -356,6 +366,16 @@

centerType:

+
    +
  • + +number + + +
  • +
+ @@ -365,7 +385,7 @@

center -

pc :Point

+

center

@@ -407,7 +427,7 @@

pcSource:
@@ -420,16 +440,6 @@

pcPoint - - - - - @@ -439,13 +449,13 @@

Type:
-

r :number

+

box

- Circle radius + Circle bounding box
@@ -481,7 +491,7 @@

rSource:
@@ -494,16 +504,6 @@

rnumber - - - - - @@ -782,14 +782,14 @@

Returns:
-

distanceTo(shape) → {number|Segment}

+

toArc(counterclockwise) → {Arc}

- Calculate distance and shortest segment from circle to shape and return array [distance, shortest segment] + Transform circle to closed arc
@@ -825,7 +825,7 @@

distanceTo<
Source:
@@ -859,6 +859,8 @@

Parameters:
+ Default + Description @@ -869,13 +871,13 @@
Parameters:
- shape + counterclockwise -Shape +boolean @@ -884,9 +886,15 @@
Parameters:
+ + + true + + + - Shape of the one of supported types Point, Line, Circle, Segment, Arc, Polygon or Planar Set + @@ -910,28 +918,8 @@
Parameters:
Returns:
-
    -
  • -
    -
    - Type: -
    -
    -number - - -
    -
    - - -
    - distance from circle to shape -
    -
  • - -
  • @@ -939,18 +927,14 @@
    Returns:
    -Segment +Arc
    -
    - shortest segment between circle and shape (started at circle, ended at shape) -
    -
  • -
+
@@ -1118,14 +1102,14 @@
Returns:
-

svg(attrs) → {string}

+

distanceTo(shape) → {number|Segment}

- Return string to draw circle in svg + Calculate distance and shortest segment from circle to shape and return array [distance, shortest segment]
@@ -1161,7 +1145,7 @@

svgSource:
@@ -1205,13 +1189,13 @@
Parameters:
- attrs + shape -Object +Shape @@ -1222,7 +1206,7 @@
Parameters:
- an object with attributes of svg circle element, like "stroke", "strokeWidth", "fill"
Defaults are stroke:"black", strokeWidth:"1", fill:"none" + Shape of the one of supported types Point, Line, Circle, Segment, Arc, Polygon or Planar Set @@ -1246,8 +1230,28 @@
Parameters:
Returns:
+
    +
  • +
    +
    + Type: +
    +
    +number + + +
    +
    + + +
    + distance from circle to shape +
    +
  • + +
  • @@ -1255,14 +1259,18 @@
    Returns:
    -string +Segment
    - +
    + shortest segment between circle and shape (started at circle, ended at shape) +
    +
  • +
@@ -1274,14 +1282,14 @@
Returns:
-

toArc(counterclockwise) → {Arc}

+

toJSON() → {Object}

- Transform circle to closed arc + This method returns an object that defines how data will be serialized when called JSON.stringify() method
@@ -1317,7 +1325,7 @@

toArcSource:
@@ -1336,66 +1344,6 @@

toArcParameters:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDefaultDescription
counterclockwise - - -boolean - - - - - - true - - - - -
- - @@ -1419,7 +1367,7 @@
Returns:
-Arc +Object
@@ -1438,14 +1386,14 @@
Returns:
-

toJSON() → {Object}

+

svg(attrs) → {string}

- This method returns an object that defines how data will be serialized when called JSON.stringify() method + Return string to draw circle in svg
@@ -1481,7 +1429,7 @@

toJSONSource:
@@ -1500,6 +1448,58 @@

toJSONParameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrs + + +Object + + + + + an object with attributes of svg circle element, like "stroke", "strokeWidth", "fill"
Defaults are stroke:"black", strokeWidth:"1", fill:"none" + +
+ + @@ -1523,7 +1523,7 @@
Returns:
-Object +string
@@ -1554,7 +1554,7 @@
Returns:

- Generated by JSDoc 3.6.3 on Wed Sep 09 2020 15:25:03 GMT+0300 (Israel Daylight Time) using the Minami theme. + Generated by JSDoc 3.6.3 on Wed Dec 02 2020 13:41:54 GMT+0200 (Israel Standard Time) using the Minami theme.
diff --git a/docs/CircularLinkedList.html b/docs/CircularLinkedList.html index e2623d09..6e10ede0 100644 --- a/docs/CircularLinkedList.html +++ b/docs/CircularLinkedList.html @@ -24,7 +24,7 @@
@@ -663,7 +663,7 @@
Returns:

- Generated by JSDoc 3.6.3 on Wed Sep 09 2020 15:25:03 GMT+0300 (Israel Daylight Time) using the Minami theme. + Generated by JSDoc 3.6.3 on Wed Dec 02 2020 13:41:54 GMT+0200 (Israel Standard Time) using the Minami theme.
diff --git a/docs/DE9IM.html b/docs/DE9IM.html index 0a206249..202b5cff 100644 --- a/docs/DE9IM.html +++ b/docs/DE9IM.html @@ -24,7 +24,7 @@
@@ -152,13 +152,13 @@

Members

-

B2B

+

m :Array.<Shape>

- Get Boundary To Boundary intersection + Array representing 3x3 intersection matrix
@@ -194,7 +194,7 @@

B2BSource:
@@ -207,6 +207,16 @@

B2BArray.<Shape> + + + + + @@ -216,13 +226,13 @@

B2B -

B2B

+

I2I

- Set Boundary to Boundary intersection + Get Interior To Interior intersection
@@ -258,7 +268,7 @@

B2BSource:
@@ -280,13 +290,13 @@

B2B -

B2E

+

I2I

- Get Boundary To Exterior intersection + Set Interior To Interior intersection
@@ -322,7 +332,7 @@

B2ESource:
@@ -344,13 +354,13 @@

B2E -

B2E

+

I2B

- Set Boundary to Exterior intersection + Get Interior To Boundary intersection
@@ -386,7 +396,7 @@

B2ESource:
@@ -408,13 +418,13 @@

B2E -

B2I

+

I2B

- Get Boundary To Interior intersection + Set Interior to Boundary intersection
@@ -450,7 +460,7 @@

B2ISource:
@@ -472,13 +482,13 @@

B2I -

B2I

+

I2E

- Set Boundary to Interior intersection + Get Interior To Exterior intersection
@@ -514,7 +524,7 @@

B2ISource:
@@ -536,13 +546,13 @@

B2I -

E2B

+

I2E

- Get Exterior To Boundary intersection + Set Interior to Exterior intersection
@@ -578,7 +588,7 @@

E2BSource:
@@ -600,13 +610,13 @@

E2B -

E2B

+

B2I

- Set Exterior to Boundary intersection + Get Boundary To Interior intersection
@@ -642,7 +652,7 @@

E2BSource:
@@ -664,13 +674,13 @@

E2B -

E2E

+

B2I

- Get Exterior to Exterior intersection + Set Boundary to Interior intersection
@@ -706,7 +716,7 @@

E2ESource:
@@ -728,13 +738,13 @@

E2E -

E2E

+

B2B

- Set Exterior to Exterior intersection + Get Boundary To Boundary intersection
@@ -770,7 +780,7 @@

E2ESource:
@@ -792,13 +802,13 @@

E2E -

E2I

+

B2B

- Get Exterior To Interior intersection + Set Boundary to Boundary intersection
@@ -834,7 +844,7 @@

E2ISource:
@@ -856,13 +866,13 @@

E2I -

E2I

+

B2E

- Set Exterior to Interior intersection + Get Boundary To Exterior intersection
@@ -898,7 +908,7 @@

E2ISource:
@@ -920,13 +930,13 @@

E2I -

I2B

+

B2E

- Get Interior To Boundary intersection + Set Boundary to Exterior intersection
@@ -962,7 +972,7 @@

I2BSource:
@@ -984,13 +994,13 @@

I2B -

I2B

+

E2I

- Set Interior to Boundary intersection + Get Exterior To Interior intersection
@@ -1026,7 +1036,7 @@

I2BSource:
@@ -1048,13 +1058,13 @@

I2B -

I2E

+

E2I

- Get Interior To Exterior intersection + Set Exterior to Interior intersection
@@ -1090,7 +1100,7 @@

I2ESource:
@@ -1112,13 +1122,13 @@

I2E -

I2E

+

E2B

- Set Interior to Exterior intersection + Get Exterior To Boundary intersection
@@ -1154,7 +1164,7 @@

I2ESource:
@@ -1176,13 +1186,13 @@

I2E -

I2I

+

E2B

- Get Interior To Interior intersection + Set Exterior to Boundary intersection
@@ -1218,7 +1228,7 @@

I2ISource:
@@ -1240,13 +1250,13 @@

I2I -

I2I

+

E2E

- Set Interior To Interior intersection + Get Exterior to Exterior intersection
@@ -1282,7 +1292,7 @@

I2ISource:
@@ -1304,13 +1314,13 @@

I2I -

m :Array.<Shape>

+

E2E

- Array representing 3x3 intersection matrix + Set Exterior to Exterior intersection
@@ -1346,7 +1356,7 @@

mSource:
@@ -1359,16 +1369,6 @@

mArray.<Shape> - - - - - @@ -1503,7 +1503,7 @@

Returns:

- Generated by JSDoc 3.6.3 on Wed Sep 09 2020 15:25:03 GMT+0300 (Israel Daylight Time) using the Minami theme. + Generated by JSDoc 3.6.3 on Wed Dec 02 2020 13:41:54 GMT+0200 (Israel Standard Time) using the Minami theme.
diff --git a/docs/Edge.html b/docs/Edge.html index a45b547f..ca34fc04 100644 --- a/docs/Edge.html +++ b/docs/Edge.html @@ -24,7 +24,7 @@
@@ -215,13 +215,13 @@

Members

-

arc_length :number

+

shape :Segment|Arc

- "Arc distance" from the face start + Shape of the edge: Segment or Arc
@@ -257,7 +257,7 @@

arc_length<
Source:
@@ -274,7 +274,10 @@

Type:
+ @@ -353,13 +366,13 @@

box -

bv :*

+

prev :Edge

- Edge inclusion flag (Flatten.INSIDE, Flatten.OUTSIDE, Flatten.BOUNDARY) + Pointer to the previous edge in the face
@@ -395,7 +408,7 @@

bvSource:
@@ -412,7 +425,7 @@
Type:
- @@ -574,13 +584,13 @@
Type:
-

pt :Point

+

middle

- Point a line passes through + Middle point is undefined
@@ -616,7 +626,7 @@

ptSource:
@@ -629,16 +639,6 @@

ptPoint - - - - - @@ -889,14 +889,14 @@

Returns:
-

contains(pt) → {boolean}

+

parallelTo(other_line) → {boolean}

- Returns true if point belongs to line + Return true if parallel or incident to other line
@@ -932,7 +932,7 @@

containsSource:
@@ -976,13 +976,13 @@
Parameters:
- pt + other_line -Point +Line @@ -993,7 +993,7 @@
Parameters:
- Query point + line to check @@ -1045,14 +1045,14 @@
Returns:
-

coord(pt) → {number}

+

incidentTo(other_line) → {boolean}

- Return coordinate of the point that lays on the line in the transformed coordinate system where center is the projection of the point(0,0) to the line and axe y is collinear to the normal vector.
This method assumes that point lays on the line and does not check it + Returns true if incident to other line
@@ -1088,7 +1088,7 @@

coordSource:
@@ -1132,13 +1132,13 @@
Parameters:
- pt + other_line -Point +Line @@ -1149,7 +1149,7 @@
Parameters:
- point on line + line to check @@ -1182,7 +1182,7 @@
Returns:
-number +boolean
@@ -1201,14 +1201,14 @@
Returns:
-

distanceTo(shape) → {Number|Segment}

+

contains(pt) → {boolean}

- Calculate distance and shortest segment from line to shape and returns array [distance, shortest_segment] + Returns true if point belongs to line
@@ -1244,7 +1244,7 @@

distanceTo<
Source:
@@ -1288,13 +1288,13 @@

Parameters:
- shape + pt -Shape +Point @@ -1305,7 +1305,7 @@
Parameters:
- Shape of the one of the types Point, Circle, Segment, Arc, Polygon + Query point @@ -1329,24 +1329,8 @@
Parameters:
Returns:
-
    -
  • -
    -
    - Type: -
    -
    -Number - - -
    -
    - -
  • - -
  • @@ -1354,14 +1338,14 @@
    Returns:
    -Segment +boolean
    -
  • -
+ +
@@ -1373,14 +1357,14 @@
Returns:
-

incidentTo(other_line) → {boolean}

+

coord(pt) → {number}

- Returns true if incident to other line + Return coordinate of the point that lays on the line in the transformed coordinate system where center is the projection of the point(0,0) to the line and axe y is collinear to the normal vector.
This method assumes that point lays on the line and does not check it
@@ -1416,7 +1400,7 @@

incidentTo<
Source:
@@ -1460,13 +1444,13 @@

Parameters:
- other_line + pt -Line +Point @@ -1477,7 +1461,7 @@
Parameters:
- line to check + point on line @@ -1510,7 +1494,7 @@
Returns:
-boolean +number
@@ -1685,14 +1669,14 @@
Returns:
-

parallelTo(other_line) → {boolean}

+

distanceTo(shape) → {Number|Segment}

- Return true if parallel or incident to other line + Calculate distance and shortest segment from line to shape and returns array [distance, shortest_segment]
@@ -1728,7 +1712,7 @@

parallelTo<
Source:
@@ -1772,13 +1756,13 @@

Parameters:
- other_line + shape -Line +Shape @@ -1789,7 +1773,7 @@
Parameters:
- line to check + Shape of the one of the types Point, Circle, Segment, Arc, Polygon @@ -1813,8 +1797,24 @@
Parameters:
Returns:
+
    +
  • +
    +
    + Type: +
    +
    +Number + + +
    +
    + +
  • + +
  • @@ -1822,14 +1822,14 @@
    Returns:
    -boolean +Segment
    - - +
  • +
@@ -1841,14 +1841,14 @@
Returns:
-

sortPoints(pts) → {Array.<Point>}

+

split(pt) → {Array.<Shape>}

- Sort given array of points that lay on line with respect to coordinate on a line The method assumes that points lay on the line and does not check this + Split line with array of points and return array of shapes Assumed that all points lay on the line
@@ -1884,7 +1884,7 @@

sortPoints<
Source:
@@ -1928,7 +1928,7 @@

Parameters:
- pts + pt @@ -1945,7 +1945,7 @@
Parameters:
- array of points + @@ -1978,17 +1978,13 @@
Returns:
-Array.<Point> +Array.<Shape>
-
- new array sorted -
-

@@ -2001,14 +1997,14 @@
Returns:
-

split(pt) → {Array.<Shape>}

+

sortPoints(pts) → {Array.<Point>}

- Split line with array of points and return array of shapes Assumed that all points lay on the line + Sort given array of points that lay on line with respect to coordinate on a line The method assumes that points lay on the line and does not check this
@@ -2044,7 +2040,7 @@

splitSource:
@@ -2088,7 +2084,7 @@
Parameters:
- pt + pts @@ -2105,7 +2101,7 @@
Parameters:
- + array of points @@ -2138,13 +2134,17 @@
Returns:
-Array.<Shape> +Array.<Point>
+
+ new array sorted +
+

@@ -2157,14 +2157,14 @@
Returns:
-

svg(box, attrs)

+

toJSON() → {Object}

- Return string to draw svg segment representing line inside given box + This method returns an object that defines how data will be serialized when called JSON.stringify() method
@@ -2200,7 +2200,7 @@

svgSource:
@@ -2219,95 +2219,38 @@

svg - - - - Name - - - Type - - - Description - - - - - - - box - - - - -Box - - - - - - Box representing drawing area - - - - +
+
Returns:
- - - attrs - + - - - +
+
+ Type: +
+
+ Object - - - - - - +
+
- - an object with attributes of svg circle element - - - - - - - - - - - - - - - - - - +
@@ -2318,14 +2261,14 @@
Parameters:
-

toJSON() → {Object}

+

svg(box, attrs)

- This method returns an object that defines how data will be serialized when called JSON.stringify() method + Return string to draw svg segment representing line inside given box
@@ -2361,7 +2304,7 @@

toJSONSource:
@@ -2380,38 +2323,95 @@

toJSONParameters:

+ + + + + + + + + + + + + + + + + + + + + -
-
Returns:
+ - +
+ -
-
- Type: -
-
- + + +
+ + + + + + + + + + + - + +
NameTypeDescription
box + + +Box + + + Box representing drawing area + +
attrs + + Object - - + + + an object with attributes of svg circle element + +
+ + + + + + + + + + + + + @@ -2434,7 +2434,7 @@
Returns:

- Generated by JSDoc 3.6.3 on Wed Sep 09 2020 15:25:03 GMT+0300 (Israel Daylight Time) using the Minami theme. + Generated by JSDoc 3.6.3 on Wed Dec 02 2020 13:41:54 GMT+0200 (Israel Standard Time) using the Minami theme.
diff --git a/docs/LinkedList.html b/docs/LinkedList.html index f9b33a56..ee1e2e4c 100644 --- a/docs/LinkedList.html +++ b/docs/LinkedList.html @@ -24,7 +24,7 @@
@@ -225,14 +225,14 @@

Methods

-

(static) testInfiniteLoop(first)

+

toArray() → {Array}

- Throw an error if circular loop detected in the linked list + Return array of elements from start to end, If start or end not defined, take first as start, last as end
@@ -268,7 +268,7 @@

(static) Source:
@@ -287,56 +287,6 @@

(static) Parameters:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
first - - -LinkedListElement - - - - - element to start iteration - -
@@ -349,19 +299,22 @@
Parameters:
-
-
Throws:
+
+
Returns:
-
- +
+
+ Type: +
+
-Flatten.Errors.INFINITE_LOOP +Array - -
+ + @@ -369,8 +322,6 @@
Throws:
- -
@@ -716,14 +667,14 @@
Returns:
-

isEmpty() → {boolean}

+

remove(element) → {LinkedList}

- Return true if list is empty + Remove element from the list
@@ -759,7 +710,7 @@

isEmptySource:
@@ -778,6 +729,58 @@

isEmptyParameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
element + + +LinkedListElement + + + + + + +
+ + @@ -801,7 +804,7 @@
Returns:
-boolean +LinkedList
@@ -820,14 +823,14 @@
Returns:
-

remove(element) → {LinkedList}

+

isEmpty() → {boolean}

- Remove element from the list + Return true if list is empty
@@ -863,7 +866,7 @@

removeSource:
@@ -882,58 +885,6 @@

removeParameters:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
element - - -LinkedListElement - - - - - - -
- - @@ -957,7 +908,7 @@
Returns:
-LinkedList +boolean
@@ -976,14 +927,14 @@
Returns:
-

toArray() → {Array}

+

(static) testInfiniteLoop(first)

- Return array of elements from start to end, If start or end not defined, take first as start, last as end + Throw an error if circular loop detected in the linked list
@@ -1019,7 +970,7 @@

toArraySource:
@@ -1038,34 +989,81 @@

toArrayParameters:

+ + + + + + + + + + + + + + + + + + + + + + + -
-
Returns:
+
+ + + + +
NameTypeDescription
first + + +LinkedListElement + + + element to start iteration + +
+ + + + + + + + + + + + +
+
Throws:
-
-
- Type: -
-
+
+ -Array +Flatten.Errors.INFINITE_LOOP -
-
+ +
@@ -1073,6 +1071,8 @@
Returns:
+ +

@@ -1092,7 +1092,7 @@
Returns:

- Generated by JSDoc 3.6.3 on Wed Sep 09 2020 15:25:03 GMT+0300 (Israel Daylight Time) using the Minami theme. + Generated by JSDoc 3.6.3 on Wed Dec 02 2020 13:41:54 GMT+0200 (Israel Standard Time) using the Minami theme.
diff --git a/docs/Matrix.html b/docs/Matrix.html index 7df169dd..47ec09c0 100644 --- a/docs/Matrix.html +++ b/docs/Matrix.html @@ -24,7 +24,7 @@
@@ -492,14 +492,14 @@
Returns:
-

equalTo(matrix) → {boolean}

+

transform(vector) → {Array.<number>}

- Returns true if two matrix are equal parameter by parameter + Transform vector [x,y] using transformation matrix.
Vector [x,y] is an abstract array[2] of numbers and not a FlattenJS object
The result is also an abstract vector [x',y'] = A * [x,y]: [x' [ ax + by + tx y' = cx + dy + ty 1] 1 ]
@@ -535,7 +535,7 @@

equalToSource:
@@ -579,13 +579,13 @@
Parameters:
- matrix + vector -Matrix +Array.<number> @@ -596,7 +596,7 @@
Parameters:
- other matrix + array[2] of numbers @@ -629,7 +629,7 @@
Returns:
-boolean +Array.<number>
@@ -637,7 +637,7 @@
Returns:
- true if equal, false otherwise + transformation result - array[2] of numbers
@@ -808,14 +808,14 @@
Returns:
-

rotate(angle) → {Matrix}

+

translate(tx, ty) → {Matrix}

- Return new matrix as a result of multiplication of the current matrix by the matrix that defines rotation by given angle (in radians) around point (0,0) in counter clockwise direction + Return new matrix as a result of multiplication of the current matrix by the matrix(1,0,0,1,tx,ty)
@@ -851,7 +851,7 @@

rotateSource:
@@ -895,7 +895,7 @@
Parameters:
- angle + tx @@ -912,7 +912,33 @@
Parameters:
- angle in radians + translation by x + + + + + + + + + ty + + + + + +number + + + + + + + + + + + translation by y @@ -964,14 +990,14 @@
Returns:
-

scale(sx, sy) → {Matrix}

+

rotate(angle) → {Matrix}

- Return new matrix as a result of multiplication of the current matrix by the matrix (sx,0,0,sy,0,0) that defines scaling + Return new matrix as a result of multiplication of the current matrix by the matrix that defines rotation by given angle (in radians) around point (0,0) in counter clockwise direction
@@ -1007,7 +1033,7 @@

scaleSource:
@@ -1051,33 +1077,7 @@
Parameters:
- sx - - - - - -number - - - - - - - - - - - - - - - - - - - - sy + angle @@ -1094,7 +1094,7 @@
Parameters:
- + angle in radians @@ -1146,14 +1146,14 @@
Returns:
-

transform(vector) → {Array.<number>}

+

scale(sx, sy) → {Matrix}

- Transform vector [x,y] using transformation matrix.
Vector [x,y] is an abstract array[2] of numbers and not a FlattenJS object
The result is also an abstract vector [x',y'] = A * [x,y]: [x' [ ax + by + tx y' = cx + dy + ty 1] 1 ] + Return new matrix as a result of multiplication of the current matrix by the matrix (sx,0,0,sy,0,0) that defines scaling
@@ -1189,7 +1189,7 @@

transformSource:
@@ -1233,13 +1233,13 @@
Parameters:
- vector + sx -Array.<number> +number @@ -1250,7 +1250,33 @@
Parameters:
- array[2] of numbers + + + + + + + + + + sy + + + + + +number + + + + + + + + + + + @@ -1283,17 +1309,13 @@
Returns:
-Array.<number> +Matrix
-
- transformation result - array[2] of numbers -
-

@@ -1306,14 +1328,14 @@
Returns:
-

translate(tx, ty) → {Matrix}

+

equalTo(matrix) → {boolean}

- Return new matrix as a result of multiplication of the current matrix by the matrix(1,0,0,1,tx,ty) + Returns true if two matrix are equal parameter by parameter
@@ -1349,7 +1371,7 @@

translateSource:
@@ -1393,39 +1415,13 @@
Parameters:
- tx - - - - - -number - - - - - - - - - - - translation by x - - - - - - - - - ty + matrix -number +Matrix @@ -1436,7 +1432,7 @@
Parameters:
- translation by y + other matrix @@ -1469,13 +1465,17 @@
Returns:
-Matrix +boolean
+
+ true if equal, false otherwise +
+

@@ -1500,7 +1500,7 @@
Returns:

- Generated by JSDoc 3.6.3 on Wed Sep 09 2020 15:25:03 GMT+0300 (Israel Daylight Time) using the Minami theme. + Generated by JSDoc 3.6.3 on Wed Dec 02 2020 13:41:54 GMT+0200 (Israel Standard Time) using the Minami theme.
diff --git a/docs/Multiline.html b/docs/Multiline.html index e3acbfce..047f7b81 100644 --- a/docs/Multiline.html +++ b/docs/Multiline.html @@ -24,7 +24,7 @@
@@ -160,13 +160,13 @@

Members

-

box

+

edges

- (Getter) Return bounding box of the multiline + (Getter) Return array of edges
@@ -202,7 +202,7 @@

boxSource:
@@ -224,13 +224,13 @@

box -

edges

+

box

- (Getter) Return array of edges + (Getter) Return bounding box of the multiline
@@ -266,7 +266,7 @@

edgesSource:
@@ -361,14 +361,14 @@

Methods

-

addVertex(pt, edge) → {Edge}

+

clone() → {Multiline}

- Split edge and add new vertex, return new edge inserted + Return new cloned instance of Multiline
@@ -404,7 +404,7 @@

addVertexSource:
@@ -423,84 +423,6 @@

addVertexParameters:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
pt - - -Point - - - - - point on edge that will be added as new vertex - -
edge - - -Edge - - - - - edge to split - -
- - @@ -524,7 +446,7 @@
Returns:
-Edge +Multiline
@@ -543,14 +465,14 @@
Returns:
-

clone() → {Multiline}

+

addVertex(pt, edge) → {Edge}

- Return new cloned instance of Multiline + Split edge and add new vertex, return new edge inserted
@@ -586,7 +508,7 @@

cloneSource:
@@ -605,6 +527,84 @@

cloneParameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
pt + + +Point + + + + + point on edge that will be added as new vertex + +
edge + + +Edge + + + + + edge to split + +
+ + @@ -628,7 +628,7 @@
Returns:
-Multiline +Edge
@@ -647,14 +647,14 @@
Returns:
-

findEdgeByPoint(pt) → {Edge}

+

split(ip) → {Multiline}

- Returns edge which contains given point + Split edges of multiline with intersection points and return mutated multiline
@@ -690,7 +690,7 @@

findEd
Source:
@@ -734,13 +734,13 @@

Parameters:
- pt + ip -Point +Array.<Point> @@ -751,7 +751,7 @@
Parameters:
- + array of points to be added as new vertices @@ -784,7 +784,7 @@
Returns:
-Edge +Multiline
@@ -803,16 +803,14 @@
Returns:
-

rotate(angle, center) → {Multiline}

+

findEdgeByPoint(pt) → {Edge}

- Return new multiline rotated by given angle around given point -If point omitted, rotate around origin (0,0) -Positive value of angle defines rotation counter clockwise, negative - clockwise + Returns edge which contains given point
@@ -848,7 +846,7 @@

rotateSource:
@@ -882,8 +880,6 @@
Parameters:
- Default - Description @@ -894,39 +890,7 @@
Parameters:
- angle - - - - - -number - - - - - - - - - - - 0 - - - - - - rotation angle in radians - - - - - - - - - center + pt @@ -941,13 +905,9 @@
Parameters:
- - - - - rotation center, default is (0,0) + @@ -980,17 +940,13 @@
Returns:
-Multiline +Edge
-
- - new rotated polygon -
-

@@ -1003,14 +959,14 @@
Returns:
-

split(ip) → {Multiline}

+

translate(vec) → {Multiline}

- Split edges of multiline with intersection points and return mutated multiline + Returns new multiline translated by vector vec
@@ -1046,7 +1002,7 @@

splitSource:
@@ -1090,13 +1046,13 @@
Parameters:
- ip + vec -Array.<Point> +Vector @@ -1107,7 +1063,7 @@
Parameters:
- array of points to be added as new vertices + @@ -1159,14 +1115,16 @@
Returns:
-

svg(attrs) → {string}

+

rotate(angle, center) → {Multiline}

- Return string to draw multiline in svg + Return new multiline rotated by given angle around given point +If point omitted, rotate around origin (0,0) +Positive value of angle defines rotation counter clockwise, negative - clockwise
@@ -1202,7 +1160,7 @@

svgSource:
@@ -1236,6 +1194,8 @@
Parameters:
+ Default + Description @@ -1246,22 +1206,60 @@
Parameters:
- attrs + angle + +number + + + + + + 0 + + + - an object with attributes for svg path element, -like "stroke", "strokeWidth", "fill", "fillRule", "fillOpacity" -Defaults are stroke:"black", strokeWidth:"1", fill:"lightcyan", fillRule:"evenodd", fillOpacity: "1" -TODO: support infinite Ray and Line + rotation angle in radians + + + + + + + + + center + + + + + +Point + + + + + + + + + + + + + + + rotation center, default is (0,0) @@ -1294,13 +1292,17 @@
Returns:
-string +Multiline
+
+ - new rotated polygon +
+

@@ -1313,15 +1315,15 @@
Returns:
-

toJSON() → {Object}

+

transform(matrix) → {Multiline}

- This method returns an object that defines how data will be -serialized when called JSON.stringify() method + Return new multiline transformed using affine transformation matrix +Method does not support unbounded shapes
@@ -1357,7 +1359,7 @@

toJSONSource:
@@ -1376,6 +1378,58 @@

toJSONParameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
matrix + + +Matrix + + + + + affine transformation matrix + +
+ + @@ -1399,13 +1453,17 @@
Returns:
-Object +Multiline
+
+ - new multiline +
+

@@ -1522,15 +1580,15 @@
Returns:
-

transform(matrix) → {Multiline}

+

toJSON() → {Object}

- Return new multiline transformed using affine transformation matrix -Method does not support unbounded shapes + This method returns an object that defines how data will be +serialized when called JSON.stringify() method
@@ -1566,7 +1624,7 @@

transformSource:
@@ -1585,58 +1643,6 @@

transformParameters:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
matrix - - -Matrix - - - - - affine transformation matrix - -
- - @@ -1660,17 +1666,13 @@
Returns:
-Multiline +Object
-
- - new multiline -
-

@@ -1683,14 +1685,14 @@
Returns:
-

translate(vec) → {Multiline}

+

svg(attrs) → {string}

- Returns new multiline translated by vector vec + Return string to draw multiline in svg
@@ -1726,7 +1728,7 @@

translateSource:
@@ -1770,16 +1772,11 @@
Parameters:
- vec + attrs - -Vector - - - @@ -1787,7 +1784,10 @@
Parameters:
- + an object with attributes for svg path element, +like "stroke", "strokeWidth", "fill", "fillRule", "fillOpacity" +Defaults are stroke:"black", strokeWidth:"1", fill:"lightcyan", fillRule:"evenodd", fillOpacity: "1" +TODO: support infinite Ray and Line @@ -1820,7 +1820,7 @@
Returns:
-Multiline +string
@@ -1851,10 +1851,10 @@
Returns:

- Generated by JSDoc 3.6.3 on Wed Sep 09 2020 15:25:03 GMT+0300 (Israel Daylight Time) using the Minami theme. + Generated by JSDoc 3.6.3 on Wed Dec 02 2020 13:41:54 GMT+0200 (Israel Standard Time) using the Minami theme.
- \ No newline at end of file + diff --git a/docs/PlanarSet.html b/docs/PlanarSet.html index 95eb6c24..419f54c1 100644 --- a/docs/PlanarSet.html +++ b/docs/PlanarSet.html @@ -24,7 +24,7 @@
@@ -324,14 +324,14 @@
Returns:
-

clear()

+

delete(shape) → {boolean}

- Clear planar set + Delete shape from planar set. Returns true if shape was actually deleted, false otherwise
@@ -367,7 +367,7 @@

clearSource:
@@ -386,20 +386,93 @@

clearParameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
shape + + +Shape + + + + + shape to be deleted + +
+ + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + +

@@ -407,14 +480,14 @@

cleardelete(shape) → {boolean}

+

clear()

- Delete shape from planar set. Returns true if shape was actually deleted, false otherwise + Clear planar set
@@ -450,7 +523,7 @@

deleteSource:
@@ -469,56 +542,12 @@

deleteParameters:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
shape - - -Shape - - - shape to be deleted - -
@@ -527,35 +556,6 @@
Parameters:
- - - - - - -
-
Returns:
- - - -
-
- Type: -
-
- -boolean - - -
-
- - - -
- - -

@@ -563,14 +563,14 @@
Returns:
-

hit(point) → {Array}

+
- Point location test. Returns array of shapes which contains given point + 2d range search in planar set.
Returns array of all shapes in planar set which bounding box is intersected with query box
@@ -606,7 +606,7 @@

hitSource:
@@ -650,13 +650,13 @@
Parameters:
- point + box -Point +Box @@ -667,7 +667,7 @@
Parameters:
- query point + query box @@ -700,7 +700,7 @@
Returns:
-Array +Array.<Shapes>
@@ -719,14 +719,14 @@
Returns:
- +

hit(point) → {Array}

- 2d range search in planar set.
Returns array of all shapes in planar set which bounding box is intersected with query box + Point location test. Returns array of shapes which contains given point
@@ -762,7 +762,7 @@