Blender V2.61 - r43446
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 RemoveSGController (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 157 of file SG_IObject.h.


Constructor & Destructor Documentation

SG_IObject::~SG_IObject ( ) [virtual]

Needed for replication.

Definition at line 103 of file SG_IObject.cpp.

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

Definition at line 41 of file SG_IObject.cpp.

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

Definition at line 54 of file SG_IObject.cpp.


Member Function Documentation

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

Definition at line 305 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 290 of file SG_IObject.h.

References SG_Callbacks::m_replicafunc, and NULL.

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

Definition at line 332 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 321 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 67 of file SG_IObject.cpp.

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

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

Implemented in SG_Node.

SG_Callbacks& SG_IObject::GetCallBackFunctions ( ) [inline]

Definition at line 221 of file SG_IObject.h.

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

Definition at line 260 of file SG_IObject.h.

Referenced by MergeScene_GameObject().

void* SG_IObject::GetSGClientInfo ( ) [inline]

Definition at line 264 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 236 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_LightIpoSGController::Update(), KX_ObColorIpoSGController::Update(), KX_CameraIpoSGController::Update(), KX_MaterialIpoController::Update(), KX_BoneParentRelation::UpdateChildCoordinates(), and walk_children().

void* SG_IObject::GetSGClientObject ( ) [inline]

Definition at line 241 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 213 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 85 of file SG_IObject.cpp.

Referenced by KX_Scene::AddNodeReplicaObject().

void SG_IObject::RemoveSGController ( SG_Controller cont)

Remove a pointer to a controller from this node. This does not delete the controller itself! Be careful to avoid memory leaks.

Definition at line 75 of file SG_IObject.cpp.

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 90 of file SG_IObject.cpp.

Referenced by SG_Node::SetSimulatedTime().

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

Definition at line 268 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 253 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: