Blender  V2.59
Public Member Functions | Static Public Member Functions | Public Attributes | 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)
 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)
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 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

Detailed Description

KX_GameObject is the main class for dynamic objects.

Definition at line 80 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 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]

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

References m_meshes.

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

void KX_GameObject::AddMeshUser ( )

linkage

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 
)
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 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 
)
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 173 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 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]
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]
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]

Was this object culled?

Definition at line 705 of file KX_GameObject.h.

References m_bCulled.

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 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  )
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]
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 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 ( )
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]
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 
)
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 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
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
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)
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]
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.

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 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 
)
void KX_GameObject::RestoreDynamics ( void  ) [inline]
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 
)
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.

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 375 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 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 
)
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 
)
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 
)
void KX_GameObject::Suspend ( void  )

bubbling methods.

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]
void KX_GameObject::SynchronizeTransform ( )
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)
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 
)
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.


Member Data Documentation

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().

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().

Definition at line 95 of file KX_GameObject.h.

Referenced by RestoreDynamics(), and SuspendDynamics().

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().

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

Referenced by GetName(), KX_Camera::KX_Camera(), and SetName().

Definition at line 98 of file KX_GameObject.h.

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

Definition at line 114 of file KX_GameObject.h.

Referenced by GetOpenGLMatrix(), and GetOpenGLMatrixPtr().

Definition at line 93 of file KX_GameObject.h.

Referenced by GetBlenderGroupObject(), and SetBlenderGroupObject().

Definition at line 86 of file KX_GameObject.h.

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

Definition at line 110 of file KX_GameObject.h.

Definition at line 108 of file KX_GameObject.h.

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.


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