Panda3D
Public Member Functions

AnfaPhasedObject Class Reference

Inheritance diagram for AnfaPhasedObject:
PhasedObject

List of all members.

Public Member Functions

def __init__
def loadPhaseAt
def loadPhaseAway
def loadPhaseFar
def loadPhaseNear
def unloadPhaseAt
def unloadPhaseAway
def unloadPhaseFar
def unloadPhaseNear

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

def __init__ (   self)

Member Function Documentation

def loadPhaseAt (   self)
def loadPhaseAway (   self)
def loadPhaseFar (   self)
def loadPhaseNear (   self)
def unloadPhaseAt (   self)
def unloadPhaseAway (   self)
def unloadPhaseFar (   self)
def unloadPhaseNear (   self)
 All Classes Namespaces Functions Variables Properties