Skip to content

Commit

Permalink
asterism: Rename asterism types
Browse files Browse the repository at this point in the history
  • Loading branch information
10110111 committed Feb 3, 2025
1 parent 3c8ef55 commit e0f569b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/core/modules/Asterism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool Asterism::read(const QJsonObject& data, StarMgr *starMgr)
asterism.clear();

flagAsterism = !data["is_ray_helper"].toBool();
typeOfAsterism = flagAsterism ? Type::BigAsterism : Type::RayHelper;
typeOfAsterism = flagAsterism ? Type::Asterism : Type::RayHelper;

if (polylines.isEmpty())
{
Expand All @@ -83,7 +83,7 @@ bool Asterism::read(const QJsonObject& data, StarMgr *starMgr)
return false;
}
// The entry contains RA and dec instead of HIP catalog number
typeOfAsterism = Type::SmallAsterism;
typeOfAsterism = Type::TelescopicAsterism;
}

StelCore *core = StelApp::getInstance().getCore();
Expand All @@ -101,7 +101,7 @@ bool Asterism::read(const QJsonObject& data, StarMgr *starMgr)
switch (typeOfAsterism)
{
case Type::RayHelper:
case Type::BigAsterism:
case Type::Asterism:
{
if (!point.isDouble() && !point.isString())
{
Expand All @@ -122,7 +122,7 @@ bool Asterism::read(const QJsonObject& data, StarMgr *starMgr)
}
break;
}
case Type::SmallAsterism:
case Type::TelescopicAsterism:
{
if (!point.isArray())
{
Expand Down Expand Up @@ -215,7 +215,7 @@ void Asterism::drawName(StelPainter& sPainter) const
if ((nameFader.getInterstate()==0.0f) || !flagAsterism)
return;

if (typeOfAsterism==Type::SmallAsterism && sPainter.getProjector()->getFov()>60.f)
if (typeOfAsterism==Type::TelescopicAsterism && sPainter.getProjector()->getFov()>60.f)
return;

QString name = getNameI18n();
Expand Down
8 changes: 4 additions & 4 deletions src/core/modules/Asterism.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ class Asterism : public StelObject
Vec3d XYname;
enum class Type
{
RayHelper, //!< Ray helper
BigAsterism, //!< A big asterism with lines by HIP stars
SmallAsterism, //!< A small asterism with lines by J2000.0 coordinates
RayHelper, //!< Ray helper
Asterism, //!< An asterism with lines between HIP/Gaia stars
TelescopicAsterism, //!< An asterism with lines defined by J2000.0 coordinates
};
//! Type of asterism
Type typeOfAsterism = Type::BigAsterism;
Type typeOfAsterism = Type::Asterism;
bool flagAsterism;
//! List of stars forming the segments
std::vector<StelObjectP> asterism;
Expand Down

0 comments on commit e0f569b

Please sign in to comment.