void EC_OgreAnimationController::SetMeshEntity(Foundation::ComponentPtr mesh_entity)
 {           
     if ((mesh_entity.get()) && (!dynamic_cast<EC_OgreMesh*>(mesh_entity.get())))
     {
         OgreRenderingModule::LogError("Attempted to set mesh entity which is not " + EC_OgreMesh::NameStatic());
         return;
     }
     
     mesh_entity_ = mesh_entity;     
 }
Esempio n. 2
0
 void EC_OgreCamera::SetPlaceable(Foundation::ComponentPtr placeable)
 {
     if (!dynamic_cast<EC_OgrePlaceable*>(placeable.get()))
     {
         OgreRenderingModule::LogError("Attempted to set placeable which is not " + EC_OgrePlaceable::TypeNameStatic().toStdString());
         return;
     }       
     
     DetachCamera();
     placeable_ = placeable;
     AttachCamera();
 }
void EC_OgreMovableTextOverlay::SetPlaceable(Foundation::ComponentPtr placeable)
{
    if (!node_)
        return;

    if (!placeable)
    {
        OgreRenderingModule::LogError("Null placeable for overlay");
        return;
    }

    EC_OgrePlaceable* placeableptr = dynamic_cast<EC_OgrePlaceable*>(placeable.get());
    if (!placeableptr)
    {
        OgreRenderingModule::LogError("Placeable is not" + EC_OgrePlaceable::NameStatic());
        return;
    }

    DetachNode();
    placeable_  = placeable;
    AttachNode();
}