Panda3D
|
Public Member Functions | |
def | __init__ (self) |
def | loadPhaseAt (self) |
def | loadPhaseAway (self) |
def | loadPhaseFar (self) |
def | loadPhaseNear (self) |
def | unloadPhaseAt (self) |
def | unloadPhaseAway (self) |
def | unloadPhaseFar (self) |
def | unloadPhaseNear (self) |
![]() | |
def | __repr__ (self) |
def | __str__ (self) |
def | cleanup (self) |
def | getAliasPhase (self, alias) |
def | getPhase (self) |
def | getPhaseAlias (self, phase) |
def | setAlias (self, phase, alias) |
def | setPhase (self, aPhase) |
Additional Inherited Members | |
![]() | |
aliasPhaseMap | |
phase | |
phaseAliasMap | |
![]() | |
notify = directNotify.newCategory("PhasedObject") | |
This is an example class to demonstrate the concept of alias mapping for PhasedObjects. As the distance between an observer and this object closes, we would set the phase level succesively higher, with an initial phase of 'Away' being set in __init__: setPhase('Far') -> invokes loadPhaseFar() setPhase('Near') -> invokes loadPhaseNear() Now let's say the objects start moving away from each other: setPhase('Far') -> invokes unloadPhaseNear() setPhase('Away') -> invokes unloadPhaseFar() Now one object teleports to the other: setPhase('At') -> invokes loadPhase('Far'), then loadPhase('Near'), then loadPhase('At') Now the phased object is destroyed, we must clean it up before removal: cleanup() -> invokes unloadPhase('At') then unloadPhase('Near') then unloadPhase('Far') then unloadPhase('Away')
def __init__ | ( | self | ) |
Reimplemented from PhasedObject.
def loadPhaseAt | ( | self | ) |
def loadPhaseAway | ( | self | ) |
def loadPhaseFar | ( | self | ) |
def loadPhaseNear | ( | self | ) |
def unloadPhaseAt | ( | self | ) |
def unloadPhaseAway | ( | self | ) |
def unloadPhaseFar | ( | self | ) |
def unloadPhaseNear | ( | self | ) |