🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ast::SolarSystem类 参考

#include <SolarSystem.hpp>

+ 类 ast::SolarSystem 继承关系图:

Public 成员函数

void init ()
 
errc_t load (StringView dirpath)
 
errc_t loadPCK (StringView filepath)
 
errc_t loadDefault ()
 
const std::string & getDirpath () const
 
CelestialBodygetSolarSystemBarycenter () const
 
CelestialBodygetEarthMoonBarycenter () const
 
CelestialBodygetMercury () const
 
CelestialBodygetVenus () const
 
CelestialBodygetEarth () const
 
CelestialBodygetMars () const
 
CelestialBodygetJupiter () const
 
CelestialBodygetSaturn () const
 
CelestialBodygetUranus () const
 
CelestialBodygetNeptune () const
 
CelestialBodygetPluto () const
 
CelestialBodygetMoon () const
 
CelestialBodygetSun () const
 
CelestialBodygetBody (StringView name) const
 
CelestialBodygetBodyByJplIndex (int index) const
 
CelestialBodygetBodyBySpiceId (int id) const
 
CelestialBodyaddBody (StringView name)
 
CelestialBodyaddBody (HCelestialBody body)
 
CelestialBodygetOrAddBody (StringView name)
 
- Public 成员函数 继承自 ast::Object
 Object (Object *parentScope)
 
 Object (std::nullptr_t)
 
virtual ClassgetType () const
 
virtual const std::string & getName () const
 
errc_t openEditDialog ()
 
Attribute attr (StringView path)
 
errc_t getAttrBool (StringView path, bool &value) const
 
errc_t getAttrInt (StringView path, int &value) const
 
errc_t getAttrDouble (StringView path, double &value) const
 
errc_t getAttrString (StringView path, std::string &value) const
 
double getAttrDouble (StringView path) const
 
int getAttrInt (StringView path) const
 
bool getAttrBool (StringView path) const
 
std::string getAttrString (StringView path) const
 
errc_t setAttrBool (StringView path, bool value)
 
errc_t setAttrInt (StringView path, int value)
 
errc_t setAttrDouble (StringView path, double value)
 
errc_t setAttrString (StringView path, StringView value)
 
Classtype () const
 
PropertygetProperty (StringView fieldName) const
 
uint32_t getID () const
 
errc_t setParentScope (Object *parentScope)
 
ObjectgetParentScope () const
 
uint32_t refCount () const
 
uint32_t weakRefCount () const
 
bool isDestructed () const
 
void destruct ()
 
uint32_t incWeakRef ()
 
uint32_t decWeakRef ()
 
uint32_t incRef ()
 
uint32_t decRef ()
 
uint32_t decRefNoDelete ()
 

静态 Public 成员函数

static std::string defaultSolarSystemDir ()
 
- 静态 Public 成员函数 继承自 ast::Object
static ClassgetStaticType ()
 

Protected 类型

using BodyNameMap = std::unordered_map<std::string, CelestialBody*>
 
using BodyIndexMap = std::unordered_map<int, CelestialBody*>
 
using BodyVector = std::vector<SharedPtr<CelestialBody>>
 

Protected 属性

SharedPtr< CelestialBodysolarSystemBarycenter_
 
SharedPtr< CelestialBodyearthMoonBarycenter_
 
SharedPtr< CelestialBodymercury_
 
SharedPtr< CelestialBodyvenus_
 
SharedPtr< CelestialBodyearth_
 
SharedPtr< CelestialBodymars_
 
SharedPtr< CelestialBodyjupiter_
 
SharedPtr< CelestialBodysaturn_
 
SharedPtr< CelestialBodyuranus_
 
SharedPtr< CelestialBodyneptune_
 
SharedPtr< CelestialBodypluto_
 
SharedPtr< CelestialBodymoon_
 
SharedPtr< CelestialBodysun_
 
BodyVector bodies_
 
BodyNameMap nameMap_
 
BodyIndexMap jplIndexMap_
 
BodyIndexMap spiceIdMap_
 
bool isInit_ {false}
 
std::string dirpath_
 

额外继承的成员函数

- 静态 Public 属性 继承自 ast::Object
static Class staticType
 
- Protected 成员函数 继承自 ast::Object
 Object (const Object &obj)
 
Objectoperator= (const Object &obj)
 

详细描述

太阳系

太阳系行星及行星卫星的集合, 包含水星、金星、地球、火星、木星、土星、天王星、海王星、冥王星、月球和太阳等。

成员函数说明

◆ addBody() [1/2]

CelestialBody * ast::SolarSystem::addBody ( HCelestialBody body)

添加一个新的天体,如果相应名称的天体已存在,则返回nullptr

参数
body- 天体指针
返回值
-天体指针

◆ addBody() [2/2]

CelestialBody * ast::SolarSystem::addBody ( StringView name)

添加一个新的天体,如果name已存在,则返回nullptr

参数
name- 天体名称
返回值
-天体指针

◆ getBody()

CelestialBody * ast::SolarSystem::getBody ( StringView name) const

获取指定名称的天体

参数
name- 天体名称
返回值
-天体指针

◆ getBodyByJplIndex()

CelestialBody * ast::SolarSystem::getBodyByJplIndex ( int index) const

获取指定JPL索引的天体

参数
index- JPL索引
返回值
-天体指针

◆ getBodyBySpiceId()

CelestialBody * ast::SolarSystem::getBodyBySpiceId ( int id) const

获取指定SPICE ID的天体

参数
id- SPICE ID
返回值
-天体指针

◆ getOrAddBody()

CelestialBody * ast::SolarSystem::getOrAddBody ( StringView name)

获取指定名称的天体,若不存在则添加

参数
name- 天体名称
返回值
-天体指针

◆ load()

errc_t ast::SolarSystem::load ( StringView dirpath)

加载指定目录下的太阳系天体数据

警告
该方法会覆盖已加载的天体数据
参数
dirpath- 数据目录路径
返回值
-错误码

◆ loadPCK()

errc_t ast::SolarSystem::loadPCK ( StringView filepath)

通过PCK文件加载太阳系天体数据

警告
该方法会覆盖已加载的天体数据
参数
filepath- PCK文件路径
返回值
-错误码

该类的文档由以下文件生成: