Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ParentMgr Class Reference

## Public Member Functions
| __init__ (self)
| destroy (self)
| privRemoveReparentRequest (self, child)
| registerParent (self, token, parent)
| requestReparent (self, child, parentToken)
| unregisterParent (self, token)

## Public Attributes
dict | pendingChild2parentToken = {}
dict | pendingParentToken2children = {}
dict | token2nodepath = {}

## Static Public Attributes
| notify = DirectNotifyGlobal.directNotify.newCategory('ParentMgr')

## Detailed Description

    ParentMgr holds a table of nodes that avatars may be parented to
    in a distributed manner. All clients within a particular zone maintain
    identical tables of these nodes, and the nodes are referenced by 'tokens'
    which the clients can pass to each other to communicate distributed
    reparenting information.

    The functionality of ParentMgr used to be implemented with a simple
    token->node dictionary. As distributed 'parent' objects were manifested,
    they would add themselves to the dictionary. Problems occured when
    distributed avatars were manifested before the objects to which they
    were parented to.

    Since the order of object manifestation depends on the order of the
    classes in the DC file, we could maintain an ordering of DC definitions
    that ensures that the necessary objects are manifested before avatars.
    However, it's easy enough to keep a list of pending reparents and thus
    support the general case without requiring any strict ordering in the DC.

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self | ) |

## Member Function Documentation

## ◆ destroy()

destroy | ( |  | self | ) |

## ◆ privRemoveReparentRequest()

privRemoveReparentRequest | ( |  | self,
|  |  | child )

     this internal function removes any currently-pending reparent
    request for the given child nodepath

## ◆ registerParent()

registerParent | ( |  | self,
|  |  | token,
|  |  | parent )

## ◆ requestReparent()

requestReparent | ( |  | self,
|  |  | child,
|  |  | parentToken )

## ◆ unregisterParent()

unregisterParent | ( |  | self,
|  |  | token )

## Member Data Documentation

## ◆ notify

notify = DirectNotifyGlobal.directNotify.newCategory('ParentMgr')
| static

## ◆ pendingChild2parentToken

dict pendingChild2parentToken = {}

## ◆ pendingParentToken2children

dict pendingParentToken2children = {}

## ◆ token2nodepath

dict token2nodepath = {}