Blender V2.61 - r43446
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

KX_GameObject Class Reference

#include <KX_GameObject.h>

Inheritance diagram for KX_GameObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void Relink (CTR_Map< CTR_HashedPtr, void * > *map)
double * GetOpenGLMatrix ()
MT_CmMatrix4x4GetOpenGLMatrixPtr ()
void UpdateBlenderObjectMatrix (Object *blendobj=NULL)
KX_GameObjectGetParent ()
void SetParent (KX_Scene *scene, KX_GameObject *obj, bool addToCompound=true, bool ghost=true)
void RemoveParent (KX_Scene *scene)
bool PlayAction (const char *name, float start, float end, short layer=0, short priority=0, float blendin=0.f, short play_mode=0, float layer_weight=0.f, short ipo_flags=0, float playback_speed=1.f)
float GetActionFrame (short layer)
void SetActionFrame (short layer, float frame)
bActionGetCurrentAction (short layer)
void SetPlayMode (short layer, short mode)
void SetTimes (short layer, float start, float end)
void StopAction (short layer)
bool IsActionDone (short layer)
void UpdateActionManager (float curtime)
 KX_GameObject (void *sgReplicationInfo, SG_Callbacks callbacks)
virtual ~KX_GameObject ()
CValueCalc (VALUE_OPERATOR op, CValue *val)
CValueCalcFinal (VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val)
const STR_StringGetText ()
double GetNumber ()
STR_StringGetName ()
void SetName (const char *name)
virtual CValueGetReplica ()
virtual void ProcessReplica ()
MT_Vector3 GetLinearVelocity (bool local=false)
MT_Vector3 GetVelocity (const MT_Point3 &position)
MT_Scalar GetMass ()
MT_Vector3 GetLocalInertia ()
MT_Vector3 GetAngularVelocity (bool local=false)
void AlignAxisToVect (const MT_Vector3 &vect, int axis=2, float fac=1.0)
void SetObjectColor (const MT_Vector4 &rgbavec)
const MT_Vector4GetObjectColor ()
void ResolveCombinedVelocities (const MT_Vector3 &lin_vel, const MT_Vector3 &ang_vel, bool lin_vel_local, bool ang_vel_local)
KX_IPhysicsControllerGetPhysicsController ()
void SetPhysicsController (KX_IPhysicsController *physicscontroller, bool isDynamic)
virtual class RAS_DeformerGetDeformer ()
virtual void SetDeformer (class RAS_Deformer *deformer)
PHY_IGraphicControllerGetGraphicController ()
void SetGraphicController (PHY_IGraphicController *graphiccontroller)
void ActivateGraphicController (bool recurse)
void NodeSetLocalPosition (const MT_Point3 &trans)
void NodeSetLocalOrientation (const MT_Matrix3x3 &rot)
void NodeSetGlobalOrientation (const MT_Matrix3x3 &rot)
void NodeSetLocalScale (const MT_Vector3 &scale)
void NodeSetRelativeScale (const MT_Vector3 &scale)
void NodeSetWorldPosition (const MT_Point3 &trans)
void NodeUpdateGS (double time)
const MT_Matrix3x3NodeGetWorldOrientation () const
const MT_Vector3NodeGetWorldScaling () const
const MT_Point3NodeGetWorldPosition () const
const MT_Matrix3x3NodeGetLocalOrientation () const
const MT_Vector3NodeGetLocalScaling () const
const MT_Point3NodeGetLocalPosition () const
SG_NodeGetSGNode ()
const SG_NodeGetSGNode () const
struct ObjectGetBlenderObject ()
void SetBlenderObject (struct Object *obj)
struct ObjectGetBlenderGroupObject ()
void SetBlenderGroupObject (struct Object *obj)
bool IsDupliGroup ()
void SetSGNode (SG_Node *node)
bool IsDynamic () const
bool IsVertexParent ()
bool RayHit (KX_ClientObjectInfo *client, KX_RayCast *result, void *const data)
bool NeedRayCast (KX_ClientObjectInfo *client)
void ApplyForce (const MT_Vector3 &force, bool local)
void ApplyTorque (const MT_Vector3 &torque, bool local)
void ApplyRotation (const MT_Vector3 &drot, bool local)
void ApplyMovement (const MT_Vector3 &dloc, bool local)
void addLinearVelocity (const MT_Vector3 &lin_vel, bool local)
void setLinearVelocity (const MT_Vector3 &lin_vel, bool local)
void setAngularVelocity (const MT_Vector3 &ang_vel, bool local)
void UpdateTransform ()
void SynchronizeTransform ()
void InitIPO (bool ipo_as_force, bool ipo_add, bool ipo_local)
void UpdateIPO (float curframetime, bool recurse)
void 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)
void AddMeshUser ()
void UpdateBuckets (bool recursive)
void RemoveMeshes ()
void AddMesh (RAS_MeshObject *mesh)
RAS_MeshObjectGetMesh (int num) const
int GetMeshCount () const
void SetDebugColor (unsigned int bgra)
void ResetDebugColor ()
bool GetVisible (void)
void SetVisible (bool b, bool recursive)
bool GetCulled (void)
void SetCulled (bool c)
bool GetOccluder (void)
void SetOccluder (bool v, bool recursive)
void SetLayer (int l)
int GetLayer (void)
bool IsNegativeScaling (void)
void Suspend (void)
void Resume (void)
void SuspendDynamics (void)
void RestoreDynamics (void)
void RegisterObstacle (KX_ObstacleSimulation *obstacleSimulation)
void UnregisterObstacle ()
KX_ClientObjectInfogetClientInfo ()
CListValueGetChildren ()
CListValueGetChildrenRecursive ()

Static Public Member Functions

static KX_GameObjectGetClientObject (KX_ClientObjectInfo *info)
static void UpdateTransformFunc (SG_IObject *node, void *gameobj, void *scene)
static void SynchronizeTransformFunc (SG_IObject *node, void *gameobj, void *scene)

Public Attributes

bool m_isDeformable

Protected Member Functions

BL_ActionManagerGetActionManager ()

Protected Attributes

bool m_bDyna
KX_ClientObjectInfom_pClient_info
STR_String m_name
STR_String m_text
int m_layer
std::vector< RAS_MeshObject * > m_meshes
SG_QList m_meshSlots
struct Objectm_pBlenderObject
struct Objectm_pBlenderGroupObject
bool m_bSuspendDynamics
bool m_bUseObjectColor
bool m_bIsNegativeScaling
MT_Vector4 m_objectColor
bool m_bVisible
bool m_bCulled
bool m_bOccluder
KX_IPhysicsControllerm_pPhysicsController1
PHY_IGraphicControllerm_pGraphicController
STR_String m_testPropName
bool m_xray
KX_GameObjectm_pHitObject
SG_Nodem_pSGNode
MT_CmMatrix4x4 m_OpenGL_4x4Matrix
KX_ObstacleSimulationm_pObstacleSimulation
BL_ActionManagerm_actionManager

Detailed Description

KX_GameObject is the main class for dynamic objects.

Definition at line 81 of file KX_GameObject.h.


Constructor & Destructor Documentation

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 93 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]

Member Function Documentation

void KX_GameObject::ActivateGraphicController ( bool  recurse)
void KX_GameObject::addLinearVelocity ( const MT_Vector3 lin_vel,
bool  local 
)
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 712 of file KX_GameObject.h.

References m_meshes.

Referenced by gameobject_from_blenderobject(), and KX_Scene::ReplaceMesh().

void KX_GameObject::AddMeshUser ( )
void KX_GameObject::AlignAxisToVect ( const MT_Vector3 vect,
int  axis = 2,
float  fac = 1.0 
)
void KX_GameObject::ApplyForce ( const MT_Vector3 force,
bool  local 
)

accessors for this node.

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 497 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 
)
void KX_GameObject::ApplyRotation ( const MT_Vector3 drot,
bool  local 
)
void KX_GameObject::ApplyTorque ( const MT_Vector3 torque,
bool  local 
)
CValue * KX_GameObject::Calc ( VALUE_OPERATOR  op,
CValue val 
) [virtual]

