Blender  V2.59
Public Member Functions | Protected Member Functions
SG_IObject Class Reference

#include <SG_IObject.h>

Inheritance diagram for SG_IObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~SG_IObject ()
 Needed for replication.
void AddSGController (SG_Controller *cont)
void RemoveAllControllers ()
SGControllerListGetSGControllerList ()
 Needed for replication.
SG_CallbacksGetCallBackFunctions ()
const void * GetSGClientObject () const
void * GetSGClientObject ()
void SetSGClientObject (void *clientObject)
const void * GetSGClientInfo () const
void * GetSGClientInfo ()
void SetSGClientInfo (void *clientInfo)
void SetControllerTime (double time)
virtual void Destruct ()=0

Protected Member Functions

bool ActivateReplicationCallback (SG_IObject *replica)
void ActivateDestructionCallback ()
void ActivateUpdateTransformCallback ()
bool ActivateScheduleUpdateCallback ()
void ActivateRecheduleUpdateCallback ()
 SG_IObject (void *clientobj, void *clientinfo, SG_Callbacks &callbacks)
 SG_IObject (const SG_IObject &other)

Detailed Description

base object that can be part of the scenegraph.

Definition at line 158 of file SG_IObject.h.


Constructor & Destructor Documentation

SG_IObject::~SG_IObject ( ) [virtual]

Needed for replication.

Definition at line 92 of file SG_IObject.cpp.

SG_IObject::SG_IObject ( void *  clientobj,
void *  clientinfo,
SG_Callbacks callbacks 
) [protected]

Definition at line 40 of file SG_IObject.cpp.

SG_IObject::SG_IObject ( const SG_IObject other) [protected]

Definition at line 53 of file SG_IObject.cpp.


Member Function Documentation

void SG_IObject::ActivateDestructionCallback ( ) [inline, protected]

Definition at line 296 of file SG_IObject.h.

References SG_Callbacks::m_destructionfunc.

Referenced by SG_Node::Destruct().

void SG_IObject::ActivateRecheduleUpdateCallback ( ) [inline, protected]
bool SG_IObject::ActivateReplicationCallback ( SG_IObject replica) [inline, protected]

Definition at line 281 of file SG_IObject.h.

References SG_Callbacks::m_replicafunc, and NULL.

bool SG_IObject::ActivateScheduleUpdateCallback ( ) [inline, protected]

Definition at line 323 of file SG_IObject.h.

References SG_DList::Empty(), and SG_Callbacks::m_schedulefunc.

Referenced by SG_Spatial::SetModified().

void SG_IObject::ActivateUpdateTransformCallback ( ) [inline, protected]

Definition at line 312 of file SG_IObject.h.

References SG_Callbacks::m_updatefunc.

Referenced by SG_Node::UpdateWorldData().

void SG_IObject::AddSGController ( SG_Controller cont)

Add a pointer to a controller allocated on the heap, to this node. This memory for this controller becomes the responsibility of this class. It will be deleted when this object is deleted.

Definition at line 66 of file SG_IObject.cpp.

Referenced by KX_Scene::AddNodeReplicaObject(), BL_ConvertCameraIpos(), BL_ConvertIpos(), BL_ConvertLampIpos(), and ConvertMaterialIpos().

virtual void SG_IObject::Destruct ( ) [pure virtual]

Implemented in SG_Node.

SG_Callbacks& SG_IObject::GetCallBackFunctions ( ) [inline]

Definition at line 212 of file SG_IObject.h.

const void* SG_IObject::GetSGClientInfo ( ) const [inline]

Definition at line 251 of file SG_IObject.h.

Referenced by MergeScene_GameObject().

void* SG_IObject::GetSGClientInfo ( ) [inline]

Definition at line 255 of file SG_IObject.h.

const void* SG_IObject::GetSGClientObject ( ) const [inline]

Get the client object associated with this node. This interface allows you to associate arbitray external objects with this node. They are passed to the callback functions when they are activated so you can syncronise these external objects upon replication and destruction This may be NULL.

Definition at line 227 of file SG_IObject.h.

Referenced by KX_GameObject::GetParent(), KX_IpoSGController::GetReplica(), KX_Scene::MarkSubTreeVisible(), KX_Scene::MarkVisible(), KX_GameObject::RemoveParent(), KX_GameObject::SetParent(), KX_MaterialIpoController::Update(), KX_ObColorIpoSGController::Update(), KX_CameraIpoSGController::Update(), KX_LightIpoSGController::Update(), KX_BoneParentRelation::UpdateChildCoordinates(), and walk_children().

void* SG_IObject::GetSGClientObject ( ) [inline]

Definition at line 232 of file SG_IObject.h.

SGControllerList& SG_IObject::GetSGControllerList ( ) [inline]

Needed for replication.

Return a reference to this node's controller list. Whilst we don't wish to expose full control of the container to the user we do allow them to call non_const methods on pointers in the container. C++ topic: how to do this in using STL?

Definition at line 204 of file SG_IObject.h.

Referenced by KX_Scene::AddNodeReplicaObject(), KX_GameObject::InitIPO(), MergeScene_GameObject(), SG_Spatial::UpdateSpatialData(), and KX_GameObject::~KX_GameObject().

void SG_IObject::RemoveAllControllers ( )

Clear the array of pointers to controllers associated with this node. This does not delete the controllers themselves! This should be used very carefully to avoid memory leaks.

Definition at line 74 of file SG_IObject.cpp.

Referenced by KX_Scene::AddNodeReplicaObject().

void SG_IObject::SetControllerTime ( double  time)

Set the current simulation time for this node. The implementation of this function runs through the nodes list of controllers and calls their SetSimulatedTime methods

Definition at line 79 of file SG_IObject.cpp.

Referenced by SG_Node::SetSimulatedTime().

void SG_IObject::SetSGClientInfo ( void *  clientInfo) [inline]

Definition at line 259 of file SG_IObject.h.

Referenced by MergeScene_GameObject().

void SG_IObject::SetSGClientObject ( void *  clientObject) [inline]

Set the client object for this node. This is just a pointer to an object allocated that should exist for the duration of the lifetime of this object, or untill this function is called again.

Definition at line 244 of file SG_IObject.h.

Referenced by KX_Scene::AddNodeReplicaObject(), and KX_GameObject::~KX_GameObject().


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