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

SG_Node Class Reference

#include <SG_Node.h>

Inheritance diagram for SG_Node:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SG_Node (void *clientobj, void *clientinfo, SG_Callbacks &callbacks)
 SG_Node (const SG_Node &other)
virtual ~SG_Node ()
void AddChild (SG_Node *child)
void RemoveChild (SG_Node *child)
bool IsAncessor (const SG_Node *child) const
NodeListGetSGChildren ()
const NodeListGetSGChildren () const
void ClearSGChildren ()
SG_NodeGetSGParent () const
void SetSGParent (SG_Node *parent)
const SG_NodeGetRootSGParent () const
void DisconnectFromParent ()
bool IsVertexParent ()
bool IsSlowParent ()
void UpdateWorldData (double time, bool parentUpdated=false)
void SetSimulatedTime (double time, bool recurse)
bool Schedule (SG_QList &head)
bool Reschedule (SG_QList &head)
SG_NodeGetSGReplica ()
void Destruct ()

Static Public Member Functions

static SG_NodeGetNextScheduled (SG_QList &head)
static SG_NodeGetNextRescheduled (SG_QList &head)

Detailed Description

Scenegraph node.

Definition at line 43 of file SG_Node.h.


Constructor & Destructor Documentation

SG_Node::SG_Node ( void *  clientobj,
void *  clientinfo,
SG_Callbacks callbacks 
)

Definition at line 40 of file SG_Node.cpp.

References SG_Spatial::m_modified.

Referenced by GetSGReplica().

SG_Node::SG_Node ( const SG_Node other)

Definition at line 52 of file SG_Node.cpp.

References SG_Spatial::m_modified.

SG_Node::~SG_Node ( ) [virtual]

Definition at line 62 of file SG_Node.cpp.


Member Function Documentation

void SG_Node::AddChild ( SG_Node child)

Add a child to this object. This also informs the child of it's parent. This just stores a pointer to the child and does not make a deep copy.

Definition at line 171 of file SG_Node.cpp.

References SetSGParent().

Referenced by KX_Scene::AddReplicaObject(), bl_ConvertBlenderObject_Single(), KX_Scene::DupliGroupRecurse(), and KX_GameObject::SetParent().

void SG_Node::ClearSGChildren ( ) [inline]

Clear the list of children associated with this node

Definition at line 116 of file SG_Node.h.

Referenced by KX_Scene::AddReplicaObject(), and KX_Scene::DupliGroupRecurse().

void SG_Node::Destruct ( ) [virtual]
void SG_Node::DisconnectFromParent ( )

Disconnect this node from it's parent

Definition at line 161 of file SG_Node.cpp.

References NULL, and RemoveChild().

Referenced by BL_ConvertBlenderObjects(), KX_Scene::RemoveObject(), and KX_GameObject::RemoveParent().

static SG_Node* SG_Node::GetNextRescheduled ( SG_QList head) [inline, static]

Used during Scenegraph update

Definition at line 238 of file SG_Node.h.

References SG_QList::QRemove().

Referenced by KX_Scene::UpdateParents().

static SG_Node* SG_Node::GetNextScheduled ( SG_QList head) [inline, static]

Used during Scenegraph update

Definition at line 221 of file SG_Node.h.

References SG_DList::Remove().

Referenced by KX_Scene::UpdateParents().

const SG_Node * SG_Node::GetRootSGParent ( ) const

Return the top node in this node's Scene graph hierarchy

Definition at line 148 of file SG_Node.cpp.

References GetRootSGParent().

Referenced by KX_Scene::AddReplicaObject(), GetRootSGParent(), KX_GameObject::RemoveParent(), and KX_GameObject::SetParent().

NodeList& SG_Node::GetSGChildren ( ) [inline]

Get the current list of children. Do not use this interface for adding or removing children please use the methods of this class for that.

Returns:
a reference to the list of children of this node.

Definition at line 97 of file SG_Node.h.

Referenced by KX_Scene::AddReplicaObject(), KX_Scene::DupliGroupRecurse(), MergeScene_GameObject(), setGraphicController_recursive(), setOccluder_recursive(), setVisible_recursive(), UpdateBuckets_recursive(), and walk_children().

const NodeList& SG_Node::GetSGChildren ( ) const [inline]

Get the current list of children.

Returns:
a const reference to the current list of children of this node.

Definition at line 107 of file SG_Node.h.

SG_Node* SG_Node::GetSGParent ( ) const [inline]
SG_Node * SG_Node::GetSGReplica ( )

Node replication functions.

Definition at line 67 of file SG_Node.cpp.

References NULL, and SG_Node().

Referenced by KX_Scene::AddReplicaObject(), and KX_Scene::DupliGroupRecurse().

bool SG_Node::IsAncessor ( const SG_Node child) const

Return true if the node is the ancessor of child

Definition at line 153 of file SG_Node.cpp.

Referenced by KX_GameObject::SetParent().

bool SG_Node::IsSlowParent ( ) [inline]

Return slow parent status.

Definition at line 173 of file SG_Node.h.

References SG_ParentRelation::IsSlowRelation(), and SG_Spatial::m_parent_relation.

bool SG_Node::IsVertexParent ( ) [inline]

Return vertex parent status.

Definition at line 159 of file SG_Node.h.

References SG_ParentRelation::IsVertexRelation(), and SG_Spatial::m_parent_relation.

Referenced by KX_GameObject::IsVertexParent().

void SG_Node::RemoveChild ( SG_Node child)

Remove a child node from this object. This just removes the child pointer from the list of children - it does not destroy the child. This does not inform the child that this node is no longer it's parent. If the node was not a child of this object no action is performed.

Definition at line 177 of file SG_Node.cpp.

References find().

Referenced by DisconnectFromParent().

bool SG_Node::Reschedule ( SG_QList head) [inline]

Make this node ready for schedule on next update. This is needed for nodes that must always be updated (slow parent, bone parent)

Definition at line 230 of file SG_Node.h.

References SG_QList::QAddBack().

bool SG_Node::Schedule ( SG_QList head) [inline]

Schedule this node for update by placing it in head queue

Definition at line 210 of file SG_Node.h.

References SG_DList::AddBack(), and SG_DList::AddFront().

Referenced by KX_Scene::UpdateParents().

void SG_Node::SetSGParent ( SG_Node parent) [inline]

Set the parent of this node.

Definition at line 134 of file SG_Node.h.

Referenced by AddChild().

void SG_Node::SetSimulatedTime ( double  time,
bool  recurse 
)

Update the simulation time of this node. Iterate through the children nodes and update their simulated time.

Definition at line 210 of file SG_Node.cpp.

References SG_IObject::SetControllerTime().

Referenced by KX_GameObject::UpdateIPO().

void SG_Node::UpdateWorldData ( double  time,
bool  parentUpdated = false 
)

Update the spatial data of this node. Iterate through the children of this node and update their world data.

Definition at line 189 of file SG_Node.cpp.

References SG_IObject::ActivateUpdateTransformCallback(), SG_DList::Delink(), GetSGParent(), and SG_Spatial::UpdateSpatialData().

Referenced by KX_Scene::AddReplicaObject(), KX_Scene::DupliGroupRecurse(), KX_GameObject::NodeUpdateGS(), ImageRender::Render(), KX_GameObject::UpdateIPO(), and KX_Scene::UpdateParents().


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