which is here due to poor design.

Inherited from CValue and needs an implementation. Do not expect these functions do to anything sensible. Inherited from CValue -- does nothing!

Implements CValue.

Definition at line 187 of file KX_GameObject.cpp.

References NULL.

CValue * KX_GameObject::CalcFinal ( VALUE_DATA_TYPE  dtype,
VALUE_OPERATOR  op,
CValue val 
) [virtual]

Inherited from CValue -- does nothing!

Implements CValue.

Definition at line 194 of file KX_GameObject.cpp.

References NULL.

float KX_GameObject::GetActionFrame ( short  layer)

Gets the current frame of an action

Definition at line 401 of file KX_GameObject.cpp.

References BL_ActionManager::GetActionFrame(), and GetActionManager().

Referenced by BL_ActionActuator::Update().

BL_ActionManager * KX_GameObject::GetActionManager ( ) [protected]
MT_Vector3 KX_GameObject::GetAngularVelocity ( bool  local = false)

Return the angular velocity of the game object.

Definition at line 1047 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 525 of file KX_GameObject.h.

References m_pBlenderGroupObject.

Referenced by KX_LightObject::GetGPULamp().

struct Object* KX_GameObject::GetBlenderObject ( ) [inline, read]
CListValue * KX_GameObject::GetChildren ( )

Definition at line 1299 of file KX_GameObject.cpp.

References GetSGNode(), and walk_children().

CListValue * KX_GameObject::GetChildrenRecursive ( )

Definition at line 1306 of file KX_GameObject.cpp.

References GetSGNode(), and walk_children().

Referenced by BL_ConvertBlenderObjects().

KX_ClientObjectInfo* KX_GameObject::getClientInfo ( ) [inline]
KX_GameObject * KX_GameObject::GetClientObject ( KX_ClientObjectInfo info) [static]

Helper function for modules that can't include KX_ClientObjectInfo.h

Definition at line 180 of file KX_GameObject.cpp.

References KX_ClientObjectInfo::m_gameobject, and NULL.

Referenced by DbvtCullingCallback::Process().

bool KX_GameObject::GetCulled ( void  ) [inline]

Was this object culled?

Definition at line 776 of file KX_GameObject.h.

References m_bCulled.

bAction * KX_GameObject::GetCurrentAction ( short  layer)

Gets the currently running action on the given layer

Definition at line 411 of file KX_GameObject.cpp.

References GetActionManager(), and BL_ActionManager::GetCurrentAction().

Referenced by BL_ActionActuator::Update().

virtual class RAS_Deformer* KX_GameObject::GetDeformer ( ) [inline, virtual]
PHY_IGraphicController* KX_GameObject::GetGraphicController ( ) [inline]
Returns:
a pointer to the graphic controller owner by this class

Definition at line 454 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  )
MT_Vector3 KX_GameObject::GetLinearVelocity ( bool  local = false)
MT_Vector3 KX_GameObject::GetLocalInertia ( )

Return the local inertia vector of the object

Definition at line 1018 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 1009 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]
int KX_GameObject::GetMeshCount ( ) const [inline]
STR_String & KX_GameObject::GetName ( ) [virtual]

from CValue. These are the useful

part of the CValue interface that this class implements. Inherited from CValue -- returns the name of this object.

Implements CValue.

Definition at line 215 of file KX_GameObject.cpp.

References m_name.

Referenced by BL_ConvertActuators(), bl_ConvertBlenderObject_Single(), 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 208 of file KX_GameObject.cpp.

const MT_Vector4 & KX_GameObject::GetObjectColor ( )

Definition at line 911 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 792 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 545 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 174 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 232 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_SteeringActuator::KX_SteeringActuator(), KX_TrackToActuator::KX_TrackToActuator(), KX_Scene::ReplaceMesh(), and KX_ConstraintActuator::Update().

KX_IPhysicsController * KX_GameObject::GetPhysicsController ( )
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 BL_ArmatureObject, BL_DeformableGameObject, KX_Camera, KX_FontObject, KX_LightObject, and KX_NavMeshObject.

Definition at line 485 of file KX_GameObject.cpp.

References KX_GameObject(), and ProcessReplica().

Referenced by KX_Scene::AddNodeReplicaObject().

const SG_Node* KX_GameObject::GetSGNode ( ) const [inline]

Definition at line 506 of file KX_GameObject.h.

References m_pSGNode.

SG_Node* KX_GameObject::GetSGNode ( ) [inline]
const STR_String & KX_GameObject::GetText ( ) [virtual]

Inherited from CValue -- does nothing!

Implements CValue.

Definition at line 201 of file KX_GameObject.cpp.

References m_text.

Referenced by KX_FontObject::DrawText().

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 1066 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 776 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 
)
bool KX_GameObject::IsActionDone ( short  layer)

Check if an action has finished playing

Definition at line 391 of file KX_GameObject.cpp.

References GetActionManager(), and BL_ActionManager::IsActionDone().

Referenced by BL_ActionActuator::Update().

bool KX_GameObject::IsDupliGroup ( ) [inline]
bool KX_GameObject::IsDynamic ( ) const [inline]
bool KX_GameObject::IsNegativeScaling ( void  ) [inline]

Get the negative scaling state

Definition at line 826 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 564 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
const MT_Point3 & KX_GameObject::NodeGetLocalPosition ( ) const

Definition at line 1236 of file KX_GameObject.cpp.

References dummy_point, SG_Spatial::GetLocalPosition(), and GetSGNode().

const MT_Vector3 & KX_GameObject::NodeGetLocalScaling ( ) const

Definition at line 1218 of file KX_GameObject.cpp.

References dummy_scaling, SG_Spatial::GetLocalScale(), and GetSGNode().

const MT_Matrix3x3 & KX_GameObject::NodeGetWorldOrientation ( ) const
const MT_Point3 & KX_GameObject::NodeGetWorldPosition ( ) const
const MT_Vector3 & KX_GameObject::NodeGetWorldScaling ( ) const
void KX_GameObject::NodeSetGlobalOrientation ( const MT_Matrix3x3 rot)
void KX_GameObject::NodeSetLocalOrientation ( const MT_Matrix3x3 rot)
void KX_GameObject::NodeSetLocalPosition ( const MT_Point3 trans)
void KX_GameObject::NodeSetLocalScale ( const MT_Vector3 scale)
void KX_GameObject::NodeSetRelativeScale ( const MT_Vector3 scale)
void KX_GameObject::NodeSetWorldPosition ( const MT_Point3 trans)
void KX_GameObject::NodeUpdateGS ( double  time)
bool KX_GameObject::PlayAction ( const char *  name,
float  start,
float  end,
short  layer = 0,
short  priority = 0,
float  blendin = 0.f,
short  play_mode = 0,
float  layer_weight = 0.f,
short  ipo_flags = 0,
float  playback_speed = 1.f 
)

Adds an action to the object's action manager

Definition at line 372 of file KX_GameObject.cpp.

References GetActionManager(), and BL_ActionManager::PlayAction().

Referenced by BL_ActionActuator::Update().

void KX_GameObject::ProcessReplica ( ) [virtual]
bool KX_GameObject::RayHit ( KX_ClientObjectInfo client,
KX_RayCast result,
void *const  data 
)
void KX_GameObject::RegisterObstacle ( KX_ObstacleSimulation obstacleSimulation) [inline]

Definition at line 870 of file KX_GameObject.h.

References m_pObstacleSimulation.

Referenced by KX_ObstacleSimulation::CreateObstacle().

void KX_GameObject::Relink ( CTR_Map< CTR_HashedPtr, void * > *  map) [virtual]
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 646 of file KX_GameObject.cpp.

References i, and m_meshes.

Referenced by KX_BlenderSceneConverter::FreeBlendFile(), KX_Scene::NewRemoveObject(), KX_Scene::ReplaceMesh(), and ~KX_GameObject().

