bool KX_CameraIpoSGController::Update(double currentTime) { if (m_modified) { T_InterpolatorList::iterator i; for (i = m_interpolators.begin(); !(i == m_interpolators.end()); ++i) { (*i)->Execute(m_ipotime); } SG_Spatial* ob = (SG_Spatial*)m_pObject; KX_Camera* kxcamera = (KX_Camera*) ob->GetSGClientObject(); RAS_CameraData* camdata = kxcamera->GetCameraData(); if (m_modify_lens) camdata->m_lens = m_lens; if (m_modify_clipstart ) camdata->m_clipstart = m_clipstart; if (m_modify_clipend) camdata->m_clipend = m_clipend; if (m_modify_lens || m_modify_clipstart || m_modify_clipend) kxcamera->InvalidateProjectionMatrix(); m_modified=false; } return false; }
bool KX_MaterialIpoController::Update(double currentTime) { if (m_modified) { T_InterpolatorList::iterator i; for (i = m_interpolators.begin(); !(i == m_interpolators.end()); ++i) { (*i)->Execute(m_ipotime); } SG_Spatial* ob = (SG_Spatial*)m_pObject; KX_GameObject* kxgameobj= (KX_GameObject*) ob->GetSGClientObject(); //kxgameobj->SetObjectColor(m_rgba); kxgameobj->UpdateMaterialData( m_matname_hash, m_rgba, m_specrgb, m_hard, m_spec, m_ref, m_emit, m_alpha ); m_modified=false; } return false; }
bool KX_ObColorIpoSGController::Update(double currentTime) { if (m_modified) { SG_Spatial* ob = (SG_Spatial*)m_pObject; KX_GameObject* kxgameobj= (KX_GameObject*) ob->GetSGClientObject(); m_rgba = kxgameobj->GetObjectColor(); T_InterpolatorList::iterator i; for (i = m_interpolators.begin(); !(i == m_interpolators.end()); ++i) { (*i)->Execute(m_ipotime); } kxgameobj->SetObjectColor(m_rgba); m_modified=false; } return false; }