|
Blender
V2.59
|
#include <KX_GameObject.h>

KX_GameObject is the main class for dynamic objects.
Definition at line 80 of file KX_GameObject.h.
| KX_GameObject::KX_GameObject | ( | void * | sgReplicationInfo, |
| SG_Callbacks | callbacks | ||
| ) |
Construct a game object. This class also inherits the default constructors - use those with care!
Definition at line 92 of file KX_GameObject.cpp.
References KX_ClientObjectInfo::ACTOR, SCA_IObject::m_ignore_activity_culling, m_pClient_info, m_pSGNode, KX_NormalParentRelation::New(), and SG_Spatial::SetParentRelation().
Referenced by GetReplica().
| KX_GameObject::~KX_GameObject | ( | ) | [virtual] |
Definition at line 128 of file KX_GameObject.cpp.
References SG_IObject::GetSGControllerList(), m_pClient_info, m_pGraphicController, m_pSGNode, NULL, RemoveMeshes(), and SG_IObject::SetSGClientObject().
| void KX_GameObject::ActivateGraphicController | ( | bool | recurse | ) |
Definition at line 383 of file KX_GameObject.cpp.
References PHY_IGraphicController::Activate(), GetSGNode(), m_bVisible, m_pGraphicController, and setGraphicController_recursive().
Referenced by KX_Scene::AddReplicaObject(), KX_Scene::DupliGroupRecurse(), and setGraphicController_recursive().
| void KX_GameObject::addLinearVelocity | ( | const MT_Vector3 & | lin_vel, |
| bool | local | ||
| ) |
Definition at line 773 of file KX_GameObject.cpp.
References KX_IPhysicsController::GetLinearVelocity(), m_pPhysicsController1, NodeGetWorldOrientation(), and KX_IPhysicsController::SetLinearVelocity().
Referenced by KX_ObjectActuator::Update().
| void KX_GameObject::AddMesh | ( | RAS_MeshObject * | mesh | ) | [inline] |
Add a mesh to the set of meshes associated with this node. Meshes added in this way are not deleted by this class. Make sure you call RemoveMeshes() before deleting the mesh though,
Definition at line 641 of file KX_GameObject.h.
References m_meshes.
Referenced by gameobject_from_blenderobject(), and KX_Scene::ReplaceMesh().
| void KX_GameObject::AddMeshUser | ( | ) |
Update buckets to indicate that there is a new user of this object's meshes.
Definition at line 491 of file KX_GameObject.cpp.
References SG_QList::iterator< T >::begin(), SG_QList::iterator< T >::end(), GetDeformer(), GetOpenGLMatrixPtr(), MT_CmMatrix4x4::getPointer(), i, m_meshes, m_meshSlots, and UpdateBuckets().
Referenced by KX_Scene::AddNodeReplicaObject(), BL_ConvertBlenderObjects(), and KX_Scene::ReplaceMesh().
| void KX_GameObject::AlignAxisToVect | ( | const MT_Vector3 & | vect, |
| int | axis = 2, |
||
| float | fac = 1.0 |
||
| ) |
Align the object to a given normal.
Definition at line 827 of file KX_GameObject.cpp.
References MT_Vector3::cross(), MT_Vector3::dot(), GetSGNode(), SG_Node::GetSGParent(), SG_Spatial::GetWorldOrientation(), MT_Matrix3x3::inverse(), MT_Vector3::length(), MT_abs(), MT_EPSILON(), MT_fuzzyZero(), NodeSetLocalOrientation(), MT_Vector3::normalize(), NULL, MT_Tuple3::setValue(), and MT_Matrix3x3::setValue().
Referenced by KX_ConstraintActuator::Update().
| void KX_GameObject::ApplyForce | ( | const MT_Vector3 & | force, |
| bool | local | ||
| ) |
All these calls get passed directly to the physics controller owned by this object. This is real interface bloat. Why not just use the physics controller directly? I think this is because the python interface is in the wrong place.
Definition at line 408 of file KX_GameObject.cpp.
References KX_IPhysicsController::ApplyForce(), and m_pPhysicsController1.
Referenced by KX_ObjectActuator::Update().
| void KX_GameObject::ApplyMovement | ( | const MT_Vector3 & | dloc, |
| bool | local | ||
| ) |
Definition at line 424 of file KX_GameObject.cpp.
References GetSGNode(), m_pPhysicsController1, KX_IPhysicsController::RelativeTranslate(), and SG_Spatial::RelativeTranslate().
Referenced by KX_ObjectActuator::Update().
| void KX_GameObject::ApplyRotation | ( | const MT_Vector3 & | drot, |
| bool | local | ||
| ) |
Definition at line 438 of file KX_GameObject.cpp.
References GetSGNode(), m_pPhysicsController1, KX_IPhysicsController::RelativeRotate(), and SG_Spatial::RelativeRotate().
Referenced by KX_ObjectActuator::Update().
| void KX_GameObject::ApplyTorque | ( | const MT_Vector3 & | torque, |
| bool | local | ||
| ) |
Definition at line 416 of file KX_GameObject.cpp.
References KX_IPhysicsController::ApplyTorque(), and m_pPhysicsController1.
Referenced by KX_IpoSGController::Update(), and KX_ObjectActuator::Update().
| CValue * KX_GameObject::Calc | ( | VALUE_OPERATOR | op, |
| CValue * | val | ||
| ) | [virtual] |
| CValue * KX_GameObject::CalcFinal | ( | VALUE_DATA_TYPE | dtype, |
| VALUE_OPERATOR | op, | ||
| CValue * | val | ||
| ) | [virtual] |
Inherited from CValue -- does nothing!
Implements CValue.
Definition at line 180 of file KX_GameObject.cpp.
References NULL.
| MT_Vector3 KX_GameObject::GetAngularVelocity | ( | bool | local = false | ) |
Return the angular velocity of the game object.
Definition at line 958 of file KX_GameObject.cpp.
References KX_IPhysicsController::GetAngularVelocity(), GetSGNode(), SG_Spatial::GetWorldOrientation(), and m_pPhysicsController1.
Referenced by KX_ObjectActuator::Update().
| struct Object* KX_GameObject::GetBlenderGroupObject | ( | ) | [inline, read] |
Definition at line 454 of file KX_GameObject.h.
References m_pBlenderGroupObject.
Referenced by KX_LightObject::GetGPULamp().
| struct Object* KX_GameObject::GetBlenderObject | ( | ) | [inline, read] |
Definition at line 444 of file KX_GameObject.h.
References m_pBlenderObject.
Referenced by BL_ArmatureConstraint::BL_ArmatureConstraint(), BL_ConvertBlenderObjects(), KX_Scene::DupliGroupRecurse(), KX_BlenderSceneConverter::FreeBlendFile(), KX_LightObject::GetGPULamp(), MergeScene_GameObject(), KX_Scene::NewRemoveObject(), KX_Scene::ReplaceMesh(), KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo(), KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(), KX_BlenderSceneConverter::TestHandlesPhysicsObjectToAnimationIpo(), KX_BlenderSceneConverter::UnregisterGameObject(), and KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo().
| CListValue * KX_GameObject::GetChildren | ( | ) |
Definition at line 1210 of file KX_GameObject.cpp.
References GetSGNode(), and walk_children().
| CListValue * KX_GameObject::GetChildrenRecursive | ( | ) |
Definition at line 1217 of file KX_GameObject.cpp.
References GetSGNode(), and walk_children().
Referenced by BL_ConvertBlenderObjects().
| KX_ClientObjectInfo* KX_GameObject::getClientInfo | ( | ) | [inline] |
Definition at line 799 of file KX_GameObject.h.
References m_pClient_info.
Referenced by KX_Scene::AddNodeReplicaObject(), BL_CreateGraphicObjectNew(), KX_NearSensor::KX_NearSensor(), KX_TouchSensor::KX_TouchSensor(), and KX_TouchSensor::ReParent().
| KX_GameObject * KX_GameObject::GetClientObject | ( | KX_ClientObjectInfo * | info | ) | [static] |
Helper function for modules that can't include KX_ClientObjectInfo.h
Definition at line 166 of file KX_GameObject.cpp.
References KX_ClientObjectInfo::m_gameobject, and NULL.
Referenced by DbvtCullingCallback::Process().
| bool KX_GameObject::GetCulled | ( | void | ) | [inline] |
| virtual class RAS_Deformer* KX_GameObject::GetDeformer | ( | ) | [inline, virtual] |
Reimplemented in BL_DeformableGameObject.
Definition at line 371 of file KX_GameObject.h.
Referenced by AddMeshUser(), BL_ConvertBlenderObjects(), BL_CreateGraphicObjectNew(), BL_CreatePhysicsObjectNew(), and CcdShapeConstructionInfo::UpdateMesh().
| PHY_IGraphicController* KX_GameObject::GetGraphicController | ( | ) | [inline] |
Definition at line 383 of file KX_GameObject.h.
References m_pGraphicController.
Referenced by KX_Scene::AddNodeReplicaObject(), MergeScene_GameObject(), KX_Scene::RemoveNodeDestructObject(), and BL_ModifierDeformer::Update().
| int KX_GameObject::GetLayer | ( | void | ) |
Get the object layer
Definition at line 766 of file KX_GameObject.cpp.
References m_layer.
Referenced by KX_Scene::AddReplicaObject(), BL_ConvertBlenderObjects(), KX_Scene::DupliGroupRecurse(), KX_Scene::MarkVisible(), and KX_Scene::PhysicsCullingCallback().
| MT_Vector3 KX_GameObject::GetLinearVelocity | ( | bool | local = false | ) |
Return the linear velocity of the game object.
Definition at line 939 of file KX_GameObject.cpp.
References KX_IPhysicsController::GetLinearVelocity(), GetSGNode(), SG_Spatial::GetWorldOrientation(), and m_pPhysicsController1.
Referenced by KX_SoundActuator::Update(), and KX_ObjectActuator::Update().
| MT_Vector3 KX_GameObject::GetLocalInertia | ( | ) |
Return the local inertia vector of the object
Definition at line 929 of file KX_GameObject.cpp.
References KX_IPhysicsController::GetLocalInertia(), and m_pPhysicsController1.
| MT_Scalar KX_GameObject::GetMass | ( | ) |
Return the mass of the object
Definition at line 920 of file KX_GameObject.cpp.
References KX_IPhysicsController::GetMass(), and m_pPhysicsController1.
Referenced by KX_ObjectActuator::Update().
| RAS_MeshObject* KX_GameObject::GetMesh | ( | int | num | ) | const [inline] |
Pick out a mesh associated with the integer 'num'.
Definition at line 651 of file KX_GameObject.h.
References m_meshes.
Referenced by BL_ConvertBlenderObjects(), KX_BlenderSceneConverter::FreeBlendFile(), getMaterial(), ImageRender::ImageRender(), KX_Scene::MarkSubTreeVisible(), KX_Scene::MarkVisible(), MergeScene_GameObject(), DbvtCullingCallback::Process(), and CcdShapeConstructionInfo::UpdateMesh().
| int KX_GameObject::GetMeshCount | ( | ) | const [inline] |
Return the number of meshes currently associated with this game object.
Definition at line 662 of file KX_GameObject.h.
References m_meshes.
Referenced by BL_ConvertBlenderObjects(), BL_CreateGraphicObjectNew(), KX_BlenderSceneConverter::FreeBlendFile(), getMaterial(), ImageRender::ImageRender(), KX_Scene::MarkSubTreeVisible(), KX_Scene::MarkVisible(), MergeScene_GameObject(), DbvtCullingCallback::Process(), and CcdShapeConstructionInfo::UpdateMesh().
| STR_String & KX_GameObject::GetName | ( | ) | [virtual] |
part of the CValue interface that this class implements. Inherited from CValue -- returns the name of this object.
Implements CValue.
Definition at line 201 of file KX_GameObject.cpp.
References m_name.
Referenced by BL_ConvertActuators(), BL_ConvertBlenderObjects(), KX_BlenderSceneConverter::FreeBlendFile(), getGameOb(), getPhId(), MergeScene_GameObject(), KX_Scene::RemoveNodeDestructObject(), KX_Scene::SetActiveCamera(), and KX_Scene::SetCameraOnTop().
| double KX_GameObject::GetNumber | ( | ) | [virtual] |
Inherited from CValue -- does nothing!
Implements CValue.
Definition at line 194 of file KX_GameObject.cpp.
| const MT_Vector4 & KX_GameObject::GetObjectColor | ( | ) |
Definition at line 822 of file KX_GameObject.cpp.
References m_objectColor.
Referenced by KX_FontObject::DrawText().
| bool KX_GameObject::GetOccluder | ( | void | ) | [inline] |
Is this object an occluder?
Definition at line 721 of file KX_GameObject.h.
References m_bOccluder.
Referenced by BL_ConvertBlenderObjects(), and DbvtCullingCallback::Process().
| double * KX_GameObject::GetOpenGLMatrix | ( | ) |
Compute an OpenGl compatable 4x4 matrix. Has the side effect of storing the result internally. The memory for the matrix remains the property of this class.
GetOpenGL Matrix, returns an OpenGL 'compatible' matrix
Definition at line 456 of file KX_GameObject.cpp.
References SG_Spatial::ClearDirty(), MT_CmMatrix4x4::getPointer(), GetSGNode(), MT_Transform::getValue(), SG_Spatial::GetWorldScaling(), m_bIsNegativeScaling, m_OpenGL_4x4Matrix, MT_Transform::scale(), MT_Transform::setBasis(), and MT_Transform::setOrigin().
Referenced by KX_LightObject::ApplyLight(), KX_FontObject::DrawText(), KX_LightObject::Update(), UpdateBuckets(), and KX_Scene::UpdateMeshTransformations().
| MT_CmMatrix4x4* KX_GameObject::GetOpenGLMatrixPtr | ( | ) | [inline] |
Return a pointer to a MT_CmMatrix4x4 storing the opengl transformation for this object. This is updated by a call to GetOpenGLMatrix(). This class owns the memory for the returned matrix.
Definition at line 165 of file KX_GameObject.h.
References m_OpenGL_4x4Matrix.
Referenced by AddMeshUser(), KX_LightObject::ApplyLight(), DbvtCullingCallback::Process(), and KX_LightObject::Update().
| KX_GameObject * KX_GameObject::GetParent | ( | ) |
Get a pointer to the game object that is the parent of this object. Or NULL if there is no parent. The returned object is part of a reference counting scheme. Calling this function ups the reference count on the returned object. It is the responsibility of the caller to decrement the reference count when you have finished with it.
Definition at line 218 of file KX_GameObject.cpp.
References CValue::AddRef(), SG_IObject::GetSGClientObject(), SG_Node::GetSGParent(), m_pSGNode, and NULL.
Referenced by GPC_RenderTools::applyTransform(), KX_BlenderRenderTools::applyTransform(), KX_TouchSensor::BroadPhaseSensorFilterCollision(), KX_Scene::DupliGroupRecurse(), KX_RaySensor::Evaluate(), KX_TrackToActuator::KX_TrackToActuator(), KX_Scene::ReplaceMesh(), and KX_ConstraintActuator::Update().
| KX_IPhysicsController * KX_GameObject::GetPhysicsController | ( | ) |
Definition at line 213 of file KX_GameObject.cpp.
References m_pPhysicsController1.
Referenced by GPC_RenderTools::applyTransform(), KX_BlenderRenderTools::applyTransform(), BL_ConvertBlenderObjects(), BL_ConvertSensors(), KX_RaySensor::Evaluate(), getPhId(), KX_TouchSensor::KX_TouchSensor(), Resume(), Suspend(), KX_SCA_DynamicActuator::Update(), KX_IpoSGController::Update(), KX_ConstraintActuator::Update(), and KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo().
| CValue * KX_GameObject::GetReplica | ( | void | ) | [virtual] |
Inherited from CValue -- return a new copy of this instance allocated on the heap. Ownership of the new object belongs with the caller.
Implements CValue.
Reimplemented in KX_Camera, BL_ArmatureObject, KX_LightObject, KX_FontObject, and BL_DeformableGameObject.
Definition at line 396 of file KX_GameObject.cpp.
References KX_GameObject(), and ProcessReplica().
Referenced by KX_Scene::AddNodeReplicaObject().
| SG_Node* KX_GameObject::GetSGNode | ( | ) | [inline] |
Definition at line 430 of file KX_GameObject.h.
References m_pSGNode.
Referenced by ActivateGraphicController(), KX_Scene::AddNodeReplicaObject(), KX_Scene::AddReplicaObject(), AlignAxisToVect(), KX_LightObject::ApplyLight(), ApplyMovement(), ApplyRotation(), GPC_RenderTools::applyTransform(), KX_BlenderRenderTools::applyTransform(), BL_ConvertBlenderObjects(), BL_ConvertCameraIpos(), BL_ConvertIpos(), BL_ConvertLampIpos(), BL_CreateGraphicObjectNew(), ConvertMaterialIpos(), KX_Scene::DupliGroupRecurse(), gameobject_from_blenderobject(), GetAngularVelocity(), GetChildren(), GetChildrenRecursive(), GetLinearVelocity(), GetOpenGLMatrix(), InitIPO(), KX_TrackToActuator::KX_TrackToActuator(), KX_Scene::MarkVisible(), MergeScene_GameObject(), NodeGetLocalOrientation(), NodeGetLocalPosition(), NodeGetLocalScaling(), NodeGetWorldOrientation(), NodeGetWorldPosition(), NodeGetWorldScaling(), NodeSetGlobalOrientation(), NodeSetLocalOrientation(), NodeSetLocalPosition(), NodeSetLocalScale(), NodeSetRelativeScale(), NodeSetWorldPosition(), NodeUpdateGS(), KX_Scene::RemoveObject(), RemoveParent(), ImageRender::Render(), KX_Dome::RenderDomeFrame(), KX_Dome::RotateCamera(), SetOccluder(), SetParent(), SetVisible(), KX_LightObject::Update(), KX_TrackToActuator::Update(), KX_ConstraintActuator::Update(), UpdateBuckets(), and UpdateIPO().
| const SG_Node* KX_GameObject::GetSGNode | ( | ) | const [inline] |
Definition at line 435 of file KX_GameObject.h.
References m_pSGNode.
| const STR_String & KX_GameObject::GetText | ( | ) | [virtual] |
Inherited from CValue -- does nothing!
Implements CValue.
Definition at line 187 of file KX_GameObject.cpp.
References m_text.
| MT_Vector3 KX_GameObject::GetVelocity | ( | const MT_Point3 & | position | ) |
Return the linear velocity of a given point in world coordinate but relative to center of object ([0,0,0]=center of object)
Definition at line 977 of file KX_GameObject.cpp.
References KX_IPhysicsController::GetVelocity(), and m_pPhysicsController1.
Referenced by KX_ConstraintActuator::Update(), and KX_ObjectActuator::Update().
| bool KX_GameObject::GetVisible | ( | void | ) |
Was this object marked visible? (only for the explicit visibility system).
Definition at line 687 of file KX_GameObject.cpp.
References m_bVisible.
Referenced by BL_CreateGraphicObjectNew(), KX_FontObject::DrawText(), KX_Scene::MarkSubTreeVisible(), KX_Scene::MarkVisible(), and KX_Scene::PhysicsCullingCallback().
| void KX_GameObject::InitIPO | ( | bool | ipo_as_force, |
| bool | ipo_add, | ||
| bool | ipo_local | ||
| ) |
Function to set IPO option at start of IPO
Definition at line 614 of file KX_GameObject.cpp.
References SG_IObject::GetSGControllerList(), GetSGNode(), SG_Controller::SG_CONTR_IPO_IPO_ADD, SG_Controller::SG_CONTR_IPO_IPO_AS_FORCE, SG_Controller::SG_CONTR_IPO_LOCAL, and SG_Controller::SG_CONTR_IPO_RESET.
Referenced by KX_IpoActuator::Update().
| bool KX_GameObject::IsDupliGroup | ( | ) | [inline] |
Definition at line 464 of file KX_GameObject.h.
References Object::dup_group, m_pBlenderObject, NULL, OB_DUPLIGROUP, and Object::transflag.
Referenced by BL_ConvertBlenderObjects(), and KX_Scene::DupliGroupRecurse().
| bool KX_GameObject::IsDynamic | ( | ) | const [inline] |
Definition at line 485 of file KX_GameObject.h.
References m_bDyna.
Referenced by BL_ConvertBlenderObjects(), KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo(), KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(), and KX_BlenderSceneConverter::TestHandlesPhysicsObjectToAnimationIpo().
| bool KX_GameObject::IsNegativeScaling | ( | void | ) | [inline] |
Get the negative scaling state
Definition at line 755 of file KX_GameObject.h.
References m_bIsNegativeScaling.
Referenced by DbvtCullingCallback::Process().
| bool KX_GameObject::IsVertexParent | ( | ) | [inline] |
Check if this object has a vertex parent relationship
Definition at line 493 of file KX_GameObject.h.
References SG_Node::GetSGParent(), SG_Node::IsVertexParent(), and m_pSGNode.
| bool KX_GameObject::NeedRayCast | ( | KX_ClientObjectInfo * | client | ) |
| const MT_Matrix3x3 & KX_GameObject::NodeGetLocalOrientation | ( | ) | const |
Definition at line 1112 of file KX_GameObject.cpp.
References dummy_orientation, SG_Spatial::GetLocalOrientation(), and GetSGNode().
| const MT_Point3 & KX_GameObject::NodeGetLocalPosition | ( | ) | const |
Definition at line 1147 of file KX_GameObject.cpp.
References dummy_point, SG_Spatial::GetLocalPosition(), and GetSGNode().
| const MT_Vector3 & KX_GameObject::NodeGetLocalScaling | ( | ) | const |
Definition at line 1129 of file KX_GameObject.cpp.
References dummy_scaling, SG_Spatial::GetLocalScale(), and GetSGNode().
| const MT_Matrix3x3 & KX_GameObject::NodeGetWorldOrientation | ( | ) | const |
Definition at line 1104 of file KX_GameObject.cpp.
References dummy_orientation, GetSGNode(), and SG_Spatial::GetWorldOrientation().
Referenced by addLinearVelocity(), KX_LightObject::BindShadowBuffer(), BL_ConvertBlenderObjects(), KX_Scene::DupliGroupRecurse(), KX_RaySensor::Evaluate(), KX_Camera::GetCameraOrientation(), KX_Camera::GetCameraToWorld(), KX_Camera::GetWorldToCamera(), ImageRender::Render(), KX_Dome::RenderDomeFrame(), ResolveCombinedVelocities(), KX_Dome::RotateCamera(), SetParent(), KX_NearSensor::SynchronizeTransform(), KX_TrackToActuator::Update(), KX_SoundActuator::Update(), KX_CameraActuator::Update(), KX_ConstraintActuator::Update(), KX_ObjectActuator::Update(), UpdateBlenderObjectMatrix(), and KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo().
| const MT_Point3 & KX_GameObject::NodeGetWorldPosition | ( | ) | const |
Definition at line 1138 of file KX_GameObject.cpp.
References dummy_point, GetSGNode(), and SG_Spatial::GetWorldPosition().
Referenced by KX_LightObject::BindShadowBuffer(), BL_ConvertBlenderObjects(), BL_ConvertSensors(), KX_Scene::DupliGroupRecurse(), KX_RaySensor::Evaluate(), KX_Camera::GetCameraLocation(), KX_Camera::GetCameraToWorld(), KX_Camera::GetWorldToCamera(), KX_Scene::MarkVisible(), ImageRender::Render(), KX_Dome::RenderDomeFrame(), KX_Dome::RotateCamera(), SetParent(), KX_NearSensor::SynchronizeTransform(), KX_TrackToActuator::Update(), BL_ShapeActionActuator::Update(), BL_ActionActuator::Update(), KX_SoundActuator::Update(), KX_CameraActuator::Update(), KX_ConstraintActuator::Update(), KX_ObjectActuator::Update(), UpdateBlenderObjectMatrix(), KX_Scene::UpdateObjectActivity(), and KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo().
| const MT_Vector3 & KX_GameObject::NodeGetWorldScaling | ( | ) | const |
Definition at line 1120 of file KX_GameObject.cpp.
References dummy_scaling, GetSGNode(), and SG_Spatial::GetWorldScaling().
Referenced by KX_Scene::DupliGroupRecurse(), KX_Camera::ExtractFrustumSphere(), SetParent(), and UpdateBlenderObjectMatrix().
| void KX_GameObject::NodeSetGlobalOrientation | ( | const MT_Matrix3x3 & | rot | ) |
Definition at line 1023 of file KX_GameObject.cpp.
References GetSGNode(), inverse(), NodeSetLocalOrientation(), and SG_Spatial::SetLocalOrientation().
| void KX_GameObject::NodeSetLocalOrientation | ( | const MT_Matrix3x3 & | rot | ) |
Definition at line 1009 of file KX_GameObject.cpp.
References GetSGNode(), m_pPhysicsController1, SG_Spatial::SetLocalOrientation(), and KX_IPhysicsController::setOrientation().
Referenced by KX_Scene::AddReplicaObject(), AlignAxisToVect(), KX_LightObject::BindShadowBuffer(), BL_ConvertBlenderObjects(), KX_Scene::DupliGroupRecurse(), NodeSetGlobalOrientation(), KX_KetsjiEngine::PostProcessScene(), KX_Dome::RenderDomeFrame(), KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo(), KX_Dome::RotateCamera(), SetParent(), KX_TrackToActuator::Update(), KX_IpoSGController::Update(), and KX_CameraActuator::Update().
| void KX_GameObject::NodeSetLocalPosition | ( | const MT_Point3 & | trans | ) |
Definition at line 988 of file KX_GameObject.cpp.
References GetSGNode(), m_pPhysicsController1, SG_Spatial::SetLocalPosition(), and KX_IPhysicsController::setPosition().
Referenced by KX_Scene::AddReplicaObject(), KX_LightObject::BindShadowBuffer(), BL_ConvertBlenderObjects(), KX_Scene::DupliGroupRecurse(), NodeSetWorldPosition(), KX_KetsjiEngine::PostProcessScene(), KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo(), SetParent(), KX_TrackToActuator::Update(), KX_IpoSGController::Update(), KX_CameraActuator::Update(), and KX_ConstraintActuator::Update().
| void KX_GameObject::NodeSetLocalScale | ( | const MT_Vector3 & | scale | ) |
Definition at line 1035 of file KX_GameObject.cpp.
References GetSGNode(), m_pPhysicsController1, SG_Spatial::SetLocalScale(), and KX_IPhysicsController::setScaling().
Referenced by BL_ConvertBlenderObjects(), KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo(), SetParent(), and KX_IpoSGController::Update().
| void KX_GameObject::NodeSetRelativeScale | ( | const MT_Vector3 & | scale | ) |
Definition at line 1051 of file KX_GameObject.cpp.
References SG_Spatial::GetLocalScale(), GetSGNode(), m_pPhysicsController1, SG_Spatial::RelativeScale(), and KX_IPhysicsController::setScaling().
Referenced by KX_Scene::AddReplicaObject(), and KX_Scene::DupliGroupRecurse().
| void KX_GameObject::NodeSetWorldPosition | ( | const MT_Point3 & | trans | ) |
Definition at line 1067 of file KX_GameObject.cpp.
References fabs(), GetSGNode(), SG_Node::GetSGParent(), SG_Spatial::GetWorldOrientation(), SG_Spatial::GetWorldPosition(), SG_Spatial::GetWorldScaling(), MT_Matrix3x3::inverse(), NodeSetLocalPosition(), and NULL.
Referenced by KX_ConstraintActuator::Update().
| void KX_GameObject::NodeUpdateGS | ( | double | time | ) |
Definition at line 1096 of file KX_GameObject.cpp.
References GetSGNode(), and SG_Node::UpdateWorldData().
Referenced by KX_LightObject::BindShadowBuffer(), BL_ConvertBlenderObjects(), KX_KetsjiEngine::PostProcessScene(), RemoveParent(), KX_Dome::RenderDomeFrame(), KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo(), KX_Dome::RotateCamera(), and SetParent().
| void KX_GameObject::ProcessReplica | ( | ) | [virtual] |
Inherited from CValue -- Makes sure any internal data owned by this class is deep copied. Called internally
Reimplemented from CValue.
Reimplemented in KX_Camera, BL_DeformableGameObject, BL_ArmatureObject, and KX_FontObject.
Definition at line 347 of file KX_GameObject.cpp.
References KX_ClientObjectInfo::m_gameobject, m_pClient_info, m_pGraphicController, m_pPhysicsController1, m_pSGNode, SCA_IObject::m_state, and NULL.
Referenced by KX_LightObject::GetReplica(), and GetReplica().
| bool KX_GameObject::RayHit | ( | KX_ClientObjectInfo * | client, |
| KX_RayCast * | result, | ||
| void *const | data | ||
| ) |
| void KX_GameObject::Relink | ( | CTR_Map< CTR_HashedPtr, void * > * | map | ) | [virtual] |
Reimplemented in BL_DeformableGameObject, and BL_ArmatureObject.
Definition at line 1227 of file KX_GameObject.cpp.
References SCA_IObject::GetActuators(), and SCA_IObject::GetSensors().
| void KX_GameObject::RemoveMeshes | ( | ) |
Clear the meshes associated with this class and remove from the bucketing system. Don't think this actually deletes any of the meshes.
Definition at line 557 of file KX_GameObject.cpp.
Referenced by KX_BlenderSceneConverter::FreeBlendFile(), KX_Scene::NewRemoveObject(), KX_Scene::ReplaceMesh(), and ~KX_GameObject().
| void KX_GameObject::RemoveParent | ( | KX_Scene * | scene | ) |
Removes the parent of this object to a game object
Definition at line 300 of file KX_GameObject.cpp.
References CListValue::Add(), CValue::AddRef(), SG_Node::DisconnectFromParent(), KX_IPhysicsController::GetAngularVelocity(), KX_Scene::GetRootParentList(), SG_Node::GetRootSGParent(), SG_IObject::GetSGClientObject(), GetSGNode(), KX_IPhysicsController::GetVelocity(), SG_Spatial::GetWorldPosition(), KX_IPhysicsController::IsCompound(), KX_IPhysicsController::IsDyna(), m_pPhysicsController1, NodeUpdateGS(), NULL, KX_IPhysicsController::RemoveCompoundChild(), KX_IPhysicsController::RestoreDynamics(), CListValue::SearchValue(), KX_IPhysicsController::SetAngularVelocity(), KX_IPhysicsController::SetLinearVelocity(), SG_Spatial::SetLocalOrientation(), SG_Spatial::SetLocalPosition(), and SG_Spatial::SetLocalScale().
Referenced by SetParent(), and KX_ParentActuator::Update().
| void KX_GameObject::ResetDebugColor | ( | ) |
Reset the debug color of meshes associated with this class.
Definition at line 609 of file KX_GameObject.cpp.
References SetDebugColor().
| void KX_GameObject::ResolveCombinedVelocities | ( | const MT_Vector3 & | lin_vel, |
| const MT_Vector3 & | ang_vel, | ||
| bool | lin_vel_local, | ||
| bool | ang_vel_local | ||
| ) |
Definition at line 799 of file KX_GameObject.cpp.
References m_pPhysicsController1, NodeGetWorldOrientation(), KX_IPhysicsController::resolveCombinedVelocities(), MT_Tuple3::x(), MT_Tuple3::y(), and MT_Tuple3::z().
Referenced by KX_SCA_AddObjectActuator::InstantAddObject(), and KX_ObjectActuator::Update().
| void KX_GameObject::RestoreDynamics | ( | void | ) | [inline] |
Definition at line 786 of file KX_GameObject.h.
References m_bSuspendDynamics, m_pPhysicsController1, and KX_IPhysicsController::RestoreDynamics().
Referenced by KX_SCA_DynamicActuator::Update().
| void KX_GameObject::Resume | ( | void | ) |
Resume making progress
Reimplemented from SCA_IObject.
Definition at line 1164 of file KX_GameObject.cpp.
References GetPhysicsController(), SCA_IObject::m_suspended, and KX_IPhysicsController::RestoreDynamics().
Referenced by KX_Scene::UpdateObjectActivity().
| void KX_GameObject::setAngularVelocity | ( | const MT_Vector3 & | ang_vel, |
| bool | local | ||
| ) |
Definition at line 792 of file KX_GameObject.cpp.
References m_pPhysicsController1, and KX_IPhysicsController::SetAngularVelocity().
Referenced by BL_ConvertBlenderObjects(), KX_SCA_AddObjectActuator::InstantAddObject(), and KX_ObjectActuator::Update().
| void KX_GameObject::SetBlenderGroupObject | ( | struct Object * | obj | ) | [inline] |
Definition at line 459 of file KX_GameObject.h.
References m_pBlenderGroupObject.
Referenced by KX_Scene::DupliGroupRecurse().
| void KX_GameObject::SetBlenderObject | ( | struct Object * | obj | ) | [inline] |
Definition at line 449 of file KX_GameObject.h.
References m_pBlenderObject.
Referenced by gameobject_from_blenderobject().
| void KX_GameObject::SetCulled | ( | bool | c | ) | [inline] |
Set culled flag of this object
Definition at line 713 of file KX_GameObject.h.
References m_bCulled.
Referenced by KX_Scene::MarkSubTreeVisible(), KX_Scene::MarkVisible(), and KX_Scene::PhysicsCullingCallback().
| void KX_GameObject::SetDebugColor | ( | unsigned int | bgra | ) |
Set the debug color of the meshes associated with this class. Does this still work?
Definition at line 601 of file KX_GameObject.cpp.
Referenced by ResetDebugColor().
| virtual void KX_GameObject::SetDeformer | ( | class RAS_Deformer * | deformer | ) | [inline, virtual] |
Reimplemented in BL_DeformableGameObject.
Definition at line 375 of file KX_GameObject.h.
| void KX_GameObject::SetGraphicController | ( | PHY_IGraphicController * | graphiccontroller | ) | [inline] |
Definition at line 388 of file KX_GameObject.h.
References m_pGraphicController.
Referenced by KX_Scene::AddNodeReplicaObject(), BL_CreateGraphicObjectNew(), and KX_Scene::RemoveNodeDestructObject().
| void KX_GameObject::SetLayer | ( | int | l | ) |
Change the layer of the object (when it is added in another layer than the original layer)
Definition at line 758 of file KX_GameObject.cpp.
References m_layer.
Referenced by gameobject_from_blenderobject().
| void KX_GameObject::setLinearVelocity | ( | const MT_Vector3 & | lin_vel, |
| bool | local | ||
| ) |
Definition at line 784 of file KX_GameObject.cpp.
References m_pPhysicsController1, and KX_IPhysicsController::SetLinearVelocity().
Referenced by BL_ConvertBlenderObjects(), KX_SCA_AddObjectActuator::InstantAddObject(), and KX_ObjectActuator::Update().
| void KX_GameObject::SetName | ( | const char * | name | ) | [virtual] |
Inherited from CValue -- set the name of this object.
Implements CValue.
Definition at line 208 of file KX_GameObject.cpp.
References m_name.
Referenced by BL_ConvertBlenderObjects(), gamecamera_from_bcamera(), ImageRender::ImageRender(), and KX_KetsjiEngine::PostProcessScene().
| void KX_GameObject::SetObjectColor | ( | const MT_Vector4 & | rgbavec | ) |
Quick'n'dirty obcolor ipo stuff
Definition at line 816 of file KX_GameObject.cpp.
References m_bUseObjectColor, and m_objectColor.
Referenced by KX_FontObject::KX_FontObject(), KX_ObColorIpoSGController::Update(), and UpdateMaterialData().
| void KX_GameObject::SetOccluder | ( | bool | v, |
| bool | recursive | ||
| ) |
Set occluder flag of this object
Definition at line 745 of file KX_GameObject.cpp.
References GetSGNode(), m_bOccluder, and setOccluder_recursive().
Referenced by gameobject_from_blenderobject(), setOccluder_recursive(), and KX_VisibilityActuator::Update().
| void KX_GameObject::SetParent | ( | KX_Scene * | scene, |
| KX_GameObject * | obj, | ||
| bool | addToCompound = true, |
||
| bool | ghost = true |
||
| ) |
Sets the parent of this object to a game object
Definition at line 237 of file KX_GameObject.cpp.
References SG_Node::AddChild(), KX_IPhysicsController::AddCompoundChild(), fabs(), KX_Scene::GetRootParentList(), SG_Node::GetRootSGParent(), SG_IObject::GetSGClientObject(), GetSGNode(), SG_Node::GetSGParent(), MT_Matrix3x3::inverse(), SG_Node::IsAncessor(), KX_IPhysicsController::IsCompound(), m_pPhysicsController1, NodeGetWorldOrientation(), NodeGetWorldPosition(), NodeGetWorldScaling(), NodeSetLocalOrientation(), NodeSetLocalPosition(), NodeSetLocalScale(), NodeUpdateGS(), NULL, CValue::Release(), RemoveParent(), CListValue::RemoveValue(), and KX_IPhysicsController::SuspendDynamics().
Referenced by KX_ParentActuator::Update().
| void KX_GameObject::SetPhysicsController | ( | KX_IPhysicsController * | physicscontroller, |
| bool | isDynamic | ||
| ) | [inline] |
Definition at line 365 of file KX_GameObject.h.
References m_bDyna, and m_pPhysicsController1.
| void KX_GameObject::SetSGNode | ( | SG_Node * | node | ) | [inline] |
Set the Scene graph node for this game object. warning - it is your responsibility to make sure all controllers look at this new node. You must also take care of the memory associated with the old node. This class takes ownership of the new node.
Definition at line 479 of file KX_GameObject.h.
References m_pSGNode.
Referenced by KX_Scene::AddNodeReplicaObject(), and KX_Scene::RemoveNodeDestructObject().
| void KX_GameObject::SetVisible | ( | bool | b, |
| bool | recursive | ||
| ) |
Set visibility flag of this object
Definition at line 713 of file KX_GameObject.cpp.
References PHY_IGraphicController::Activate(), GetSGNode(), m_bVisible, m_pGraphicController, and setVisible_recursive().
Referenced by gameobject_from_blenderobject(), setVisible_recursive(), and KX_VisibilityActuator::Update().
| void KX_GameObject::Suspend | ( | void | ) |
Stop making progress
Reimplemented from SCA_IObject.
Definition at line 1175 of file KX_GameObject.cpp.
References GetPhysicsController(), SCA_IObject::m_ignore_activity_culling, SCA_IObject::m_suspended, and KX_IPhysicsController::SuspendDynamics().
Referenced by KX_Scene::UpdateObjectActivity().
| void KX_GameObject::SuspendDynamics | ( | void | ) | [inline] |
Definition at line 773 of file KX_GameObject.h.
References m_bSuspendDynamics, m_pPhysicsController1, and KX_IPhysicsController::SuspendDynamics().
Referenced by KX_SCA_DynamicActuator::Update().
| void KX_GameObject::SynchronizeTransform | ( | ) |
only used for sensor objects
Definition at line 586 of file KX_GameObject.cpp.
References m_pGraphicController, m_pPhysicsController1, PHY_IGraphicController::SetGraphicTransform(), and KX_IPhysicsController::SetTransform().
| void KX_GameObject::SynchronizeTransformFunc | ( | SG_IObject * | node, |
| void * | gameobj, | ||
| void * | scene | ||
| ) | [static] |
Definition at line 595 of file KX_GameObject.cpp.
| void KX_GameObject::UpdateBlenderObjectMatrix | ( | Object * | blendobj = NULL | ) |
Update the blender object obmat field from the object world position if blendobj is NULL, update the object pointed by m_pBlenderObject The user must take action to restore the matrix before leaving the GE. Used in Armature evaluation
Definition at line 475 of file KX_GameObject.cpp.
References MT_Tuple3::getValue(), MT_Matrix3x3::getValue(), m_pBlenderObject, mul_v3_fl(), NodeGetWorldOrientation(), NodeGetWorldPosition(), NodeGetWorldScaling(), and Object::obmat.
Referenced by BL_ArmatureObject::ApplyPose(), and BL_ArmatureConstraint::UpdateTarget().
| void KX_GameObject::UpdateBuckets | ( | bool | recursive | ) |
Update buckets with data about the mesh after creating or duplicating the object, changing visibility, object color, .. .
Definition at line 526 of file KX_GameObject.cpp.
References RAS_MaterialBucket::ActivateMesh(), SG_QList::iterator< T >::begin(), SG_QList::iterator< T >::end(), GetOpenGLMatrix(), GetSGNode(), m_bCulled, RAS_MeshSlot::m_bCulled, RAS_MeshSlot::m_bObjectColor, RAS_MeshSlot::m_bucket, m_bUseObjectColor, m_bVisible, RAS_MeshSlot::m_bVisible, m_meshSlots, m_objectColor, RAS_MeshSlot::m_RGBAcolor, RAS_MeshSlot::Split(), and UpdateBuckets_recursive().
Referenced by AddMeshUser(), KX_Scene::MarkSubTreeVisible(), KX_Scene::MarkVisible(), KX_Scene::MergeScene(), KX_Scene::PhysicsCullingCallback(), KX_VisibilityActuator::Update(), and UpdateBuckets_recursive().
| void KX_GameObject::UpdateIPO | ( | float | curframetime, |
| bool | recurse | ||
| ) |
Odd function to update an ipo. ???
Definition at line 629 of file KX_GameObject.cpp.
References GetSGNode(), SG_Node::SetSimulatedTime(), UpdateTransform(), and SG_Node::UpdateWorldData().
Referenced by KX_IpoActuator::Update().
| void KX_GameObject::UpdateMaterialData | ( | dword | matname_hash, |
| MT_Vector4 | rgba, | ||
| MT_Vector3 | specrgb, | ||
| MT_Scalar | hard, | ||
| MT_Scalar | spec, | ||
| MT_Scalar | ref, | ||
| MT_Scalar | emit, | ||
| MT_Scalar | alpha | ||
| ) |
Definition at line 640 of file KX_GameObject.cpp.
References RAS_IPolyMaterial::GetFlag(), RAS_IPolyMaterial::GetMaterialNameHash(), m_meshes, RAS_BLENDERMAT, SetObjectColor(), and KX_BlenderMaterial::UpdateIPO().
Referenced by KX_MaterialIpoController::Update().
| void KX_GameObject::UpdateTransform | ( | ) |
Update the physics object transform based upon the current SG_Node position.
Definition at line 567 of file KX_GameObject.cpp.
References KX_IPhysicsController::IsDyna(), m_pGraphicController, m_pPhysicsController1, PHY_IGraphicController::SetGraphicTransform(), and KX_IPhysicsController::SetSumoTransform().
Referenced by UpdateIPO().
| void KX_GameObject::UpdateTransformFunc | ( | SG_IObject * | node, |
| void * | gameobj, | ||
| void * | scene | ||
| ) | [static] |
Definition at line 581 of file KX_GameObject.cpp.
bool KX_GameObject::m_bCulled [protected] |
Definition at line 103 of file KX_GameObject.h.
Referenced by GetCulled(), SetCulled(), and UpdateBuckets().
bool KX_GameObject::m_bDyna [protected] |
Definition at line 85 of file KX_GameObject.h.
Referenced by IsDynamic(), and SetPhysicsController().
bool KX_GameObject::m_bIsNegativeScaling [protected] |
Definition at line 97 of file KX_GameObject.h.
Referenced by GetOpenGLMatrix(), and IsNegativeScaling().
bool KX_GameObject::m_bOccluder [protected] |
Definition at line 104 of file KX_GameObject.h.
Referenced by GetOccluder(), and SetOccluder().
bool KX_GameObject::m_bSuspendDynamics [protected] |
Definition at line 95 of file KX_GameObject.h.
Referenced by RestoreDynamics(), and SuspendDynamics().
bool KX_GameObject::m_bUseObjectColor [protected] |
Definition at line 96 of file KX_GameObject.h.
Referenced by SetObjectColor(), and UpdateBuckets().
bool KX_GameObject::m_bVisible [protected] |
Definition at line 102 of file KX_GameObject.h.
Referenced by ActivateGraphicController(), GetVisible(), SetVisible(), and UpdateBuckets().
Definition at line 117 of file KX_GameObject.h.
Referenced by BL_DeformableGameObject::BL_DeformableGameObject(), and KX_Scene::ReplaceMesh().
int KX_GameObject::m_layer [protected] |
Definition at line 89 of file KX_GameObject.h.
Referenced by GetLayer(), and SetLayer().
std::vector<RAS_MeshObject*> KX_GameObject::m_meshes [protected] |
Definition at line 90 of file KX_GameObject.h.
Referenced by AddMesh(), AddMeshUser(), GetMesh(), GetMeshCount(), RemoveMeshes(), SetDebugColor(), and UpdateMaterialData().
SG_QList KX_GameObject::m_meshSlots [protected] |
Definition at line 91 of file KX_GameObject.h.
Referenced by AddMeshUser(), BL_DeformableGameObject::SetDeformer(), and UpdateBuckets().
STR_String KX_GameObject::m_name [protected] |
Definition at line 87 of file KX_GameObject.h.
Referenced by GetName(), KX_Camera::KX_Camera(), and SetName().
MT_Vector4 KX_GameObject::m_objectColor [protected] |
Definition at line 98 of file KX_GameObject.h.
Referenced by GetObjectColor(), SetObjectColor(), and UpdateBuckets().
MT_CmMatrix4x4 KX_GameObject::m_OpenGL_4x4Matrix [protected] |
Definition at line 114 of file KX_GameObject.h.
Referenced by GetOpenGLMatrix(), and GetOpenGLMatrixPtr().
struct Object* KX_GameObject::m_pBlenderGroupObject [protected] |
Definition at line 93 of file KX_GameObject.h.
Referenced by GetBlenderGroupObject(), and SetBlenderGroupObject().
struct Object* KX_GameObject::m_pBlenderObject [protected] |
Definition at line 92 of file KX_GameObject.h.
Referenced by GetBlenderObject(), IsDupliGroup(), SetBlenderObject(), and UpdateBlenderObjectMatrix().
KX_ClientObjectInfo* KX_GameObject::m_pClient_info [protected] |
Definition at line 86 of file KX_GameObject.h.
Referenced by getClientInfo(), KX_GameObject(), ProcessReplica(), and ~KX_GameObject().
Definition at line 107 of file KX_GameObject.h.
Referenced by ActivateGraphicController(), GetGraphicController(), ProcessReplica(), SetGraphicController(), SetVisible(), SynchronizeTransform(), UpdateTransform(), and ~KX_GameObject().
KX_GameObject* KX_GameObject::m_pHitObject [protected] |
Definition at line 110 of file KX_GameObject.h.
Definition at line 106 of file KX_GameObject.h.
Referenced by addLinearVelocity(), ApplyForce(), ApplyMovement(), ApplyRotation(), ApplyTorque(), GetAngularVelocity(), GetLinearVelocity(), GetLocalInertia(), GetMass(), GetPhysicsController(), GetVelocity(), NodeSetLocalOrientation(), NodeSetLocalPosition(), NodeSetLocalScale(), NodeSetRelativeScale(), ProcessReplica(), RemoveParent(), ResolveCombinedVelocities(), RestoreDynamics(), setAngularVelocity(), setLinearVelocity(), SetParent(), SetPhysicsController(), SuspendDynamics(), SynchronizeTransform(), and UpdateTransform().
SG_Node* KX_GameObject::m_pSGNode [protected] |
Definition at line 112 of file KX_GameObject.h.
Referenced by GetParent(), GetSGNode(), IsVertexParent(), KX_GameObject(), ProcessReplica(), SetSGNode(), KX_Camera::~KX_Camera(), and ~KX_GameObject().
STR_String KX_GameObject::m_testPropName [protected] |
Definition at line 108 of file KX_GameObject.h.
STR_String KX_GameObject::m_text [protected] |
Reimplemented in KX_FontObject.
Definition at line 88 of file KX_GameObject.h.
Referenced by GetText().
bool KX_GameObject::m_xray [protected] |
Definition at line 109 of file KX_GameObject.h.