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

Public 成员函数

 GfxSolarSystem ()
 
 ~GfxSolarSystem ()
 
bool initialize ()
 
void update (double deltaTime)
 
osg::Node * getNode ()
 
void addCelestialBody (GfxCelestialBody *body)
 
void removeCelestialBody (GfxCelestialBody *body)
 
GfxCelestialBodygetCelestialBody (const std::string &name)
 
bool createSun ()
 
bool createPlanet (const std::string &name, double radius, double orbitalRadius, double orbitalSpeed, double rotationSpeed, const osg::Vec4 &color)
 
bool createCompleteSolarSystem ()
 

成员函数说明

◆ createPlanet()

bool ast::GfxSolarSystem::createPlanet ( const std::string & name,
double radius,
double orbitalRadius,
double orbitalSpeed,
double rotationSpeed,
const osg::Vec4 & color )

创建行星

参数
name行星名称
radius行星半径
orbitalRadius轨道半径
orbitalSpeed公转速度
rotationSpeed自转速度
color行星颜色

◆ getCelestialBody()

GfxCelestialBody * ast::GfxSolarSystem::getCelestialBody ( const std::string & name)

获取天体

参数
name天体名称

◆ update()

void ast::GfxSolarSystem::update ( double deltaTime)

更新太阳系状态

参数
deltaTime时间增量(秒)

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