Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
DistributedObjectAI Class Reference
Inheritance diagram for DistributedObjectAI:

## Public Member Functions
| __init__ (self, air)
| announceGenerate (self)
| b_setLocation (self, parentId, zoneId)
| beginBarrier (self, name, avIds, timeout, callback)
| d_setLocation (self, parentId, zoneId)
| delete (self)
| deleteOrDelay (self)
| execCommand (self, string, mwMgrId, avId, zoneId)
| generate (self)
| generateInit (self, repository=None)
| generateOtpObject (self, parentId, zoneId, optionalFields=[], doId=None)
| generateTargetChannel (self, repository)
| generateWithRequired (self, zoneId, optionalFields=[])
| generateWithRequiredAndId (self, doId, parentId, zoneId, optionalFields=[])
| GetAccountConnectionChannel (self, doId)
| GetAccountIDFromChannelCode (self, channel)
| GetAvatarIDFromChannelCode (self, channel)
| getBarrierData (self)
| getCacheable (self)
| getCollTrav (self, *args, **kArgs)
| getDelayDeleteCount (self)
| getDeleteEvent (self)
| getDoId (self)
| getLocation (self)
| getLogicalZoneChangeEvent (self)
| getNonCollidableParent (self)
| getParentMgr (self)
| GetPuppetConnectionChannel (self, doId)
| getRender (self)
| getZoneChangeEvent (self)
| getZoneData (self)
| handleLogicalZoneChange (self, newZoneId, oldZoneId)
| ignoreBarrier (self, context)
| initFromServerResponse (self, valDict)
| isDeleted (self)
| isGenerated (self)
| isGridParent (self)
| postGenerateMessage (self)
| preAllocateDoId (self)
| releaseZoneData (self)
| requestDelete (self)
| sendDeleteEvent (self)
| sendGenerateWithRequired (self, repository, parentId, zoneId, optionalFields=[])
| sendMessageBundle (self)
| sendUpdate (self, fieldName, args=[])
| sendUpdateToAccountId (self, accountId, fieldName, args)
| sendUpdateToAvatarId (self, avId, fieldName, args)
| sendUpdateToChannel (self, channelId, fieldName, args)
| setAI (self, aiChannel)
| setBarrierReady (self, context)
| setLocation (self, parentId, zoneId)
| startMessageBundle (self, name)
| status (self, indent=0)
| taskName (self, taskString)
| uniqueName (self, idString)
| updateAllRequiredFields (self, dclass, di)
| updateAllRequiredOtherFields (self, dclass, di)
| updateRequiredFields (self, dclass, di)
| updateRequiredOtherFields (self, dclass, di)
| validate (self, avId, bool, msg)
Public Member Functions inherited from DistributedObjectBase
| __init__ (self, cr)
| getParentObj (self)
| handleChildArrive (self, childObj, zoneId)
| handleChildArriveZone (self, childObj, zoneId)
| handleChildLeave (self, childObj, zoneId)
| handleChildLeaveZone (self, childObj, zoneId)
| handleQueryObjectChildrenLocalDone (self, context)
| hasParentingRules (self)
Public Member Functions inherited from DirectObject
| __init__ (self)
| accept (self, event, method, extraArgs=[])
| acceptOnce (self, event, method, extraArgs=[])
| addTask (self, *args, **kwargs)
| detectLeaks (self)
| doMethodLater (self, *args, **kwargs)
| getAllAccepting (self)
| ignore (self, event)
| ignoreAll (self)
| isAccepting (self, event)
| isIgnoring (self, event)
| removeAllTasks (self)
| removeTask (self, taskOrName)

## Static Public Member Functions
| staticGetLogicalZoneChangeEvent (doId)
| staticGetZoneChangeEvent (doId)

## Public Attributes
str | accountName = ''
| air = air
| Asad: As per Roger's suggestion, turn off the following block until a solution is thought out of how to prevent this delete message or to handle this message better TODO: do we still need this check?
| dclass = self.air.dclassesByName[className]
int | DistributedObjectAI_initialized = 1
| lastNonQuietZone = None
Public Attributes inherited from DistributedObjectBase
| cr = cr
| doId
int | parentId = None
| zoneId = None

## Static Public Attributes
int | QuietZone = 1
Static Public Attributes inherited from DistributedObjectBase
| notify = directNotify.newCategory("DistributedObjectBase")
Static Public Attributes inherited from DirectObject
| accept_once = acceptOnce
| add_task = addTask
| detect_leaks = detectLeaks
| do_method_later = doMethodLater
| get_all_accepting = getAllAccepting
| ignore_all = ignoreAll
| is_accepting = isAccepting
| is_ignoring = isIgnoring
| remove_all_tasks = removeAllTasks
| remove_task = removeTask

