void HttpParser::parse(unsigned char* pData, size_t nLength) { sbData_.Append(pData, nLength); findHeader(); if (hasHeader()) { findBody(); } }
void ThreeDVisualizationTool::gotoBody(const StaBody* body) { if (!body) return; Body* celBody = findBody(body); if (!celBody) return; Simulation* simulation = m_celestiaCore->getSimulation(); simulation->setSelection(Selection(celBody)); simulation->follow(); simulation->gotoSelection(0.0, kmToCelUnits(celBody->getRadius() * 7.0), Vec3f(0.0f, 1.0f, 0.0f), ObserverFrame::Equatorial); m_celestiaCore->setViewChanged(); }
void ThreeDVisualizationTool::showGrid(bool enabled) { foreach (const StaBody* body, STA_SOLAR_SYSTEM->majorBodies()) { Body* celBody = findBody(body); if (celBody) { if (enabled) { PlanetographicGrid* grid = new PlanetographicGrid(*celBody); grid->setTag("longlatgrid"); celBody->addReferenceMark(grid); } else { celBody->removeReferenceMark("longlatgrid"); } } } m_celestiaCore->setViewChanged(); }