Beispiel #1
0
 void EC_OgreLight::DetachLight()
 {
     if ((placeable_) && (attached_))
     {
         EC_OgrePlaceable* placeable = checked_static_cast<EC_OgrePlaceable*>(placeable_.get());
         Ogre::SceneNode* node = placeable->GetSceneNode();
         node->detachObject(light_);
         attached_ = false;
     }
 }
Beispiel #2
0
 void EC_OgreCamera::AttachCamera()
 {
     if ((attached_) || (!camera_) || (!placeable_))
         return;
         
     EC_OgrePlaceable* placeable = checked_static_cast<EC_OgrePlaceable*>(placeable_.get());
     Ogre::SceneNode* node = placeable->GetSceneNode();
     node->attachObject(camera_);
             
     attached_ = true;
 }