## Protected Member Functions
| _retrieveCachedData (self)
Protected Member Functions inherited from DirectObject
| _addTask (self, task)
| _clearTask (self, task)

## Protected Attributes
bool | _DOAI_requestedDelete = False
| _zoneData = None
Protected Attributes inherited from DirectObject
dict | _taskList = {}

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self,
|  |  | air )

## Member Function Documentation

## ◆ _retrieveCachedData()

_retrieveCachedData | ( |  | self | ) |
| protected

     This is a no-op on the AI.

## ◆ announceGenerate()

announceGenerate | ( |  | self | ) |

    Called after the object has been generated and all
    of its required fields filled in. Overwrite when needed.

Reimplemented in DistributedObjectGlobalAI.

## ◆ b_setLocation()

b_setLocation | ( |  | self,
|  |  | parentId,
|  |  | zoneId )

## ◆ beginBarrier()

beginBarrier | ( |  | self,
|  |  | name,
|  |  | avIds,
|  |  | timeout,
|  |  | callback )

## ◆ d_setLocation()

d_setLocation | ( |  | self,
|  |  | parentId,
|  |  | zoneId )

## ◆ delete()

delete | ( |  | self | ) |

    Inheritors should redefine this to take appropriate action on delete
    Note that this may be called multiple times if a class inherits
    from DistributedObjectAI more than once.

Reimplemented from DistributedObjectBase.

Reimplemented in DistributedCartesianGridAI, DistributedNodeAI, DistributedObjectGlobalAI, and DistributedSmoothNodeAI.

## ◆ deleteOrDelay()

deleteOrDelay | ( |  | self | ) |

     This method exists only to mirror the similar method on
    DistributedObject.  AI objects don't have delayDelete, they
    just get deleted immediately.

## ◆ execCommand()

execCommand | ( |  | self,
|  |  | string,
|  |  | mwMgrId,
|  |  | avId,
|  |  | zoneId )

## ◆ generate()

generate | ( |  | self | ) |

    Inheritors should put functions that require self.zoneId or
    other networked info in this function.

Reimplemented in DistributedSmoothNodeAI.

## ◆ generateInit()

generateInit | ( |  | self,
|  |  | repository = None )

    First generate (not from cache).

## ◆ generateOtpObject()

generateOtpObject | ( |  | self,
|  |  | parentId,
|  |  | zoneId,
|  |  | optionalFields = [],
|  |  | doId = None )

## ◆ generateTargetChannel()

generateTargetChannel | ( |  | self,
|  |  | repository )

    Who to send this to for generate messages

## ◆ generateWithRequired()

generateWithRequired | ( |  | self,
|  |  | zoneId,
|  |  | optionalFields = [] )

## ◆ generateWithRequiredAndId()

generateWithRequiredAndId | ( |  | self,
|  |  | doId,
|  |  | parentId,
|  |  | zoneId,
|  |  | optionalFields = [] )

## ◆ GetAccountConnectionChannel()

GetAccountConnectionChannel | ( |  | self,
|  |  | doId )

## ◆ GetAccountIDFromChannelCode()

GetAccountIDFromChannelCode | ( |  | self,
|  |  | channel )

## ◆ GetAvatarIDFromChannelCode()

GetAvatarIDFromChannelCode | ( |  | self,
|  |  | channel )

## ◆ getBarrierData()

getBarrierData | ( |  | self | ) |

## ◆ getCacheable()

getCacheable | ( |  | self | ) |

     This method exists only to mirror the similar method on
    DistributedObject.  AI objects aren't cacheable.

## ◆ getCollTrav()

getCollTrav | ( |  | self,
|  | * | args,
|  | ** | kArgs )

## ◆ getDelayDeleteCount()

getDelayDeleteCount | ( |  | self | ) |

## ◆ getDeleteEvent()

getDeleteEvent | ( |  | self | ) |

## ◆ getDoId()

getDoId | ( |  | self | ) |

    Return the distributed object id

## ◆ getLocation()

getLocation | ( |  | self | ) |

Reimplemented from DistributedObjectBase.

## ◆ getLogicalZoneChangeEvent()

getLogicalZoneChangeEvent | ( |  | self | ) |

## ◆ getNonCollidableParent()

getNonCollidableParent | ( |  | self | ) |

## ◆ getParentMgr()

getParentMgr | ( |  | self | ) |

## ◆ GetPuppetConnectionChannel()

GetPuppetConnectionChannel | ( |  | self,
|  |  | doId )

## ◆ getRender()

getRender | ( |  | self | ) |

## ◆ getZoneChangeEvent()

getZoneChangeEvent | ( |  | self | ) |

## ◆ getZoneData()

getZoneData | ( |  | self | ) |

