[Kstars-devel] KDE/kdeedu/kstars/kstars/skycomponents
Alexey Khudyakov
alexey.skladnoy at gmail.com
Mon Feb 8 16:34:49 CET 2010
SVN commit 1087144 by khudyakov:
Add function to SkyMesh to create index for rectangular region
Patch from Abhijit Apte
CCMAIL: kstars-devel at kde.org
M +8 -1 skymesh.cpp
M +7 -0 skymesh.h
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skymesh.cpp #1087143:1087144
@@ -364,4 +364,11 @@
}
}
-
+const SkyRegion& SkyMesh::skyRegion( const SkyPoint& _p1, const SkyPoint& _p2 )
+{
+ SkyPoint p1( _p1 ), p2( _p2 );
+ SkyPoint p3( *p1.ra(), *p2.dec() ), p4( *p2.ra(), *p1.dec() );
+ SkyList skylist;
+ skylist << &p1 << &p2 << &p3 << &p4;
+ return indexPoly( &skylist );
+}
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skymesh.h #1087143:1087144
@@ -134,6 +134,13 @@
*/
Trixel index( SkyPoint *p );
+ /**
+ * @short returns the sky region needed to cover the rectangle defined by two
+ * SkyPoints p1 and p2
+ * @param p1 top-left SkyPoint of the rectangle
+ * @param p2 bottom-right SkyPoint of the rectangle
+ */
+ const SkyRegion& skyRegion( const SkyPoint& p1, const SkyPoint& p2 );
//----- Stars and CLines -----
More information about the Kstars-devel
mailing list