Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
| Show First 20 Lines • Show All 357 Lines • ▼ Show 20 Lines | bool KX_MouseFocusSensor::ParentObjectHasFocus() | ||||
| m_hitPosition.setValue(0,0,0); | m_hitPosition.setValue(0,0,0); | ||||
| m_hitNormal.setValue(1,0,0); | m_hitNormal.setValue(1,0,0); | ||||
| KX_Camera *cam= m_kxscene->GetActiveCamera(); | KX_Camera *cam= m_kxscene->GetActiveCamera(); | ||||
| if (ParentObjectHasFocusCamera(cam)) | if (ParentObjectHasFocusCamera(cam)) | ||||
| return true; | return true; | ||||
| list<class KX_Camera*>* cameras = m_kxscene->GetCameras(); | |||||
| list<KX_Camera*>::iterator it = cameras->begin(); | |||||
| while (it != cameras->end()) { | CListValue* cameras = m_kxscene->GetCameraList(); | ||||
| if (((*it) != cam) && (*it)->GetViewport()) | for (unsigned int i = 0; i < cameras->GetCount(); ++i) | ||||
| if (ParentObjectHasFocusCamera(*it)) | { | ||||
| KX_Camera* cam = (KX_Camera*)cameras->GetValue(i); | |||||
| if (ParentObjectHasFocusCamera(cam)) | |||||
| return true; | return true; | ||||
| it++; | |||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| const MT_Point3& KX_MouseFocusSensor::RaySource() const | const MT_Point3& KX_MouseFocusSensor::RaySource() const | ||||
| { | { | ||||
| return m_prevSourcePoint; | return m_prevSourcePoint; | ||||
| ▲ Show 20 Lines • Show All 124 Lines • Show Last 20 Lines | |||||