direct.distributed.DoCollectionManager

from direct.distributed.DoCollectionManager import DoCollectionManager

Inheritance diagram

Inheritance diagram of direct.distributed.DoCollectionManager

class DoCollectionManager[source]

Bases: object

__init__(self)[source]
addDOToTables(self, do, location=None, ownerView=False)[source]
callbackWithDo(self, doId, callback)[source]
callbackWithOwnerView(self, doId, callback)[source]
countObjects(self, classType)[source]

Counts the number of objects of the given type in the repository (for testing purposes)

deleteDistributedObjects(self)[source]
deleteObjectLocation(self, object, parentId, zoneId)[source]
doByDistance(self)[source]
doFind(self, str)[source]

Returns list of distributed objects with matching str in value.

doFindAll(self, str)[source]

Returns list of distributed objects with matching str in value.

doFindAllInstances(self, cls)[source]
doFindAllMatching(self, str)[source]

Returns list of distributed objects with matching str in value.

doFindAllOfType(self, query)[source]

Useful method for searching through the Distributed Object collection for objects of a particular type

dosByDistance(self)[source]
findAnyOfType(self, type)[source]
getAllOfType(self, type)[source]
getDo(self, doId)[source]
getDoIdList(self, parentId, zoneId=None, classType=None)[source]
getDoList(self, parentId, zoneId=None, classType=None)[source]
Parameters
  • parentId – any distributed object id.

  • zoneId – a uint32, defaults to None (all zones). Try zone 2 if you’re not sure which zone to use (0 is a bad/null zone and 1 has had reserved use in the past as a no messages zone, while 2 has traditionally been a global, uber, misc stuff zone).

  • dclassType – a distributed class type filter, defaults to None (no filter).

If dclassName is None then all objects in the zone are returned; otherwise the list is filtered to only include objects of that type.

getDoTable(self, ownerView)[source]
getGameDoId(self)[source]
getObjectsInZone(self, parentId, zoneId)[source]

returns dict of doId:distObj for a zone. returned dict is safely mutable.

getObjectsOfClassInZone(self, parentId, zoneId, objClass)[source]

returns dict of doId:object for a zone, containing all objects that inherit from ‘class’. returned dict is safely mutable.

getOwnerView(self, doId)[source]
getOwnerViewDoIdList(self, classType)[source]
getOwnerViewDoList(self, classType)[source]
handleObjectLocation(self, di)[source]
handleSetLocation(self, di)[source]
hasOwnerViewDoId(self, doId)[source]
isInDoTables(self, doId)[source]
isValidLocationTuple(self, location)[source]
printObjectCount(self)[source]
printObjects(self)[source]
removeDOFromTables(self, do)[source]
storeObjectLocation(self, object, parentId, zoneId)[source]
webPrintObjectCount(self)[source]