Panda3D

Loading...
Searching...
No Matches
Public Member Functions | List of all members
AnfaPhasedObject Class Reference
Inheritance diagram for AnfaPhasedObject:

## Public Member Functions
| __init__ (self)
| loadPhaseAt (self)
| loadPhaseAway (self)
| loadPhaseFar (self)
| loadPhaseNear (self)
| unloadPhaseAt (self)
| unloadPhaseAway (self)
| unloadPhaseFar (self)
| unloadPhaseNear (self)
Public Member Functions inherited from PhasedObject
| __init__ (self, aliasMap={})
| __repr__ (self)
| __str__ (self)
| cleanup (self)
| getAliasPhase (self, alias)
| getPhase (self)
| getPhaseAlias (self, phase)
| setAlias (self, phase, alias)
| setPhase (self, aPhase)

## Additional Inherited Members
Public Attributes inherited from PhasedObject
dict | aliasPhaseMap = {}
int | phase = -1
dict | phaseAliasMap = {}
Static Public Attributes inherited from PhasedObject
| notify = directNotify.newCategory("PhasedObject")

## Detailed Description

    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')

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self | ) |

## Member Function Documentation

## ◆ loadPhaseAt()

loadPhaseAt | ( |  | self | ) |

## ◆ loadPhaseAway()

loadPhaseAway | ( |  | self | ) |

## ◆ loadPhaseFar()

loadPhaseFar | ( |  | self | ) |

## ◆ loadPhaseNear()

loadPhaseNear | ( |  | self | ) |

## ◆ unloadPhaseAt()

unloadPhaseAt | ( |  | self | ) |

## ◆ unloadPhaseAway()

unloadPhaseAway | ( |  | self | ) |

## ◆ unloadPhaseFar()

unloadPhaseFar | ( |  | self | ) |

## ◆ unloadPhaseNear()

unloadPhaseNear | ( |  | self | ) |