| 223 | |
| 224 | |
| 225 | Ogre::ManualObject* RoomObject::createRoom(Ogre::SceneManager *scene, |
| 226 | const Ogre::String &name, |
| 227 | short doorFlags, |
| 228 | bool isEnclosure, |
| 229 | Ogre::Vector3 dimensions, |
| 230 | Ogre::Vector3 doorDimensions) |
| 231 | { |
| 232 | addMaterial(name, Ogre::ColourValue(1,1,1,.75), Ogre::SBT_TRANSPARENT_ALPHA); |
| 233 | |
| 234 | Ogre::ManualObject* room = scene->createManualObject(name); |
| 235 | |
| 236 | room->begin(name, Ogre::RenderOperation::OT_TRIANGLE_LIST); |
| 237 | |
| 238 | // create points |
| 239 | createPoints(dimensions, doorDimensions); |
| 240 | |
| 241 | // Ogre::Real fade=.5; |
| 242 | Ogre::Real solid=.8; |
| 243 | Ogre::ColourValue color = ColourValue(0, 0, solid, solid); |
| 244 | |
| 245 | // copy to room |
| 246 | for (auto & point : points) |
| 247 | { |
| 248 | room->position(point); |
| 249 | room->colour(color); |
| 250 | } |
| 251 | |
| 252 | createWalls(room, doorFlags, isEnclosure); |
| 253 | |
| 254 | room->end(); |
| 255 | |
| 256 | return room; |
| 257 | } |
| 258 | |
| 259 | void RoomObject::addMaterial(const Ogre::String &mat, |
| 260 | const Ogre::ColourValue &clr, |
nothing calls this directly
no test coverage detected