Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Ketsji/KX_CameraActuator.cpp
| Context not available. | |||||
| } | } | ||||
| void KX_CameraActuator::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map) | void KX_CameraActuator::Relink(std::map<void *, void *>& obj_map) | ||||
| { | { | ||||
| void **h_obj = (*obj_map)[m_ob]; | void *h_obj = obj_map[m_ob]; | ||||
| if (h_obj) { | if (h_obj) { | ||||
| if (m_ob) | if (m_ob) | ||||
| m_ob->UnregisterActuator(this); | m_ob->UnregisterActuator(this); | ||||
| m_ob = (SCA_IObject*)(*h_obj); | m_ob = (SCA_IObject *)h_obj; | ||||
| m_ob->RegisterActuator(this); | m_ob->RegisterActuator(this); | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| return false; | return false; | ||||
| KX_GameObject *obj = (KX_GameObject*) GetParent(); | KX_GameObject *obj = (KX_GameObject*) GetParent(); | ||||
| MT_Point3 from = obj->NodeGetWorldPosition(); | MT_Vector3 from = obj->NodeGetWorldPosition(); | ||||
| MT_Matrix3x3 frommat = obj->NodeGetWorldOrientation(); | MT_Matrix3x3 frommat = obj->NodeGetWorldOrientation(); | ||||
| /* These casts are _very_ dangerous!!! */ | /* These casts are _very_ dangerous!!! */ | ||||
| MT_Point3 lookat = ((KX_GameObject*)m_ob)->NodeGetWorldPosition(); | MT_Vector3 lookat = ((KX_GameObject*)m_ob)->NodeGetWorldPosition(); | ||||
| MT_Matrix3x3 actormat = ((KX_GameObject*)m_ob)->NodeGetWorldOrientation(); | MT_Matrix3x3 actormat = ((KX_GameObject*)m_ob)->NodeGetWorldOrientation(); | ||||
| float fp1[3]={0}, fp2[3]={0}, rc[3]; | float fp1[3]={0}, fp2[3]={0}, rc[3]; | ||||
| Context not available. | |||||
| return true; | return true; | ||||
| } | } | ||||
| CValue *KX_CameraActuator::findObject(const char *obName) | |||||
| { | |||||
| /* hook to object system */ | |||||
| return NULL; | |||||
| } | |||||
| #ifdef WITH_PYTHON | #ifdef WITH_PYTHON | ||||
| /* ------------------------------------------------------------------------- */ | /* ------------------------------------------------------------------------- */ | ||||
| Context not available. | |||||
| KX_PYATTRIBUTE_SHORT_RW("axis", 0, 5, true, KX_CameraActuator, m_axis), | KX_PYATTRIBUTE_SHORT_RW("axis", 0, 5, true, KX_CameraActuator, m_axis), | ||||
| KX_PYATTRIBUTE_RW_FUNCTION("object", KX_CameraActuator, pyattr_get_object, pyattr_set_object), | KX_PYATTRIBUTE_RW_FUNCTION("object", KX_CameraActuator, pyattr_get_object, pyattr_set_object), | ||||
| KX_PYATTRIBUTE_FLOAT_RW("damping",0.f,10.f,KX_CameraActuator,m_damping), | KX_PYATTRIBUTE_FLOAT_RW("damping",0.f,10.f,KX_CameraActuator,m_damping), | ||||
| {NULL} | KX_PYATTRIBUTE_NULL | ||||
| }; | }; | ||||
| PyObject *KX_CameraActuator::pyattr_get_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) | PyObject *KX_CameraActuator::pyattr_get_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) | ||||
| Context not available. | |||||