MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / rrCreateCreatureVisualDebug

Method rrCreateCreatureVisualDebug

source/render/RenderManager.cpp:1053–1070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1051}
1052
1053void RenderManager::rrCreateCreatureVisualDebug(Creature* curCreature, Tile* curTile)
1054{
1055 if (curTile != nullptr && curCreature != nullptr)
1056 {
1057 std::stringstream tempSS;
1058 tempSS << "Vision_indicator_" << curCreature->getName() << "_"
1059 << curTile->getX() << "_" << curTile->getY();
1060
1061 Ogre::Entity* visIndicatorEntity = mSceneManager->createEntity(tempSS.str(),
1062 "Cre_vision_indicator.mesh");
1063 Ogre::SceneNode* visIndicatorNode = mCreatureSceneNode->createChildSceneNode(tempSS.str()
1064 + "_node");
1065 visIndicatorNode->attachObject(visIndicatorEntity);
1066 visIndicatorNode->setPosition(Ogre::Vector3(static_cast<Ogre::Real>(curTile->getX()),
1067 static_cast<Ogre::Real>(curTile->getY()),
1068 static_cast<Ogre::Real>(0)));
1069 }
1070}
1071
1072void RenderManager::rrDestroyCreatureVisualDebug(Creature* curCreature, Tile* curTile)
1073{

Callers 1

Calls 4

Vector3Class · 0.85
getXMethod · 0.45
getYMethod · 0.45
setPositionMethod · 0.45

Tested by

no test coverage detected