@@ -39,7 +39,6 @@ const MAX_CACHE_ENTRIES = 38000; // set to never allows the cache array over 480
39
39
export class CysConverter {
40
40
41
41
/**
42
- *
43
42
* @param {object } plot
44
43
*/
45
44
constructor ( plot ) {
@@ -57,8 +56,8 @@ export class CysConverter {
57
56
58
57
/**
59
58
*
60
- * @param wp world point
61
- * @param imp Image Point
59
+ * @param { WorldPt } wp world point
60
+ * @param { ImagePt } imp Image Point
62
61
*/
63
62
putInConversionCache ( wp , imp ) {
64
63
if ( SimpleMemCache . size ( this . plotImageId ) < MAX_CACHE_ENTRIES ) {
@@ -72,8 +71,8 @@ export class CysConverter {
72
71
73
72
/**
74
73
* Determine if a world point is in data Area of the plot and is not null
75
- * @param iwPt the point to test.
76
- * @return {boolean } true if it is in the data boundaries, false if not.
74
+ * @param { WorldPt } iwPt the point to test.
75
+ * @returns {boolean } true if it is in the data boundaries, false if not.
77
76
*/
78
77
imagePointInData ( iwPt ) {
79
78
var retval = false ;
@@ -89,8 +88,8 @@ export class CysConverter {
89
88
90
89
/**
91
90
* Determine if a image point is in the plot boundaries and is not null.
92
- * @param pt the point to test.
93
- * @return {boolean } true if it is in the boundaries, false if not.
91
+ * @param { Point } pt the point to test.
92
+ * @returns {boolean } true if it is in the boundaries, false if not.
94
93
*/
95
94
pointInData ( pt ) {
96
95
if ( ! isValidPoint ( pt ) ) return false ;
@@ -101,6 +100,7 @@ export class CysConverter {
101
100
/**
102
101
* This method returns false it the point is definitely not in plot. It returns true if the point might be in the plot.
103
102
* Used for tossing out points that we know that are not in plot without having to do all the math. It is much faster.
103
+ * @param {WorldPt } wp
104
104
* @return {boolean } true in we guess it might be in the bounds, false if we know that it is not in the bounds
105
105
*/
106
106
pointInPlotRoughGuess ( wp ) {
@@ -117,8 +117,8 @@ export class CysConverter {
117
117
118
118
/**
119
119
* Determine if a image point is in the plot boundaries and is not null.
120
- * @param ipt the point to test.
121
- * @return boolean true if it is in the boundaries, false if not.
120
+ * @param { ImagePt } ipt the point to test.
121
+ * @returns boolean true if it is in the boundaries, false if not.
122
122
*/
123
123
imageWorkSpacePtInPlot ( ipt ) {
124
124
if ( ! ipt ) return false ;
@@ -128,7 +128,7 @@ export class CysConverter {
128
128
129
129
/**
130
130
* Determine if a image point is in the plot boundaries and is not null
131
- * @param pt the point to test.
131
+ * @param { Point } pt the point to test.
132
132
* @return {boolean } true if it is in the boundaries, false if not.
133
133
*/
134
134
pointInPlot ( pt ) {
@@ -149,9 +149,9 @@ export class CysConverter {
149
149
}
150
150
151
151
/**
152
- * test to see if the input is in the view port and is not null
153
- * @param vpt
154
- * @return {boolean }
152
+ * @desc Test to see if the input is in the view port and is not null.
153
+ * @param { Object } vpt
154
+ * @returns {boolean }
155
155
*/
156
156
viewPortPointInViewPort ( vpt ) {
157
157
if ( ! vpt || ! vpt . type || vpt . type !== Point . VP_PT ) return false ;
@@ -162,9 +162,9 @@ export class CysConverter {
162
162
163
163
164
164
/**
165
- * Determine if a point is in the view port boundaries and is not null.
166
- * @param pt the point to test.
167
- * @return {boolean } true if it is in the boundaries, false if not.
165
+ * @desc Determine if a point is in the view port boundaries and is not null.
166
+ * @param { Point } pt the point to test.
167
+ * @returns {boolean } true if it is in the boundaries, false if not.
168
168
*/
169
169
pointInViewPort ( pt ) {
170
170
if ( ! isValidPoint ( pt ) ) return false ;
@@ -219,8 +219,8 @@ export class CysConverter {
219
219
}
220
220
221
221
/**
222
- * return a ImageWorkspacePt from the screen point
223
- * @param screenPt
222
+ * @description Return a ImageWorkspacePt from the screen point.
223
+ * @param { ScreenPt } screenPt
224
224
* @param {number } [altZoomLevel]
225
225
*/
226
226
makeIWPtFromSPt ( screenPt , altZoomLevel ) {
@@ -235,7 +235,6 @@ export class CysConverter {
235
235
236
236
237
237
/**
238
- * Return the ImagePt coordinates given Pt
239
238
* @param {object } pt the point to translate
240
239
* @return ImagePt the image coordinates
241
240
*/
@@ -266,7 +265,8 @@ export class CysConverter {
266
265
267
266
/**
268
267
* return a ImagePoint from a ImageWorkspace point
269
- * @param iwPt
268
+ * @param {ImageWpt } iwPt
269
+ * returns ImagePt
270
270
*/
271
271
static makeIPtFromIWPt ( iwPt ) {
272
272
if ( ! iwPt ) return null ;
@@ -275,9 +275,9 @@ export class CysConverter {
275
275
276
276
277
277
/**
278
- * Return the image coordinates given a WorldPt class
279
- * @param wpt the class containing the point in sky coordinates
280
- * @return ImagePt the translated coordinates
278
+ * @desc Return the image coordinates given a WorldPt class.
279
+ * @param { WorldPt } wpt the class containing the point in sky coordinates
280
+ * @returns ImagePt the translated coordinates
281
281
*/
282
282
getImageCoordsFromWorldPt ( wpt ) {
283
283
if ( ! wpt ) return null ;
@@ -308,11 +308,11 @@ export class CysConverter {
308
308
309
309
310
310
/**
311
- * Return the ViewPortCoords coordinates given for Pt
312
- * @param pt the point to translate
311
+ * @desc Return the ViewPortCoords coordinates given for Pt.
312
+ * @param { Point } pt the point to translate
313
313
* @param {number } [altZoomLevel], only use this parameter it you want to compute the point for a zoom level that
314
314
* if different than what the plotted zoom level
315
- * @return WorldPt the world coordinates
315
+ * @returns WorldPt the world coordinates
316
316
*/
317
317
getViewPortCoords ( pt , altZoomLevel ) {
318
318
if ( ! isValidPoint ( pt ) ) return null ;
@@ -341,8 +341,8 @@ export class CysConverter {
341
341
342
342
343
343
/**
344
- * return a ViewPort Point from a ScreenPt
345
- * @param pt
344
+ * @desc Return a ViewPort Point from a ScreenPt.
345
+ * @param { PointPt } pt
346
346
*/
347
347
makeVPtFromSPt ( pt ) {
348
348
if ( ! pt ) return null ;
@@ -352,9 +352,9 @@ export class CysConverter {
352
352
353
353
354
354
/**
355
- * An optimized conversion of WorldPt to viewport point.
356
- * @param {object } wpt a world pt
357
- * @param {object } retPt mutable returned ViewPort Point, this object will be written to
355
+ * @desc An optimized conversion of WorldPt to viewport point.
356
+ * @param {Object } wpt a world pt
357
+ * @param {Object } retPt mutable returned ViewPort Point, this object will be written to
358
358
* @return {boolean } success or failure
359
359
*/
360
360
getViewPortCoordsOptimize ( wpt , retPt ) {
@@ -425,7 +425,7 @@ export class CysConverter {
425
425
426
426
/**
427
427
* Return the screen coordinates given Pt
428
- * @param pt the point to translate
428
+ * @param { PointPt } pt the point to translate
429
429
* @param {number } [altZoomLevel], only use this parameter it you want to compute the point for a zoom level that
430
430
* if different than what the plotted zoom level
431
431
* @return ScreenPt the screen coordinates
@@ -466,7 +466,7 @@ export class CysConverter {
466
466
467
467
/**
468
468
*
469
- * @param {object } iwpt ImageWorkspacePt
469
+ * @param {Object } iwpt ImageWorkspacePt
470
470
* @param {number } [altZoomLevel]
471
471
*/
472
472
makeSPtFromIWPt ( iwpt , altZoomLevel ) {
@@ -482,13 +482,11 @@ export class CysConverter {
482
482
//========================================================================================
483
483
484
484
485
-
486
485
/**
487
- * Return the sky coordinates given a image x (fsamp) and y (fline)
488
- * package in a ImageWorkSpacePt class
489
- * @param pt the point to convert
490
- * @param outputCoordSys (optional) The coordinate system to return, default to coordinate system of image
491
- * @return WorldPt the translated coordinates
486
+ * @desc Return the sky coordinates given a image x (fsamp) and y (fline)
487
+ * @param {PointPt } pt the point to convert
488
+ * @param {CoordinateSys } outputCoordSys (optional) The coordinate system to return, default to coordinate system of image
489
+ * @returns WorldPt the translated coordinates
492
490
*/
493
491
getWorldCoords ( pt , outputCoordSys ) {
494
492
if ( ! isValidPoint ( pt ) ) return null ;
@@ -560,8 +558,8 @@ export class CysConverter {
560
558
561
559
/**
562
560
*
563
- * @param {object } plot - the image
564
- * @return {CysConverter }
561
+ * @param {Object } plot - the image
562
+ * @returns {CysConverter }
565
563
*/
566
564
static make ( plot ) {
567
565
return plot ? new CysConverter ( plot ) : null ;
@@ -572,9 +570,11 @@ export class CysConverter {
572
570
573
571
/**
574
572
*
575
- * @param pt
573
+ * @param { PointPt } pt
576
574
* @return {* }
577
575
* @public
576
+ * @memberof firefly.util.image.CCUtil
577
+ *
578
578
*/
579
579
function getWorldPtRepresentation ( pt ) {
580
580
if ( ! isValidPoint ( pt ) ) return null ;
0 commit comments