Panda3D
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
SfxPlayer Class Reference

Public Member Functions

def __init__ (self)
 
def getCutoffDistance (self)
 
def getLocalizedVolume (self, node, listenerNode=None, cutoff=None)
 
def playSfx (self, sfx, looping=0, interrupt=1, volume=None, time=0.0, node=None, listenerNode=None, cutoff=None)
 
def setCutoffDistance (self, d)
 
def setFinalVolume (self, sfx, node, volume, listenerNode, cutoff=None)
 

Public Attributes

 cutoffDistance
 
 cutoffVolume
 
 distanceScale
 

Static Public Attributes

int UseInverseSquare = 0
 

Detailed Description

Play sound effects, potentially localized.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Member Function Documentation

◆ getCutoffDistance()

def getCutoffDistance (   self)
Return the curent cutoff distance.

◆ getLocalizedVolume()

def getLocalizedVolume (   self,
  node,
  listenerNode = None,
  cutoff = None 
)
Get the volume that a sound should be played at if it is
localized at this node. We compute this wrt the camera
or to listenerNode.

◆ playSfx()

def playSfx (   self,
  sfx,
  looping = 0,
  interrupt = 1,
  volume = None,
  time = 0.0,
  node = None,
  listenerNode = None,
  cutoff = None 
)

◆ setCutoffDistance()

def setCutoffDistance (   self,
  d 
)

◆ setFinalVolume()

def setFinalVolume (   self,
  sfx,
  node,
  volume,
  listenerNode,
  cutoff = None 
)
Calculate the final volume based on all contributed factors.

Member Data Documentation

◆ cutoffDistance

cutoffDistance

◆ cutoffVolume

cutoffVolume

◆ distanceScale

distanceScale

◆ UseInverseSquare

int UseInverseSquare = 0
static