Blender V2.61 - r43446
|
#include <KX_Scene.h>
The KX_Scene holds all data for an independent scene. It relates KX_Objects to the specific objects in the modules.
Definition at line 102 of file KX_Scene.h.
KX_Scene::KX_Scene | ( | class SCA_IInputDevice * | keyboarddevice, |
class SCA_IInputDevice * | mousedevice, | ||
class NG_NetworkDeviceInterface * | ndi, | ||
const STR_String & | scenename, | ||
struct Scene * | scene, | ||
class RAS_ICanvas * | canvas | ||
) |
Definition at line 139 of file KX_Scene.cpp.
References GameData::flag, GAME_SHOW_OBSTACLE_SIMULATION, Scene::gm, GameData::levelHeight, m_activity_culling, m_animatedlist, m_bucketmanager, m_dbvt_culling, m_dbvt_occlusion_res, m_euthanasyobjects, m_inactivelist, m_isclearingZbuffer, m_keyboardmgr, m_lightlist, m_logicmgr, m_mousemgr, m_networkDeviceInterface, m_networkScene, m_objectlist, m_obstacleSimulation, m_parentlist, m_rootnode, m_suspend, m_suspendeddelta, m_suspendedtime, m_tempObjectList, m_timemgr, MT_assert, NULL, GameData::obstacleSimulation, OBSTSIMULATION_TOI_cells, OBSTSIMULATION_TOI_rays, SCA_LogicManager::RegisterEventManager(), SYS_GetCommandLineInt(), and SYS_GetSystem().
KX_Scene::~KX_Scene | ( | ) | [virtual] |
Definition at line 238 of file KX_Scene.cpp.
References GetRootParentList(), CListValue::GetValue(), m_animatedlist, m_bucketmanager, m_euthanasyobjects, m_inactivelist, m_lightlist, m_logicmgr, m_networkScene, m_objectlist, m_obstacleSimulation, m_parentlist, m_physicsEnvironment, m_tempObjectList, CValue::Release(), SCA_IScene::RemoveAllDebugProperties(), and RemoveObject().
void KX_Scene::AddAnimatedObject | ( | CValue * | gameobj | ) |
Definition at line 1528 of file KX_Scene.cpp.
References CListValue::Add(), CValue::AddRef(), and m_animatedlist.
Referenced by KX_GameObject::GetActionManager().
void KX_Scene::AddCamera | ( | KX_Camera * | cam | ) |
Add a camera to this scene.
Definition at line 1273 of file KX_Scene.cpp.
References FindCamera(), and m_cameras.
Referenced by gameobject_from_blenderobject(), KX_KetsjiEngine::PostProcessScene(), SetActiveCamera(), and SetCameraOnTop().
void KX_Scene::AddFont | ( | KX_FontObject * | font | ) |
Add a camera to this scene.
Definition at line 1226 of file KX_Scene.cpp.
References FindFont(), and m_fonts.
Referenced by gameobject_from_blenderobject(), and KX_FontObject::ProcessReplica().
KX_GameObject * KX_Scene::AddNodeReplicaObject | ( | SG_IObject * | node, |
CValue * | gameobj | ||
) |
Definition at line 465 of file KX_Scene.cpp.
References CListValue::Add(), KX_GameObject::AddMeshUser(), CValue::AddRef(), SG_IObject::AddSGController(), SCA_TimeEventManager::AddTimeProperty(), KX_GameObject::getClientInfo(), SCA_IObject::GetGameObjectType(), KX_GameObject::GetGraphicController(), SG_Spatial::GetLocalOrientation(), SG_Spatial::GetLocalPosition(), SG_Spatial::GetLocalScale(), CValue::GetProperty(), CValue::GetPropertyCount(), PHY_IGraphicController::GetReplica(), KX_GameObject::GetReplica(), SG_Controller::GetReplica(), SG_IObject::GetSGControllerList(), KX_GameObject::GetSGNode(), i, CTR_Map< Key, Value >::insert(), IsObjectInGroup(), m_lightlist, m_logicHierarchicalGameObjects, m_map_gameobject_to_replica, m_objectlist, m_rootnode, m_timemgr, KX_NormalParentRelation::New(), NULL, SCA_IObject::OBJ_LIGHT, SG_IObject::RemoveAllControllers(), KX_GameObject::SetGraphicController(), SG_Spatial::SetLocalOrientation(), SG_Spatial::SetLocalPosition(), SG_Spatial::SetLocalScale(), PHY_IController::setNewClientInfo(), SG_Controller::SetObject(), SG_Spatial::SetParentRelation(), SG_IObject::SetSGClientObject(), and KX_GameObject::SetSGNode().
Referenced by AddReplicaObject(), and DupliGroupRecurse().
SCA_IObject * KX_Scene::AddReplicaObject | ( | CValue * | gameobj, |
CValue * | locationobj, | ||
int | lifespan = 0 |
||
) | [virtual] |
Implements SCA_IScene.
Definition at line 820 of file KX_Scene.cpp.
References KX_GameObject::ActivateGraphicController(), CListValue::Add(), SG_Node::AddChild(), AddNodeReplicaObject(), CValue::AddRef(), SG_Spatial::BBox(), CTR_Map< Key, Value >::clear(), SG_Node::ClearSGChildren(), DupliGroupRecurse(), KX_GameObject::GetLayer(), KX_LightObject::GetLightData(), SG_Spatial::GetLocalScale(), SG_Node::GetRootSGParent(), SG_Node::GetSGChildren(), KX_GameObject::GetSGNode(), SG_Node::GetSGReplica(), m_groupGameObjects, RAS_LightObject::m_layer, m_logicHierarchicalGameObjects, m_map_gameobject_to_replica, m_parentlist, m_tempObjectList, m_ueberExecutionPriority, KX_GameObject::NodeSetLocalOrientation(), KX_GameObject::NodeSetLocalPosition(), KX_GameObject::NodeSetRelativeScale(), NULL, SCA_IObject::OBJ_LIGHT, SG_Spatial::Radius(), CValue::Release(), ReplicateLogic(), SG_Spatial::SetBBox(), CValue::SetProperty(), SG_Spatial::SetRadius(), and SG_Node::UpdateWorldData().
void KX_Scene::CalculateVisibleMeshes | ( | RAS_IRasterizer * | rasty, |
KX_Camera * | cam, | ||
int | layer = 0 |
||
) |
Definition at line 1467 of file KX_Scene.cpp.
References PHY_IPhysicsEnvironment::cullingTest(), CListValue::GetCount(), KX_Camera::GetNormalizedClipPlanes(), CListValue::GetValue(), i, m_dbvt_culling, m_dbvt_occlusion_res, m_objectlist, m_physicsEnvironment, MarkVisible(), PhysicsCullingCallback(), and PHY__Vector4::setValue().
Referenced by ImageRender::Render(), and KX_Dome::RenderDomeFrame().
void KX_Scene::DelayedRemoveObject | ( | CValue * | gameobj | ) | [virtual] |
Implements SCA_IScene.
Definition at line 953 of file KX_Scene.cpp.
References CListValue::Add(), CValue::AddRef(), m_euthanasyobjects, and CListValue::SearchValue().
Referenced by LogicBeginFrame().
void KX_Scene::DupliGroupRecurse | ( | CValue * | gameobj, |
int | level | ||
) |
Definition at line 666 of file KX_Scene.cpp.
References KX_GameObject::ActivateGraphicController(), CListValue::Add(), SG_Node::AddChild(), AddNodeReplicaObject(), CValue::AddRef(), SG_Spatial::BBox(), CTR_Map< Key, Value >::clear(), SG_Node::ClearSGChildren(), Object::dup_group, Group::dupli_ofs, SCA_LogicManager::FindGameObjByBlendObj(), ListBase::first, KX_GameObject::GetBlenderObject(), KX_GameObject::GetLayer(), KX_LightObject::GetLightData(), KX_GameObject::GetParent(), SG_Node::GetSGChildren(), KX_GameObject::GetSGNode(), SG_Node::GetSGReplica(), Group::gobject, KX_GameObject::IsDupliGroup(), Object::lay, Group::layer, m_groupGameObjects, RAS_LightObject::m_layer, m_logicHierarchicalGameObjects, m_logicmgr, m_map_gameobject_to_replica, m_parentlist, m_ueberExecutionPriority, MAX_DUPLI_RECUR, GroupObject::next, KX_GameObject::NodeGetWorldOrientation(), KX_GameObject::NodeGetWorldPosition(), KX_GameObject::NodeGetWorldScaling(), KX_GameObject::NodeSetLocalOrientation(), KX_GameObject::NodeSetLocalPosition(), KX_GameObject::NodeSetRelativeScale(), NULL, GroupObject::ob, SCA_IObject::OBJ_LIGHT, SG_Spatial::Radius(), CValue::Release(), ReplicateLogic(), SG_Spatial::SetBBox(), KX_GameObject::SetBlenderGroupObject(), SG_Spatial::SetRadius(), and SG_Node::UpdateWorldData().
Referenced by AddReplicaObject(), and BL_ConvertBlenderObjects().
void KX_Scene::EnableZBufferClearing | ( | bool | isclearingZbuffer | ) |
Definition at line 437 of file KX_Scene.cpp.
References m_isclearingZbuffer.
RAS_MaterialBucket * KX_Scene::FindBucket | ( | RAS_IPolyMaterial * | polymat, |
bool & | bucketCreated | ||
) |
Definition at line 1605 of file KX_Scene.cpp.
References RAS_BucketManager::FindBucket(), and m_bucketmanager.
Referenced by BL_ConvertMesh().
Find a camera in the scene by pointer.
Definition at line 1246 of file KX_Scene.cpp.
References m_cameras, and NULL.
Referenced by AddCamera(), SetActiveCamera(), and SetCameraOnTop().
KX_Camera * KX_Scene::FindCamera | ( | STR_String & | name | ) |
Find a scene in the scene by name.
Definition at line 1260 of file KX_Scene.cpp.
KX_FontObject * KX_Scene::FindFont | ( | KX_FontObject * | font | ) |
Find a font in the scene by pointer.
Definition at line 1232 of file KX_Scene.cpp.
Referenced by AddFont().
KX_Camera * KX_Scene::GetActiveCamera | ( | ) |
Find the currently active camera.
Definition at line 1280 of file KX_Scene.cpp.
References m_active_camera.
Referenced by BL_ConvertBlenderObjects(), ImageRender::calcImage(), KX_KetsjiEngine::PostProcessScene(), KX_KetsjiEngine::Render(), KX_KetsjiEngine::RenderDome(), KX_SoundActuator::Update(), and UpdateObjectActivity().
short KX_Scene::GetAnimationFPS | ( | ) |
Definition at line 1714 of file KX_Scene.cpp.
References RenderData::frs_sec, m_blenderScene, and Scene::r.
Referenced by KX_KetsjiEngine::NextFrame().
struct Scene* KX_Scene::GetBlenderScene | ( | ) | [inline, read] |
Returns the Blender scene this was made from
Definition at line 656 of file KX_Scene.h.
References m_blenderScene.
Referenced by KX_LightObject::ApplyLight(), BL_BlenderShader::BL_BlenderShader(), BL_ConvertBlenderObjects(), KX_BlenderSceneConverter::ConvertScene(), KX_BlenderSceneConverter::FreeBlendFile(), gameobject_from_blenderobject(), ImageRender::Render(), BL_BlenderShader::SetScene(), and GPG_Application::startEngine().
RAS_BucketManager * KX_Scene::GetBucketManager | ( | ) |
Definition at line 300 of file KX_Scene.cpp.
References m_bucketmanager.
Referenced by BL_ConvertBlenderObjects(), and MergeScene().
list< class KX_Camera * > * KX_Scene::GetCameras | ( | ) |
Camera Routines
Definition at line 347 of file KX_Scene.cpp.
References m_cameras.
Referenced by KX_KetsjiEngine::ClearFrame(), KX_KetsjiEngine::Render(), and KX_KetsjiEngine::RenderDome().
unsigned int KX_Scene::GetCanvasDesignHeight | ( | void | ) | const |
Returns the current desired canvas height set at design time.
unsigned int KX_Scene::GetCanvasDesignWidth | ( | void | ) | const |
Returns the current desired canvas width set at design time.
bool KX_Scene::GetDbvtCulling | ( | ) | [inline] |
Definition at line 562 of file KX_Scene.h.
References m_dbvt_culling.
Referenced by BL_ConvertBlenderObjects().
int KX_Scene::GetDbvtOcclusionRes | ( | ) | [inline] |
Definition at line 564 of file KX_Scene.h.
References m_dbvt_occlusion_res.
list< class KX_FontObject * > * KX_Scene::GetFonts | ( | ) |
const RAS_FrameSettings & KX_Scene::GetFramingType | ( | ) | const |
Return a const reference to the framing type set by the above call. The contents are not guarenteed to be sensible if you don't call the above function.
Definition at line 368 of file KX_Scene.cpp.
References m_frame_settings.
Referenced by KX_KetsjiEngine::GetSceneViewport(), KX_KetsjiEngine::Render(), and KX_KetsjiEngine::RenderDome().
CListValue * KX_Scene::GetInactiveList | ( | ) |
Definition at line 322 of file KX_Scene.cpp.
References m_inactivelist.
Referenced by BL_ConvertBlenderObjects(), KX_BlenderSceneConverter::FreeBlendFile(), and MergeScene().
CListValue * KX_Scene::GetLightList | ( | ) |
Definition at line 329 of file KX_Scene.cpp.
References m_lightlist.
Referenced by gameobject_from_blenderobject(), and MergeScene().
SCA_LogicManager * KX_Scene::GetLogicManager | ( | ) |
Definition at line 334 of file KX_Scene.cpp.
References m_logicmgr.
Referenced by BL_ConvertBlenderObjects(), KX_BlenderSceneConverter::ConvertMeshSpecial(), KX_BlenderSceneConverter::FreeBlendFile(), gameobject_from_blenderobject(), KX_BlenderSceneConverter::LinkBlendFile(), MergeScene(), MergeScene_GameObject(), MergeScene_LogicBrick(), and BL_Action::Play().
const STR_String & KX_Scene::GetName | ( | ) |
Definition at line 406 of file KX_Scene.cpp.
References m_sceneName.
Referenced by KX_KetsjiEngine::GetSceneViewport(), KX_KetsjiEngine::PostProcessScene(), KX_KetsjiEngine::RemoveScheduledScenes(), KX_KetsjiEngine::ReplaceScheduledScenes(), and KX_SceneActuator::Update().
NG_NetworkDeviceInterface * KX_Scene::GetNetworkDeviceInterface | ( | ) |
Definition at line 1657 of file KX_Scene.cpp.
References m_networkDeviceInterface.
NG_NetworkScene * KX_Scene::GetNetworkScene | ( | ) |
Definition at line 1662 of file KX_Scene.cpp.
References m_networkScene.
Referenced by BL_ConvertActuators(), BL_ConvertSensors(), MergeScene_LogicBrick(), and KX_KetsjiEngine::NextFrame().
CListValue * KX_Scene::GetObjectList | ( | ) |
Definition at line 311 of file KX_Scene.cpp.
References m_objectlist.
Referenced by BL_ConvertBlenderObjects(), KX_BlenderSceneConverter::FreeBlendFile(), MergeScene(), KX_KetsjiEngine::PostProcessScene(), UpdateObjectActivity(), and KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo().
KX_ObstacleSimulation* KX_Scene::GetObstacleSimulation | ( | ) | [inline] |
Definition at line 590 of file KX_Scene.h.
References m_obstacleSimulation.
Referenced by BL_ConvertActuators(), BL_ConvertBlenderObjects(), KX_NavMeshObject::ProcessReplica(), and KX_GameObject::ProcessReplica().
KX_Camera* KX_Scene::GetpCamera | ( | ) |
class PHY_IPhysicsEnvironment* KX_Scene::GetPhysicsEnvironment | ( | ) | [inline] |
Definition at line 568 of file KX_Scene.h.
References m_physicsEnvironment.
Referenced by GPC_RenderTools::applyTransform(), KX_BlenderRenderTools::applyTransform(), BL_ConvertBlenderObjects(), BL_ConvertSensors(), BL_CreateGraphicObjectNew(), KX_RaySensor::Evaluate(), MergeScene(), MergeScene_GameObject(), MergeScene_LogicBrick(), KX_KetsjiEngine::NextFrame(), SetGravity(), and KX_ConstraintActuator::Update().
CListValue * KX_Scene::GetRootParentList | ( | ) |
Definition at line 317 of file KX_Scene.cpp.
References m_parentlist.
Referenced by BL_ConvertBlenderObjects(), MergeScene(), KX_KetsjiEngine::PostProcessScene(), KX_GameObject::RemoveParent(), KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo(), KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(), KX_GameObject::SetParent(), KX_BlenderSceneConverter::TestHandlesPhysicsObjectToAnimationIpo(), and ~KX_Scene().
KX_BlenderSceneConverter* KX_Scene::GetSceneConverter | ( | ) | [inline] |
const RAS_Rect & KX_Scene::GetSceneViewport | ( | ) | const |
Get the current scene's viewport on the game engine canvas. This maintained externally in KX_GameEngine
Definition at line 386 of file KX_Scene.cpp.
References m_viewport.
double KX_Scene::getSuspendedDelta | ( | ) |
Returns the difference between the local time of the scene (when it was running and not suspended) and the "curtime"
Definition at line 1709 of file KX_Scene.cpp.
References m_suspendeddelta.
Referenced by KX_KetsjiEngine::NextFrame().
double KX_Scene::getSuspendedTime | ( | ) |
Returns the "curtime" the scene was suspended
Definition at line 1701 of file KX_Scene.cpp.
References m_suspendedtime.
Referenced by KX_KetsjiEngine::NextFrame().
CListValue * KX_Scene::GetTempObjectList | ( | ) |
Definition at line 306 of file KX_Scene.cpp.
References m_tempObjectList.
Referenced by MergeScene().
SCA_TimeEventManager * KX_Scene::GetTimeEventManager | ( | ) |
Definition at line 339 of file KX_Scene.cpp.
References m_timemgr.
Referenced by BL_ConvertBlenderObjects(), and MergeScene().
class KX_WorldInfo * KX_Scene::GetWorldInfo | ( | ) |
Definition at line 400 of file KX_Scene.cpp.
References m_worldinfo.
Referenced by KX_KetsjiEngine::ClearFrame(), KX_BlenderSceneConverter::FreeBlendFile(), KX_KetsjiEngine::Render(), ImageRender::Render(), and KX_KetsjiEngine::RenderDome().
bool KX_Scene::IsClearingZBuffer | ( | ) |
Definition at line 432 of file KX_Scene.cpp.
References m_isclearingZbuffer.
Referenced by KX_KetsjiEngine::Render(), and KX_KetsjiEngine::RenderDome().
bool KX_Scene::IsObjectInGroup | ( | CValue * | gameobj | ) | [inline] |
Definition at line 322 of file KX_Scene.h.
References m_groupGameObjects.
Referenced by AddNodeReplicaObject().
bool KX_Scene::IsSuspended | ( | ) |
Definition at line 427 of file KX_Scene.cpp.
References m_suspend.
Referenced by KX_KetsjiEngine::NextFrame().
bool KX_Scene::KX_ScenegraphRescheduleFunc | ( | SG_IObject * | node, |
void * | gameobj, | ||
void * | scene | ||
) | [static] |
Definition at line 123 of file KX_Scene.cpp.
References m_sghead.
Referenced by bl_ConvertBlenderObject_Single().
bool KX_Scene::KX_ScenegraphUpdateFunc | ( | SG_IObject * | node, |
void * | gameobj, | ||
void * | scene | ||
) | [static] |
Update all transforms according to the scenegraph.
Definition at line 118 of file KX_Scene.cpp.
References m_sghead.
Referenced by bl_ConvertBlenderObject_Single().
void KX_Scene::LogicBeginFrame | ( | double | curtime | ) |
Initiate an update of the logic system.
Definition at line 1496 of file KX_Scene.cpp.
References SCA_LogicManager::BeginFrame(), DelayedRemoveObject(), CListValue::GetCount(), CFloatValue::GetNumber(), CValue::GetProperty(), KX_KetsjiEngine::GetTicRate(), CListValue::GetValue(), i, m_logicmgr, m_tempObjectList, and CFloatValue::SetFloat().
Referenced by KX_KetsjiEngine::NextFrame().
void KX_Scene::LogicEndFrame | ( | ) |
Definition at line 1553 of file KX_Scene.cpp.
References SCA_LogicManager::EndFrame(), CListValue::GetCount(), CListValue::GetValue(), m_euthanasyobjects, m_logicmgr, m_obstacleSimulation, CValue::Release(), CListValue::Remove(), RemoveObject(), and KX_ObstacleSimulation::UpdateObstacles().
Referenced by KX_KetsjiEngine::NextFrame().
void KX_Scene::LogicUpdateFrame | ( | double | curtime, |
bool | frame | ||
) |
Definition at line 1546 of file KX_Scene.cpp.
References m_logicmgr, and SCA_LogicManager::UpdateFrame().
Referenced by KX_KetsjiEngine::NextFrame().
void KX_Scene::MarkSubTreeVisible | ( | SG_Tree * | node, |
RAS_IRasterizer * | rasty, | ||
bool | visible, | ||
KX_Camera * | cam, | ||
int | layer = 0 |
||
) | [protected] |
Definition at line 1363 of file KX_Scene.cpp.
References SG_Tree::Client(), RAS_IRasterizer::GetDrawingMode(), KX_GameObject::GetMesh(), KX_GameObject::GetMeshCount(), SG_IObject::GetSGClientObject(), KX_GameObject::GetVisible(), SG_Tree::Left(), SG_Tree::Right(), KX_GameObject::SetCulled(), and KX_GameObject::UpdateBuckets().
Referenced by MarkVisible().
void KX_Scene::MarkVisible | ( | SG_Tree * | node, |
RAS_IRasterizer * | rasty, | ||
KX_Camera * | cam, | ||
int | layer = 0 |
||
) | [protected] |
Visibility testing functions.
Definition at line 1321 of file KX_Scene.cpp.
References KX_Camera::BoxInsideFrustum(), SG_Tree::Center(), SG_Tree::Client(), SG_Tree::get(), KX_GameObject::GetLayer(), SG_IObject::GetSGClientObject(), KX_GameObject::GetVisible(), SG_Tree::inside(), KX_Camera::INSIDE, intersect(), KX_Camera::INTERSECT, SG_Tree::Left(), MarkSubTreeVisible(), KX_GameObject::NodeGetWorldPosition(), NULL, KX_Camera::OUTSIDE, SG_Tree::Radius(), SG_Tree::Right(), and KX_Camera::SphereInsideFrustum().
Referenced by CalculateVisibleMeshes().
void KX_Scene::MarkVisible | ( | RAS_IRasterizer * | rasty, |
KX_GameObject * | gameobj, | ||
KX_Camera * | cam, | ||
int | layer = 0 |
||
) | [protected] |
Definition at line 1389 of file KX_Scene.cpp.
References KX_Camera::BoxInsideFrustum(), MT_Vector3::closestAxis(), fabs(), SG_Spatial::getBBox(), KX_Camera::GetCameraLocation(), RAS_IRasterizer::GetDrawingMode(), KX_Camera::GetFrustumCulling(), KX_GameObject::GetLayer(), KX_GameObject::GetMesh(), KX_GameObject::GetMeshCount(), KX_GameObject::GetSGNode(), KX_GameObject::GetVisible(), SG_Spatial::GetWorldScaling(), SG_Spatial::inside(), KX_Camera::INSIDE, KX_Camera::INTERSECT, KX_GameObject::NodeGetWorldPosition(), KX_Camera::OUTSIDE, SG_Spatial::Radius(), KX_GameObject::SetCulled(), KX_Camera::SphereInsideFrustum(), and KX_GameObject::UpdateBuckets().
bool KX_Scene::MergeScene | ( | KX_Scene * | other | ) |
Definition at line 1836 of file KX_Scene.cpp.
References SCA_TimeEventManager::AddTimeProperty(), SCA_LogicManager::FindEventManager(), GetBucketManager(), CListValue::GetCount(), SCA_LogicManager::GetEventManagers(), GetInactiveList(), GetLightList(), GetLogicManager(), GetObjectList(), GetPhysicsEnvironment(), GetRootParentList(), GetSceneConverter(), GetTempObjectList(), GetTimeEventManager(), SCA_TimeEventManager::GetTimeValues(), CListValue::GetValue(), i, RAS_BucketManager::MergeBucketManager(), CcdPhysicsEnvironment::MergeEnvironment(), CListValue::MergeList(), KX_BlenderSceneConverter::MergeScene(), MergeScene_GameObject(), NULL, CListValue::ReleaseAndRemoveAll(), SCA_EventManager::Replace_LogicManager(), and KX_GameObject::UpdateBuckets().
Referenced by KX_BlenderSceneConverter::LinkBlendFile().
int KX_Scene::NewRemoveObject | ( | CValue * | gameobj | ) |
Definition at line 964 of file KX_Scene.cpp.
References SCA_IObject::GetActuators(), KX_GameObject::GetBlenderObject(), SCA_IObject::GetControllers(), SCA_IObject::GetGameObjectType(), CValue::GetProperty(), CValue::GetPropertyCount(), SCA_IObject::GetSensors(), i, PyObjectPlus::InvalidateProxy(), m_active_camera, m_animatedlist, m_cameras, m_euthanasyobjects, m_fonts, m_inactivelist, m_lightlist, m_logicmgr, m_objectlist, m_parentlist, m_sceneConverter, m_tempObjectList, m_timemgr, NULL, SCA_IObject::OBJ_LIGHT, CValue::Release(), SCA_LogicManager::RemoveActuator(), SCA_LogicManager::RemoveController(), KX_GameObject::RemoveMeshes(), SCA_LogicManager::RemoveSensor(), SCA_TimeEventManager::RemoveTimeProperty(), CListValue::RemoveValue(), SCA_LogicManager::UnregisterGameObj(), and KX_BlenderSceneConverter::UnregisterGameObject().
Referenced by RemoveNodeDestructObject().
void KX_Scene::PhysicsCullingCallback | ( | KX_ClientObjectInfo * | objectInfo, |
void * | cullingInfo | ||
) | [static, protected] |
Definition at line 1452 of file KX_Scene.cpp.
References KX_GameObject::GetLayer(), KX_GameObject::GetVisible(), KX_ClientObjectInfo::m_gameobject, KX_GameObject::SetCulled(), and KX_GameObject::UpdateBuckets().
Referenced by CalculateVisibleMeshes().
void KX_Scene::RemoveAnimatedObject | ( | CValue * | gameobj | ) |
Definition at line 1534 of file KX_Scene.cpp.
References m_animatedlist, and CListValue::RemoveValue().
Referenced by KX_GameObject::~KX_GameObject().
void KX_Scene::RemoveNodeDestructObject | ( | SG_IObject * | node, |
CValue * | gameobj | ||
) |
Definition at line 442 of file KX_Scene.cpp.
References KX_GameObject::GetGraphicController(), KX_GameObject::GetName(), NewRemoveObject(), NULL, STR_String::ReadPtr(), KX_GameObject::SetGraphicController(), and KX_GameObject::SetSGNode().
void KX_Scene::RemoveObject | ( | CValue * | gameobj | ) | [virtual] |
Implements SCA_IScene.
Definition at line 935 of file KX_Scene.cpp.
References SG_Node::Destruct(), SG_Node::DisconnectFromParent(), and KX_GameObject::GetSGNode().
Referenced by BL_ConvertBlenderObjects(), KX_BlenderSceneConverter::FreeBlendFile(), LogicEndFrame(), and ~KX_Scene().
void KX_Scene::Render2DFilters | ( | RAS_ICanvas * | canvas | ) |
Definition at line 1934 of file KX_Scene.cpp.
References m_filtermanager, and RAS_2DFilterManager::RenderFilters().
Referenced by KX_KetsjiEngine::RenderDome().
void KX_Scene::RenderBuckets | ( | const MT_Transform & | cameratransform, |
RAS_IRasterizer * | rasty, | ||
RAS_IRenderTools * | rendertools | ||
) |
Definition at line 1612 of file KX_Scene.cpp.
References KX_BlenderMaterial::EndFrame(), m_bucketmanager, and RAS_BucketManager::Renderbuckets().
Referenced by ImageRender::Render(), and KX_Dome::RenderDomeFrame().
void KX_Scene::ReplaceMesh | ( | CValue * | gameobj, |
void * | meshob, | ||
bool | use_gfx, | ||
bool | use_phys | ||
) | [virtual] |
Implements SCA_IScene.
Definition at line 1064 of file KX_Scene.cpp.
References KX_GameObject::AddMesh(), KX_GameObject::AddMeshUser(), Mesh::dvert, SCA_LogicManager::FindBlendObjByGameMeshName(), Object::gameflag, KX_GameObject::GetBlenderObject(), BL_DeformableGameObject::GetDeformer(), SCA_IObject::GetGameObjectType(), RAS_MeshObject::GetMesh(), RAS_MeshObject::GetName(), KX_GameObject::GetParent(), BL_ModifierDeformer::HasArmatureDeformer(), BL_ModifierDeformer::HasCompatibleDeformer(), Mesh::key, KEY_RELATIVE, BL_ShapeDeformer::LoadShapeDrivers(), m_blenderScene, KX_GameObject::m_isDeformable, m_logicmgr, NULL, OB_ARMATURE, OB_SOFT_BODY, SCA_IObject::OBJ_ARMATURE, Object::parent, CValue::Release(), KX_GameObject::RemoveMeshes(), BL_DeformableGameObject::SetDeformer(), Object::type, and Key::type.
void KX_Scene::ReplicateLogic | ( | class KX_GameObject * | newobj | ) |
Replicate the logic bricks associated to this object.
Definition at line 563 of file KX_Scene.cpp.
References assert, SCA_IObject::GetActuators(), SCA_IObject::GetControllers(), SCA_IController::GetLinkedActuators(), SCA_IController::GetLinkedSensors(), SCA_ILogicBrick::GetParent(), SCA_IObject::GetSensors(), m_logicmgr, m_map_gameobject_to_replica, m_objectlist, m_ueberExecutionPriority, NULL, SCA_LogicManager::RegisterToActuator(), SCA_LogicManager::RegisterToSensor(), SCA_IObject::ResetState(), CListValue::SearchValue(), and SCA_ILogicBrick::SetUeberExecutePriority().
Referenced by AddReplicaObject(), and DupliGroupRecurse().
void KX_Scene::Resume | ( | void | ) |
Definition at line 417 of file KX_Scene.cpp.
References m_suspend.
Referenced by KX_KetsjiEngine::ResumeScene().
void KX_Scene::SetActiveCamera | ( | class KX_Camera * | cam | ) |
Set this camera to be the active camera in the scene. If the camera is not present in the camera list, it will be added
Definition at line 1287 of file KX_Scene.cpp.
References AddCamera(), FindCamera(), KX_GameObject::GetName(), and m_active_camera.
Referenced by BL_ConvertBlenderObjects(), KX_KetsjiEngine::PostProcessScene(), and KX_SceneActuator::Update().
void KX_Scene::SetActivityCulling | ( | bool | b | ) |
Definition at line 422 of file KX_Scene.cpp.
References m_activity_culling.
Referenced by BL_ConvertBlenderObjects().
void KX_Scene::SetActivityCullingRadius | ( | float | f | ) |
Definition at line 1650 of file KX_Scene.cpp.
References m_activity_box_radius.
Referenced by BL_ConvertBlenderObjects().
void KX_Scene::SetCameraOnTop | ( | class KX_Camera * | cam | ) |
Move this camera to the end of the list so that it is rendered last. If the camera is not on the list, it will be added
Definition at line 1298 of file KX_Scene.cpp.
References AddCamera(), FindCamera(), KX_GameObject::GetName(), and m_cameras.
void KX_Scene::SetCanvasDesignHeight | ( | unsigned int | height | ) |
Activates new desired canvas height set at design time.
width | The new desired height. |
void KX_Scene::SetCanvasDesignWidth | ( | unsigned int | width | ) |
Activates new desired canvas width set at design time.
width | The new desired width. |
void KX_Scene::SetDbvtCulling | ( | bool | b | ) | [inline] |
Definition at line 561 of file KX_Scene.h.
References m_dbvt_culling.
Referenced by BL_ConvertBlenderObjects().
void KX_Scene::SetDbvtOcclusionRes | ( | int | i | ) | [inline] |
Definition at line 563 of file KX_Scene.h.
References i, and m_dbvt_occlusion_res.
Referenced by BL_ConvertBlenderObjects().
void KX_Scene::SetFramingType | ( | RAS_FrameSettings & | frame_settings | ) |
Set the framing options for this scene
Definition at line 357 of file KX_Scene.cpp.
References m_frame_settings.
Referenced by BL_ConvertBlenderObjects().
void KX_Scene::SetGravity | ( | const MT_Vector3 & | gravity | ) |
Definition at line 1678 of file KX_Scene.cpp.
References GetPhysicsEnvironment(), and PHY_IPhysicsEnvironment::setGravity().
Referenced by BL_ConvertBlenderObjects().
void KX_Scene::SetNetworkDeviceInterface | ( | NG_NetworkDeviceInterface * | newInterface | ) |
Definition at line 1667 of file KX_Scene.cpp.
References m_networkDeviceInterface.
void KX_Scene::SetNetworkScene | ( | NG_NetworkScene * | newScene | ) |
Definition at line 1672 of file KX_Scene.cpp.
References m_networkScene.
void KX_Scene::SetNodeTree | ( | SG_Tree * | root | ) |
Sets the node tree for this scene.
void KX_Scene::SetPhysicsEnvironment | ( | class PHY_IPhysicsEnvironment * | physEnv | ) |
Definition at line 1688 of file KX_Scene.cpp.
References m_logicmgr, m_physicsEnvironment, and SCA_LogicManager::RegisterEventManager().
Referenced by KX_BlenderSceneConverter::ConvertScene().
void KX_Scene::SetSceneConverter | ( | class KX_BlenderSceneConverter * | sceneConverter | ) |
Definition at line 1683 of file KX_Scene.cpp.
References m_sceneConverter.
Referenced by KX_BlenderSceneConverter::ConvertScene().
void KX_Scene::SetSceneViewport | ( | const RAS_Rect & | viewport | ) |
Store the current scene's viewport on the game engine canvas.
Definition at line 379 of file KX_Scene.cpp.
References m_viewport.
void KX_Scene::setSuspendedDelta | ( | double | suspendeddelta | ) |
Sets the difference between the local time of the scene (when it was running and not suspended) and the "curtime"
Definition at line 1705 of file KX_Scene.cpp.
References m_suspendeddelta.
Referenced by KX_KetsjiEngine::NextFrame().
void KX_Scene::setSuspendedTime | ( | double | suspendedtime | ) |
Sets the time the scene was suspended
Definition at line 1697 of file KX_Scene.cpp.
References m_suspendedtime.
Referenced by KX_KetsjiEngine::NextFrame().
void KX_Scene::SetWorldInfo | ( | class KX_WorldInfo * | wi | ) |
Definition at line 393 of file KX_Scene.cpp.
References m_worldinfo.
Referenced by BL_ConvertBlenderObjects().
void KX_Scene::Suspend | ( | void | ) |
Definition at line 412 of file KX_Scene.cpp.
References m_suspend.
Referenced by KX_KetsjiEngine::SuspendScene().
void KX_Scene::Update2DFilter | ( | vector< STR_String > & | propNames, |
void * | gameObj, | ||
RAS_2DFilterManager::RAS_2DFILTER_MODE | filtermode, | ||
int | pass, | ||
STR_String & | text | ||
) | [virtual] |
2D Filters
Reimplemented from SCA_IScene.
Definition at line 1929 of file KX_Scene.cpp.
References RAS_2DFilterManager::EnableFilter(), and m_filtermanager.
void KX_Scene::UpdateAnimations | ( | double | curtime | ) |
Definition at line 1539 of file KX_Scene.cpp.
References CListValue::GetCount(), CListValue::GetValue(), i, and m_animatedlist.
Referenced by KX_KetsjiEngine::NextFrame().
void KX_Scene::UpdateMeshTransformations | ( | ) |
Definition at line 1311 of file KX_Scene.cpp.
References CListValue::GetCount(), KX_GameObject::GetOpenGLMatrix(), CListValue::GetValue(), i, and m_objectlist.
void KX_Scene::UpdateObjectActivity | ( | void | ) |
Definition at line 1620 of file KX_Scene.cpp.
References fabs(), GetActiveCamera(), CListValue::GetCount(), SCA_IObject::GetIgnoreActivityCulling(), GetObjectList(), CListValue::GetValue(), i, m_activity_box_radius, m_activity_culling, KX_GameObject::NodeGetWorldPosition(), KX_GameObject::Resume(), and KX_GameObject::Suspend().
Referenced by KX_KetsjiEngine::NextFrame().
void KX_Scene::UpdateParents | ( | double | curtime | ) |
UpdateParents: SceneGraph transformation update.
Definition at line 1579 of file KX_Scene.cpp.
References assert, SG_DList::Empty(), SG_Node::GetNextRescheduled(), SG_Node::GetNextScheduled(), m_sghead, NULL, SG_Node::Schedule(), and SG_Node::UpdateWorldData().
Referenced by KX_KetsjiEngine::NextFrame(), and KX_KetsjiEngine::PostProcessScene().
KX_Camera* KX_Scene::m_active_camera [protected] |
The active camera for the scene
Definition at line 203 of file KX_Scene.h.
Referenced by GetActiveCamera(), NewRemoveObject(), and SetActiveCamera().
float KX_Scene::m_activity_box_radius [protected] |
Radius in Manhattan distance of the box for activity culling.
Definition at line 252 of file KX_Scene.h.
Referenced by SetActivityCullingRadius(), and UpdateObjectActivity().
bool KX_Scene::m_activity_culling [protected] |
Toggle to enable or disable activity culling.
Definition at line 257 of file KX_Scene.h.
Referenced by KX_Scene(), SetActivityCulling(), and UpdateObjectActivity().
CListValue* KX_Scene::m_animatedlist [protected] |
Definition at line 132 of file KX_Scene.h.
Referenced by AddAnimatedObject(), KX_Scene(), NewRemoveObject(), RemoveAnimatedObject(), UpdateAnimations(), and ~KX_Scene().
struct Scene* KX_Scene::m_blenderScene [protected] |
Definition at line 292 of file KX_Scene.h.
Referenced by GetAnimationFPS(), GetBlenderScene(), and ReplaceMesh().
RAS_BucketManager* KX_Scene::m_bucketmanager [protected] |
Definition at line 118 of file KX_Scene.h.
Referenced by FindBucket(), GetBucketManager(), KX_Scene(), RenderBuckets(), and ~KX_Scene().
SG_Callbacks KX_Scene::m_callbacks [static] |
SG_Callbacks( KX_SceneReplicationFunc, KX_SceneDestructionFunc, KX_GameObject::UpdateTransformFunc, KX_Scene::KX_ScenegraphUpdateFunc, KX_Scene::KX_ScenegraphRescheduleFunc)
Definition at line 539 of file KX_Scene.h.
Referenced by gamecamera_from_bcamera(), gamelight_from_blamp(), gameobject_from_blenderobject(), ImageRender::ImageRender(), and KX_KetsjiEngine::PostProcessScene().
list<class KX_Camera*> KX_Scene::m_cameras [protected] |
The set of cameras for this scene
Definition at line 143 of file KX_Scene.h.
Referenced by AddCamera(), FindCamera(), GetCameras(), NewRemoveObject(), and SetCameraOnTop().
bool KX_Scene::m_dbvt_culling [protected] |
Toggle to enable or disable culling via DBVT broadphase of Bullet.
Definition at line 262 of file KX_Scene.h.
Referenced by CalculateVisibleMeshes(), GetDbvtCulling(), KX_Scene(), and SetDbvtCulling().
int KX_Scene::m_dbvt_occlusion_res [protected] |
Occlusion culling resolution
Definition at line 267 of file KX_Scene.h.
Referenced by CalculateVisibleMeshes(), GetDbvtOcclusionRes(), KX_Scene(), and SetDbvtOcclusionRes().
CListValue* KX_Scene::m_euthanasyobjects [protected] |
The list of objects which have been removed during the course of one frame. They are actually destroyed in LogicEndFrame() via a call to RemoveObject().
Definition at line 126 of file KX_Scene.h.
Referenced by DelayedRemoveObject(), KX_Scene(), LogicEndFrame(), NewRemoveObject(), and ~KX_Scene().
RAS_2DFilterManager KX_Scene::m_filtermanager [protected] |
Definition at line 294 of file KX_Scene.h.
Referenced by Render2DFilters(), and Update2DFilter().
list<class KX_FontObject*> KX_Scene::m_fonts [protected] |
The set of fonts for this scene
Definition at line 148 of file KX_Scene.h.
Referenced by AddFont(), FindFont(), GetFonts(), and NewRemoveObject().
RAS_FrameSettings KX_Scene::m_frame_settings [protected] |
The framing settings used by this scene
Definition at line 273 of file KX_Scene.h.
Referenced by GetFramingType(), and SetFramingType().
std::set<CValue*> KX_Scene::m_groupGameObjects [protected] |
This temporary variable will contain the list of object that can be added during group instantiation. objects outside this list will not be added (can happen with children that are outside the group). Used in AddReplicaObject. If the list is empty, it means don't care.
Definition at line 228 of file KX_Scene.h.
Referenced by AddReplicaObject(), DupliGroupRecurse(), and IsObjectInGroup().
CListValue* KX_Scene::m_inactivelist [protected] |
Definition at line 131 of file KX_Scene.h.
Referenced by GetInactiveList(), KX_Scene(), NewRemoveObject(), and ~KX_Scene().
bool KX_Scene::m_isclearingZbuffer [protected] |
Does this scene clear the z-buffer?
Definition at line 171 of file KX_Scene.h.
Referenced by EnableZBufferClearing(), IsClearingZBuffer(), and KX_Scene().
SCA_KeyboardManager* KX_Scene::m_keyboardmgr [protected] |
Definition at line 155 of file KX_Scene.h.
Referenced by KX_Scene().
SCA_ISystem* KX_Scene::m_kxsystem [protected] |
Pointer to system variable passed in in constructor only used in constructor so we do not need to keep it around in this class.
Definition at line 236 of file KX_Scene.h.
CListValue* KX_Scene::m_lightlist [protected] |
Definition at line 130 of file KX_Scene.h.
Referenced by AddNodeReplicaObject(), GetLightList(), KX_Scene(), NewRemoveObject(), and ~KX_Scene().
std::vector<KX_GameObject*> KX_Scene::m_logicHierarchicalGameObjects [protected] |
Another temporary variable outstaying its welcome used in AddReplicaObject to keep a record of all added objects. Logic can only be updated when all objects have been updated. This stores a list of the new objects.
Definition at line 218 of file KX_Scene.h.
Referenced by AddNodeReplicaObject(), AddReplicaObject(), and DupliGroupRecurse().
SCA_LogicManager* KX_Scene::m_logicmgr [protected] |
Various SCA managers used by the scene
Definition at line 154 of file KX_Scene.h.
Referenced by DupliGroupRecurse(), GetLogicManager(), KX_Scene(), LogicBeginFrame(), LogicEndFrame(), LogicUpdateFrame(), NewRemoveObject(), ReplaceMesh(), ReplicateLogic(), SetPhysicsEnvironment(), and ~KX_Scene().
CTR_Map<CTR_HashedPtr, void*> KX_Scene::m_map_gameobject_to_replica [protected] |
Another temporary variable outstaying its welcome used in AddReplicaObject to map game objects to their replicas so pointers can be updated.
Definition at line 210 of file KX_Scene.h.
Referenced by AddNodeReplicaObject(), AddReplicaObject(), DupliGroupRecurse(), and ReplicateLogic().
SCA_MouseManager* KX_Scene::m_mousemgr [protected] |
Definition at line 156 of file KX_Scene.h.
Referenced by KX_Scene().
Network scene.
Definition at line 190 of file KX_Scene.h.
Referenced by GetNetworkDeviceInterface(), KX_Scene(), and SetNetworkDeviceInterface().
NG_NetworkScene* KX_Scene::m_networkScene [protected] |
Definition at line 191 of file KX_Scene.h.
Referenced by GetNetworkScene(), KX_Scene(), SetNetworkScene(), and ~KX_Scene().
CListValue* KX_Scene::m_objectlist [protected] |
Definition at line 128 of file KX_Scene.h.
Referenced by AddNodeReplicaObject(), CalculateVisibleMeshes(), GetObjectList(), KX_Scene(), NewRemoveObject(), ReplicateLogic(), UpdateMeshTransformations(), and ~KX_Scene().
KX_ObstacleSimulation* KX_Scene::m_obstacleSimulation [protected] |
Definition at line 296 of file KX_Scene.h.
Referenced by GetObstacleSimulation(), KX_Scene(), LogicEndFrame(), and ~KX_Scene().
CListValue* KX_Scene::m_parentlist [protected] |
Definition at line 129 of file KX_Scene.h.
Referenced by AddReplicaObject(), DupliGroupRecurse(), GetRootParentList(), KX_Scene(), NewRemoveObject(), and ~KX_Scene().
class PHY_IPhysicsEnvironment* KX_Scene::m_physicsEnvironment [protected] |
physics engine abstraction
Definition at line 166 of file KX_Scene.h.
Referenced by CalculateVisibleMeshes(), GetPhysicsEnvironment(), SetPhysicsEnvironment(), and ~KX_Scene().
SG_Node* KX_Scene::m_rootnode [protected] |
A temoprary variable used to parent objects together on replication. Don't get confused by the name it is not the scene's root node!
Definition at line 198 of file KX_Scene.h.
Referenced by AddNodeReplicaObject(), and KX_Scene().
class KX_BlenderSceneConverter* KX_Scene::m_sceneConverter [protected] |
Definition at line 161 of file KX_Scene.h.
Referenced by GetSceneConverter(), NewRemoveObject(), and SetSceneConverter().
STR_String KX_Scene::m_sceneName [protected] |
SG_QList KX_Scene::m_sghead [protected] |
Definition at line 134 of file KX_Scene.h.
Referenced by KX_ScenegraphRescheduleFunc(), KX_ScenegraphUpdateFunc(), and UpdateParents().
bool KX_Scene::m_suspend [protected] |
Activity 'bubble' settings : Suspend (freeze) the entire scene.
Definition at line 247 of file KX_Scene.h.
Referenced by IsSuspended(), KX_Scene(), Resume(), and Suspend().
double KX_Scene::m_suspendeddelta [protected] |
Definition at line 290 of file KX_Scene.h.
Referenced by getSuspendedDelta(), KX_Scene(), and setSuspendedDelta().
double KX_Scene::m_suspendedtime [protected] |
Definition at line 289 of file KX_Scene.h.
Referenced by getSuspendedTime(), KX_Scene(), and setSuspendedTime().
CListValue* KX_Scene::m_tempObjectList [protected] |
Definition at line 119 of file KX_Scene.h.
Referenced by AddReplicaObject(), GetTempObjectList(), KX_Scene(), LogicBeginFrame(), NewRemoveObject(), and ~KX_Scene().
SCA_TimeEventManager* KX_Scene::m_timemgr [protected] |
Definition at line 157 of file KX_Scene.h.
Referenced by AddNodeReplicaObject(), GetTimeEventManager(), KX_Scene(), and NewRemoveObject().
int KX_Scene::m_ueberExecutionPriority [protected] |
The execution priority of replicated object actuators?
Definition at line 241 of file KX_Scene.h.
Referenced by AddReplicaObject(), DupliGroupRecurse(), and ReplicateLogic().
RAS_Rect KX_Scene::m_viewport [protected] |
This scenes viewport into the game engine canvas.Maintained externally, initially [0,0] -> [0,0]
Definition at line 279 of file KX_Scene.h.
Referenced by GetSceneViewport(), and SetSceneViewport().
KX_WorldInfo* KX_Scene::m_worldinfo [protected] |
stores the worldsettings for a scene
Definition at line 181 of file KX_Scene.h.
Referenced by GetWorldInfo(), and SetWorldInfo().