本文整理汇总了C++中CoordinateSystem::GetOrigin方法的典型用法代码示例。如果您正苦于以下问题:C++ CoordinateSystem::GetOrigin方法的具体用法?C++ CoordinateSystem::GetOrigin怎么用?C++ CoordinateSystem::GetOrigin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CoordinateSystem
的用法示例。
在下文中一共展示了CoordinateSystem::GetOrigin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BuildValidCoordinateSystemList
//------------------------------------------------------------------------------
// void BuildValidCoordinateSystemList()
//------------------------------------------------------------------------------
void ShowSummaryDialog::BuildValidCoordinateSystemList()
{
CoordinateSystem *tmpCS = NULL;
SpacePoint *origin = NULL;
std::string currentCS = coordSysComboBox->GetValue().c_str();
std::string newCS = currentCS;
Integer sz;
// The only valid coordinate system for use here:
// 1) have a celestial body origin, and
// 2) do not have a spacecraft as the origin or the primary or the secondary
// get the names of the coordinate systems
StringArray coordSystemNames;
wxArrayString csNames = coordSysComboBox->GetStrings();
for (Integer ii = 0; ii < (Integer) csNames.GetCount(); ii++)
coordSystemNames.push_back((csNames.Item(ii)).c_str());
sz = (Integer) coordSystemNames.size();
coordSysComboBox->Clear();
for (Integer ii = 0; ii < sz; ii++)
{
if (ii == 0) newCS = coordSystemNames.at(ii);
else if (currentCS == coordSystemNames.at(ii)) newCS = currentCS;
tmpCS = (CoordinateSystem*) theGuiInterpreter->GetConfiguredObject(coordSystemNames.at(ii));
origin = tmpCS->GetOrigin();
if (origin->IsOfType("CelestialBody") && (!tmpCS->UsesSpacecraft())) // add it to the list
coordSysComboBox->Append(wxString(coordSystemNames[ii].c_str()));
}
coordSysComboBox->SetValue(newCS.c_str());
currentCoordSysName = coordSysComboBox->GetValue().c_str();
}