void KX_GameObject::RemoveParent ( KX_Scene scene)
void KX_GameObject::ResetDebugColor ( )

Reset the debug color of meshes associated with this class.

Definition at line 698 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 
)
void KX_GameObject::RestoreDynamics ( void  ) [inline]
void KX_GameObject::Resume ( void  )

Resume making progress

Reimplemented from SCA_IObject.

Definition at line 1253 of file KX_GameObject.cpp.

References GetPhysicsController(), SCA_IObject::m_suspended, and KX_IPhysicsController::RestoreDynamics().

Referenced by KX_Scene::UpdateObjectActivity().

void KX_GameObject::SetActionFrame ( short  layer,
float  frame 
)

Sets the current frame of an action

Definition at line 406 of file KX_GameObject.cpp.

References GetActionManager(), and BL_ActionManager::SetActionFrame().

Referenced by BL_ActionActuator::Update().

void KX_GameObject::setAngularVelocity ( const MT_Vector3 ang_vel,
bool  local 
)
void KX_GameObject::SetBlenderGroupObject ( struct Object obj) [inline]

Definition at line 530 of file KX_GameObject.h.

References m_pBlenderGroupObject.

Referenced by KX_Scene::DupliGroupRecurse().

void KX_GameObject::SetBlenderObject ( struct Object obj) [inline]

Definition at line 520 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 784 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 690 of file KX_GameObject.cpp.

References i, and m_meshes.

Referenced by ResetDebugColor().

virtual void KX_GameObject::SetDeformer ( class RAS_Deformer deformer) [inline, virtual]

Reimplemented in BL_DeformableGameObject.

Definition at line 446 of file KX_GameObject.h.

void KX_GameObject::SetGraphicController ( PHY_IGraphicController graphiccontroller) [inline]
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 847 of file KX_GameObject.cpp.

References m_layer.

Referenced by gameobject_from_blenderobject().

void KX_GameObject::setLinearVelocity ( const MT_Vector3 lin_vel,
bool  local 
)
void KX_GameObject::SetName ( const char *  name) [virtual]

Inherited from CValue -- set the name of this object.

Implements CValue.

Definition at line 222 of file KX_GameObject.cpp.

References m_name.

Referenced by bl_ConvertBlenderObject_Single(), 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 905 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 834 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 
)
void KX_GameObject::SetPhysicsController ( KX_IPhysicsController physicscontroller,
bool  isDynamic 
) [inline]

Definition at line 436 of file KX_GameObject.h.

References m_bDyna, and m_pPhysicsController1.

void KX_GameObject::SetPlayMode ( short  layer,
short  mode 
)

Sets play mode of the action on the given layer

Definition at line 416 of file KX_GameObject.cpp.

References GetActionManager(), and BL_ActionManager::SetPlayMode().

Referenced by BL_ActionActuator::Update().

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 550 of file KX_GameObject.h.

References m_pSGNode.

Referenced by KX_Scene::AddNodeReplicaObject(), and KX_Scene::RemoveNodeDestructObject().

void KX_GameObject::SetTimes ( short  layer,
float  start,
float  end 
)

Sets the start and end times of the action on the given layer

Definition at line 421 of file KX_GameObject.cpp.

References GetActionManager(), and BL_ActionManager::SetTimes().

void KX_GameObject::SetVisible ( bool  b,
bool  recursive 
)
void KX_GameObject::StopAction ( short  layer)

Stop playing the action on the given layer

Definition at line 386 of file KX_GameObject.cpp.

References GetActionManager(), and BL_ActionManager::StopAction().

Referenced by BL_ActionActuator::Update().

void KX_GameObject::Suspend ( void  )

bubbling methods.

Stop making progress

Reimplemented from SCA_IObject.

Definition at line 1264 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]
void KX_GameObject::SynchronizeTransform ( )
void KX_GameObject::SynchronizeTransformFunc ( SG_IObject node,
void *  gameobj,
void *  scene 
) [static]

Definition at line 684 of file KX_GameObject.cpp.

void KX_GameObject::UnregisterObstacle ( ) [inline]

Definition at line 875 of file KX_GameObject.h.

References m_pObstacleSimulation, and NULL.

Referenced by KX_ObstacleSimulation::DestroyObstacleForObj().

void KX_GameObject::UpdateActionManager ( float  curtime)

Kick the object's action manager

Definition at line 396 of file KX_GameObject.cpp.

References GetActionManager(), and BL_ActionManager::Update().

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 564 of file KX_GameObject.cpp.

References MT_Tuple3::getValue(), m_pBlenderObject, mul_v3_fl(), NodeGetWorldOrientation(), NodeGetWorldPosition(), NodeGetWorldScaling(), Object::obmat, and Object::rot.

Referenced by BL_ArmatureObject::ApplyPose(), and BL_ArmatureConstraint::UpdateTarget().

void KX_GameObject::UpdateBuckets ( bool  recursive)
void KX_GameObject::UpdateIPO ( float  curframetime,
bool  recurse 
)

Odd function to update an ipo. ???

Definition at line 718 of file KX_GameObject.cpp.

References GetSGNode(), SG_Node::SetSimulatedTime(), UpdateTransform(), and SG_Node::UpdateWorldData().

Referenced by BL_Action::Update(), and 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 
)
void KX_GameObject::UpdateTransform ( )

Update the physics object transform based upon the current SG_Node position.

Definition at line 656 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 670 of file KX_GameObject.cpp.


Member Data Documentation

Definition at line 121 of file KX_GameObject.h.

Referenced by GetActionManager(), ProcessReplica(), and ~KX_GameObject().

bool KX_GameObject::m_bCulled [protected]

Definition at line 104 of file KX_GameObject.h.

Referenced by GetCulled(), SetCulled(), and UpdateBuckets().

bool KX_GameObject::m_bDyna [protected]

Definition at line 86 of file KX_GameObject.h.

Referenced by IsDynamic(), and SetPhysicsController().

Definition at line 98 of file KX_GameObject.h.

Referenced by GetOpenGLMatrix(), and IsNegativeScaling().

bool KX_GameObject::m_bOccluder [protected]

Definition at line 105 of file KX_GameObject.h.

Referenced by GetOccluder(), and SetOccluder().

Definition at line 96 of file KX_GameObject.h.

Referenced by RestoreDynamics(), and SuspendDynamics().

Definition at line 97 of file KX_GameObject.h.

Referenced by SetObjectColor(), and UpdateBuckets().

bool KX_GameObject::m_bVisible [protected]

Definition at line 103 of file KX_GameObject.h.

Referenced by ActivateGraphicController(), GetVisible(), SetVisible(), and UpdateBuckets().

int KX_GameObject::m_layer [protected]

Definition at line 90 of file KX_GameObject.h.

Referenced by GetLayer(), and SetLayer().

std::vector<RAS_MeshObject*> KX_GameObject::m_meshes [protected]

Definition at line 99 of file KX_GameObject.h.

Referenced by GetObjectColor(), SetObjectColor(), and UpdateBuckets().

Definition at line 115 of file KX_GameObject.h.

Referenced by GetOpenGLMatrix(), and GetOpenGLMatrixPtr().

Definition at line 94 of file KX_GameObject.h.

Referenced by GetBlenderGroupObject(), and SetBlenderGroupObject().

Definition at line 87 of file KX_GameObject.h.

Referenced by getClientInfo(), KX_GameObject(), ProcessReplica(), and ~KX_GameObject().

Definition at line 111 of file KX_GameObject.h.

Definition at line 117 of file KX_GameObject.h.

Referenced by RegisterObstacle(), UnregisterObstacle(), and ~KX_GameObject().

Definition at line 109 of file KX_GameObject.h.

Reimplemented in KX_FontObject.

Definition at line 89 of file KX_GameObject.h.

Referenced by GetText().

bool KX_GameObject::m_xray [protected]

Definition at line 110 of file KX_GameObject.h.


The documentation for this class was generated from the following files: