void CResourceManager::CreateTextBuffer(int x, int y, const char* Text, SDL_Surface* Surf_Destination, TTF_Font* Font, SDL_Color Color) { std::string TempText(Text); CTextBuffer Buffer(x, y, TempText, Surf_Destination, Font, Color); TextBufferVector.push_back(Buffer); }
void selectedNodeChanged(void) { mgr->setHighlight(SelectedNode); //Update Details Panel if(SelectedNode == NULL) { NodeNameValueLabel->setText(""); NodeCoreTypeValueLabel->setText(""); NodeMinValueLabel->setText(""); NodeMaxValueLabel->setText(""); NodeCenterValueLabel->setText(""); NodeTriCountValueLabel->setText(""); NodeTravMaskValueLabel->setText(""); NodeOcclusionMaskValueLabel->setText(""); NodeActiveValueLabel->setText(""); } else { const Char8 *NodeName = getName(SelectedNode); if(NodeName == NULL) { NodeNameValueLabel->setText("Unnamed Node"); } else { NodeNameValueLabel->setText(NodeName); } NodeCoreTypeValueLabel->setText(SelectedNode->getCore()->getType().getCName()); BoxVolume DyVol; SelectedNode->getWorldVolume(DyVol); Pnt3f Min,Max,Center; DyVol.getBounds(Min,Max); DyVol.getCenter(Center); std::string TempText(""); TempText = boost::lexical_cast<std::string>(Min.x()) + ", " +boost::lexical_cast<std::string>(Min.x()) + ", " + boost::lexical_cast<std::string>(Min.x()); NodeMinValueLabel->setText(TempText); TempText = boost::lexical_cast<std::string>(Max.x()) + ", " +boost::lexical_cast<std::string>(Max.x()) + ", " + boost::lexical_cast<std::string>(Max.x()); NodeMaxValueLabel->setText(TempText); TempText = boost::lexical_cast<std::string>(Center.x()) + ", " +boost::lexical_cast<std::string>(Center.x()) + ", " + boost::lexical_cast<std::string>(Center.x()); NodeCenterValueLabel->setText(TempText); //GeometryPrimitivesCounter PrimCounter; //PrimCounter(SelectedNode); //NodeTriCountValueLabel->setText(boost::lexical_cast<std::string>(PrimCounter.getTriCount())); //NodeTravMaskValueLabel->setText(boost::lexical_cast<std::string>(SelectedNode->getTravMask())); //NodeOcclusionMaskValueLabel->setText(boost::lexical_cast<std::string>(SelectedNode->getOcclusionMask())); //NodeActiveValueLabel->setText(boost::lexical_cast<std::string>(SelectedNode->getActive())); } }
void selectedNodeChanged(void) { _mgr->setHighlight(_SelectedNode); //Update Details Panel if(_SelectedNode == NULL) { _NodeNameValueLabel->setText(""); _NodeCoreTypeValueLabel->setText(""); _NodeMinValueLabel->setText(""); _NodeMaxValueLabel->setText(""); _NodeCenterValueLabel->setText(""); _NodeTriCountValueLabel->setText(""); _NodeTravMaskValueLabel->setText(""); } else { const Char8 *NodeName = getName(_SelectedNode); if(NodeName == NULL) { _NodeNameValueLabel->setText("Unnamed Node"); } else { _NodeNameValueLabel->setText(NodeName); } _NodeCoreTypeValueLabel->setText(_SelectedNode->getCore()->getType().getCName()); BoxVolume DyVol; _SelectedNode->getWorldVolume(DyVol); Pnt3f Min,Max,Center; DyVol.getBounds(Min,Max); DyVol.getCenter(Center); std::string TempText(""); TempText = boost::lexical_cast<std::string>(Min.x()) + ", " +boost::lexical_cast<std::string>(Min.x()) + ", " + boost::lexical_cast<std::string>(Min.x()); _NodeMinValueLabel->setText(TempText); TempText = boost::lexical_cast<std::string>(Max.x()) + ", " +boost::lexical_cast<std::string>(Max.x()) + ", " + boost::lexical_cast<std::string>(Max.x()); _NodeMaxValueLabel->setText(TempText); TempText = boost::lexical_cast<std::string>(Center.x()) + ", " +boost::lexical_cast<std::string>(Center.x()) + ", " + boost::lexical_cast<std::string>(Center.x()); _NodeCenterValueLabel->setText(TempText); _NodeTravMaskValueLabel->setText(boost::lexical_cast<std::string>(_SelectedNode->getTravMask())); //Tri Cound TriCountGraphOpRefPtr TheTriGraphOp = TriCountGraphOp::create(); TheTriGraphOp->traverse(_SelectedNode); _NodeTriCountValueLabel->setText(boost::lexical_cast<std::string>(TheTriGraphOp->getNumTri())); } }