## ◆ handleLogicalZoneChange()

handleLogicalZoneChange | ( |  | self,
|  |  | newZoneId,
|  |  | oldZoneId )

    this function gets called as if we never go through the
    quiet zone. Note that it is called once you reach the newZone,
    and not at the time that you leave the oldZone.

## ◆ ignoreBarrier()

ignoreBarrier | ( |  | self,
|  |  | context )

## ◆ initFromServerResponse()

initFromServerResponse | ( |  | self,
|  |  | valDict )

## ◆ isDeleted()

isDeleted | ( |  | self | ) |

    Returns true if the object has been deleted,
    or if it is brand new and hasnt yet been generated.

## ◆ isGenerated()

isGenerated | ( |  | self | ) |

    Returns true if the object has been generated

## ◆ isGridParent()

isGridParent | ( |  | self | ) |

Reimplemented in DistributedCartesianGridAI.

## ◆ postGenerateMessage()

postGenerateMessage | ( |  | self | ) |

## ◆ preAllocateDoId()

preAllocateDoId | ( |  | self | ) |

    objects that need to have a doId before they are generated
    can call this to pre-allocate a doId for the object

## ◆ releaseZoneData()

releaseZoneData | ( |  | self | ) |

## ◆ requestDelete()

requestDelete | ( |  | self | ) |

## ◆ sendDeleteEvent()

sendDeleteEvent | ( |  | self | ) |

## ◆ sendGenerateWithRequired()

sendGenerateWithRequired | ( |  | self,
|  |  | repository,
|  |  | parentId,
|  |  | zoneId,
|  |  | optionalFields = [] )

## ◆ sendMessageBundle()

sendMessageBundle | ( |  | self | ) |

## ◆ sendUpdate()

sendUpdate | ( |  | self,
|  |  | fieldName,
|  |  | args = [] )

## ◆ sendUpdateToAccountId()

sendUpdateToAccountId | ( |  | self,
|  |  | accountId,
|  |  | fieldName,
|  |  | args )

## ◆ sendUpdateToAvatarId()

sendUpdateToAvatarId | ( |  | self,
|  |  | avId,
|  |  | fieldName,
|  |  | args )

## ◆ sendUpdateToChannel()

sendUpdateToChannel | ( |  | self,
|  |  | channelId,
|  |  | fieldName,
|  |  | args )

## ◆ setAI()

setAI | ( |  | self,
|  |  | aiChannel )

## ◆ setBarrierReady()

setBarrierReady | ( |  | self,
|  |  | context )

## ◆ setLocation()

setLocation | ( |  | self,
|  |  | parentId,
|  |  | zoneId )

Reimplemented in DistributedNodeAI.

## ◆ startMessageBundle()

startMessageBundle | ( |  | self,
|  |  | name )

## ◆ staticGetLogicalZoneChangeEvent()

staticGetLogicalZoneChangeEvent | ( |  | doId | ) |
| static

## ◆ staticGetZoneChangeEvent()

staticGetZoneChangeEvent | ( |  | doId | ) |
| static

## ◆ status()

status | ( |  | self,
|  |  | indent = 0 )

    print out doId(parentId, zoneId) className
        and conditionally show generated or deleted

Reimplemented from DistributedObjectBase.

## ◆ taskName()

taskName | ( |  | self,
|  |  | taskString )

## ◆ uniqueName()

uniqueName | ( |  | self,
|  |  | idString )

## ◆ updateAllRequiredFields()

updateAllRequiredFields | ( |  | self,
|  |  | dclass,
|  |  | di )

## ◆ updateAllRequiredOtherFields()

updateAllRequiredOtherFields | ( |  | self,
|  |  | dclass,
|  |  | di )

## ◆ updateRequiredFields()

updateRequiredFields | ( |  | self,
|  |  | dclass,
|  |  | di )

## ◆ updateRequiredOtherFields()

updateRequiredOtherFields | ( |  | self,
|  |  | dclass,
|  |  | di )

## ◆ validate()

validate | ( |  | self,
|  |  | avId,
|  |  | bool,
|  |  | msg )

## Member Data Documentation

## ◆ _DOAI_requestedDelete

bool _DOAI_requestedDelete = False
| protected

## ◆ _zoneData

_zoneData = None
| protected

## ◆ accountName

str accountName = ''

## ◆ air

air = air

Asad: As per Roger's suggestion, turn off the following block until a solution is thought out of how to prevent this delete message or to handle this message better TODO: do we still need this check?

## ◆ dclass

dclass = self.air.dclassesByName[className]

## ◆ DistributedObjectAI_initialized

int DistributedObjectAI_initialized = 1

## ◆ lastNonQuietZone

lastNonQuietZone = None

## ◆ QuietZone

int QuietZone = 1
| static