Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ThreeUpShow Class Reference
Inheritance diagram for ThreeUpShow:
ShowBase DirectObject

Public Member Functions

 __init__ (self)
 
 makeCamera (self, win, sort=0, scene=None, displayRegion=(0, 1, 0, 1), stereo=None, aspectRatio=None, clearDepth=0, clearColor=None, lens=None, camName='cam', mask=None, useCamera=None)
 
- Public Member Functions inherited from ShowBase
 addAngularIntegrator (self)
 
 addSfxManager (self, extraSfxManager)
 
 adjustWindowAspectRatio (self, aspectRatio)
 
 attachInputDevice (self, device, prefix=None, watch=False)
 
 backfaceCullingOff (self)
 
 backfaceCullingOn (self)
 
 changeMouseInterface (self, changeTo)
 
 closeWindow (self, win, keepCamera=False, removeWindow=True)
 
 createBaseAudioManagers (self)
 
 createStats (self, hostname=None, port=None)
 
 destroy (self)
 
 detachInputDevice (self, device)
 
 disableAllAudio (self)
 
 disableMouse (self)
 
 disableParticles (self)
 
 enableAllAudio (self)
 
 enableMouse (self)
 
 enableMusic (self, bEnableMusic)
 
 enableParticles (self)
 
 enableSoftwareMousePointer (self)
 
 enableSoundEffects (self, bEnableSoundEffects)
 
 finalizeExit (self)
 
 getAlt (self)
 
 getAspectRatio (self, win=None)
 
 getAxes (self)
 
 getBackgroundColor (self, win=None)
 
 getControl (self)
 
 getExitErrorCode (self)
 
 getMeta (self)
 
 getRepository (self)
 
 getShift (self)
 
 getSize (self, win=None)
 
 initShadowTrav (self)
 
 isParticleMgrEnabled (self)
 
 isPhysicsMgrEnabled (self)
 
 loadMusic (self, name)
 
 loadSfx (self, name)
 
 makeAllPipes (self)
 
 makeCamera2d (self, win, sort=10, displayRegion=(0, 1, 0, 1), coords=(-1, 1, -1, 1), lens=None, cameraName=None)
 
 makeCamera2dp (self, win, sort=20, displayRegion=(0, 1, 0, 1), coords=(-1, 1, -1, 1), lens=None, cameraName=None)
 
 makeDefaultPipe (self, printPipeTypes=None)
 
 makeModulePipe (self, moduleName)
 
 movie (self, namePrefix='movie', duration=1.0, fps=30, format='png', sd=4, source=None)
 
 oobe (self, cam=None)
 
 oobeCull (self, cam=None)
 
 openDefaultWindow (self, *args, **kw)
 
 openMainWindow (self, *args, **kw)
 
 openWindow (self, props=None, fbprops=None, pipe=None, gsg=None, host=None, type=None, name=None, size=None, aspectRatio=None, makeCamera=True, keepCamera=False, scene=None, stereo=None, unexposedDraw=None, callbackWindowDict=None, requireWindow=None)
 
 playMusic (self, music, looping=0, interrupt=1, volume=None, time=0.0)
 
 playSfx (self, sfx, looping=0, interrupt=1, volume=None, time=0.0, node=None, listener=None, cutoff=None)
 
 popCTrav (self)
 
 printEnvDebugInfo (self)
 
 pushCTrav (self, cTrav)
 
 removeCameraFrustum (self)
 
 restart (self, clusterSync=False, cluster=None)
 
 reviveInput (self)
 
 run (self)
 
 saveCubeMap (self, namePrefix='cube_map_#.png', defaultFilename=0, source=None, camera=None, size=128, cameraMask=PandaNode.getAllCameraMask(), sourceLens=None)
 
 saveSphereMap (self, namePrefix='spheremap.png', defaultFilename=0, source=None, camera=None, size=256, cameraMask=PandaNode.getAllCameraMask(), numVertices=1000, sourceLens=None)
 
 screenshot (self, namePrefix='screenshot', defaultFilename=1, source=None, imageComment="")
 
 SetAllSfxEnables (self, bEnabled)
 
 setAspectRatio (self, aspectRatio)
 
 setBackgroundColor (self, r=None, g=None, b=None, a=0.0, win=None)
 
 setFrameRateMeter (self, flag)
 
 setMouseOnNode (self, newNode)
 
 setSceneGraphAnalyzerMeter (self, flag)
 
 setSleep (self, amount)
 
 setupDataGraph (self)
 
 setupMouse (self, win, fMultiWin=False)
 
 setupMouseCB (self, win)
 
 setupRender (self)
 
 setupRender2d (self)
 
 setupRender2dp (self)
 
 setupWindowControls (self, winCtrl=None)
 
 showCameraFrustum (self)
 
 shutdown (self)
 
 silenceInput (self)
 
 spawnTkLoop (self)
 
 spawnWxLoop (self)
 
 startDirect (self, fWantDirect=1, fWantTk=1, fWantWx=0)
 
 startTk (self, fWantTk=True)
 
 startWx (self, fWantWx=True)
 
 textureOff (self)
 
 textureOn (self)
 
 tkRun (self)
 
 toggleBackface (self)
 
 toggleParticles (self)
 
 toggleShowVertices (self)
 
 toggleTexMem (self)
 
 toggleTexture (self)
 
 toggleWireframe (self)
 
 updateManagers (self, state)
 
 useDrive (self)
 
 userExit (self)
 
 useTrackball (self)
 
 windowEvent (self, win)
 
 wireframeOff (self)
 
 wireframeOn (self)
 
 wxRun (self)
 
- Public Member Functions inherited from DirectObject
 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)
 

Public Attributes

 camLL
 
 camRS
 
 camUR
 
- Public Attributes inherited from ShowBase
 a2dBackground
 
 a2dBottom
 The Z position of the bottom border of the aspect2d screen.
 
 a2dBottomCenter
 
 a2dBottomCenterNs
 
 a2dBottomLeft
 
 a2dBottomLeftNs
 
 a2dBottomRight
 
 a2dBottomRightNs
 
 a2dLeft
 The X position of the left border of the aspect2d screen.
 
 a2dLeftCenter
 
 a2dLeftCenterNs
 
 a2dpBottom
 The Z position of the bottom border of the aspect2dp screen.
 
 a2dpBottomCenter
 
 a2dpBottomLeft
 
 a2dpBottomRight
 
 a2dpLeft
 The X position of the left border of the aspect2dp screen.
 
 a2dpLeftCenter
 
 a2dpRight
 The X position of the right border of the aspect2dp screen.
 
 a2dpRightCenter
 
 a2dpTop
 The Z position of the top border of the aspect2dp screen.
 
 a2dpTopCenter
 
 a2dpTopLeft
 
 a2dpTopRight
 
 a2dRight
 The X position of the right border of the aspect2d screen.
 
 a2dRightCenter
 
 a2dRightCenterNs
 
 a2dTop
 The Z position of the top border of the aspect2d screen.
 
 a2dTopCenter
 
 a2dTopCenterNs
 
 a2dTopLeft
 
 a2dTopLeftNs
 
 a2dTopRight
 
 a2dTopRightNs
 
 app_runner
 
 AppHasAudioFocus
 
 appRunner
 This contains the global appRunner instance, as imported from .AppRunnerGlobal.
 
 appTrav
 
 aspect2d
 The normal 2-d DisplayRegion has an aspect ratio that matches the window, but its coordinate system is square.
 
 aspect2dp
 The normal 2-d DisplayRegion has an aspect ratio that matches the window, but its coordinate system is square.
 
 backfaceCullingEnabled
 
 bboard
 The global bulletin board, as imported from .BulletinBoardGlobal.
 
 bufferViewer
 Utility for viewing offscreen buffers, see :mod:.BufferViewer.
 
 buttonThrowers
 
 cam
 This is a :class:~panda3d.core.NodePath pointing to the :class:~panda3d.core.Camera object set up for the 3D scene.
 
 cam2d
 Same as cam, but for the 2D scene graph.
 
 cam2dp
 Same as cam2d, but for the 2D overlay scene graph.
 
 camera
 This is the :class:~panda3d.core.NodePath that should be used to manipulate the camera.
 
 camera2d
 Same as camera, but for the 2D scene graph.
 
 camera2dp
 Same as camera2d, but for the 2D overlay scene graph.
 
 camFrustumVis
 
 camLens
 Convenience accessor for base.camNode.get_lens(), containing a :class:~panda3d.core.Lens object.
 
 camList
 A list of all cameras created with makeCamera(), including cam.
 
 camNode
 Convenience accessor for base.cam.node(), containing a :class:~panda3d.core.Camera object.
 
 clientSleep
 
 clock
 This is the global :class:~panda3d.core.ClockObject.
 
 cluster
 
 clusterSyncFlag
 
 cTrav
 A placeholder for a :class:~panda3d.core.CollisionTraverser.
 
 cTravStack
 
 dataRoot
 
 dataRootNode
 
 debugRunningMultiplier
 
 deviceButtonThrowers
 
 devices
 This is the global :class:~panda3d.core.InputDeviceManager, which keeps track of connected input devices.
 
 dgTrav
 
 direct
 
 drive
 
 eventMgr
 The global event manager, as imported from .EventManagerGlobal.
 
 exitFunc
 Fill this in with a function to invoke when the user "exits" the program by closing the main window.
 
 finalExitCallbacks
 Add final-exit callbacks to this list.
 
 frameRateMeter
 
 graphics_engine
 
 graphicsEngine
 The global :class:~panda3d.core.GraphicsEngine, as returned by GraphicsEngine.getGlobalPtr()
 
 hidden
 
 jobMgr
 The global job manager, as imported from .JobManagerGlobal.
 
 loader
 .Loader.Loader object.
 
 main_dir
 
 mainDir
 The directory containing the main Python file of this application.
 
 mainWinForeground
 
 mainWinMinimized
 
 messenger
 The global messenger, as imported from .MessengerGlobal.
 
 mouse2cam
 
 mouseInterface
 
 mouseInterfaceNode
 
 mouseWatcher
 
 mouseWatcherNode
 The :class:~panda3d.core.MouseWatcher object, created by setupMouse().
 
 multiClientSleep
 
 musicActive
 
 musicManager
 
 musicManagerIsValid
 
 nextWindowIndex
 
 onScreenDebug
 
 oobe2cam
 
 oobeCamera
 
 oobeCameraTrackball
 
 oobeCullFrustum
 
 oobeLens
 
 oobeMode
 
 oobeTrackball
 
 oobeVis
 
 particleMgr
 If enableParticles() has been called, this is the particle manager as imported from :mod:direct.particles.ParticleManagerGlobal.
 
 particleMgrEnabled
 
 physicsMgr
 If enableParticles() has been called, this is the physics manager as imported from :mod:direct.showbase.PhysicsManagerGlobal.
 
 physicsMgrAngular
 
 physicsMgrEnabled
 
 pipe
 Contains the :class:~panda3d.core.GraphicsPipe object created by makeDefaultPipe().
 
 pipeList
 The full list of :class:~panda3d.core.GraphicsPipe objects, including any auxiliary pipes.
 
 pixel2d
 This special root, pixel2d, uses units in pixels that are relative to the window.
 
 pixel2dp
 This special root, pixel2dp, uses units in pixels that are relative to the window.
 
 pointerWatcherNodes
 
 recorder
 
 render
 This is the root of the 3-D scene graph.
 
 render2d
 This is the root of the 2-D scene graph.
 
 render2dp
 
 requireWindow
 
 run
 
 sceneGraphAnalyzerMeter
 
 screenshotExtension
 
 sfxActive
 
 sfxManagerIsValidList
 
 sfxManagerList
 
 sfxPlayer
 
 shadowTrav
 
 showVertices
 
 task_mgr
 
 taskMgr
 The global task manager, as imported from .TaskManagerGlobal.
 
 texmem
 
 textureEnabled
 
 timeButtonThrower
 A special ButtonThrower to generate keyboard events and include the time from the OS.
 
 tkDelay
 
 tkRoot
 
 tkRootCreated
 
 trackball
 
 transitions
 .Transitions.Transitions object.
 
 updateManagers
 
 wantDirect
 
 wantFog
 
 wantRender2dp
 
 wantStats
 
 wantTk
 
 wantWx
 
 win
 This is the main, or only window; see winList for a list of all windows.
 
 winControls
 
 windowEvent
 
 windowType
 This is set to the value of the window-type config variable, but may optionally be overridden in the Showbase constructor.
 
 winList
 A list of all windows opened via openWindow().
 
 wireframeEnabled
 
 wxApp
 This is used to store the wx.Application object used when want-wx is set or startWx() is called.
 
 wxAppCreated
 
 wxTimer
 

Additional Inherited Members

- Static Public Attributes inherited from ShowBase
 add_angular_integrator = addAngularIntegrator
 
 add_sfx_manager = addSfxManager
 
 attach_input_device = attachInputDevice
 
 backface_culling_off = backfaceCullingOff
 
 backface_culling_on = backfaceCullingOn
 
 change_mouse_interface = changeMouseInterface
 
 close_window = closeWindow
 
 config = DConfig
 The deprecated .DConfig interface for accessing config variables.
 
 create_stats = createStats
 
 detach_input_device = detachInputDevice
 
 disable_all_audio = disableAllAudio
 
 disable_mouse = disableMouse
 
 disable_particles = disableParticles
 
 enable_all_audio = enableAllAudio
 
 enable_mouse = enableMouse
 
 enable_music = enableMusic
 
 enable_particles = enableParticles
 
 enable_software_mouse_pointer = enableSoftwareMousePointer
 
 enable_sound_effects = enableSoundEffects
 
 get_aspect_ratio = getAspectRatio
 
 get_background_color = getBackgroundColor
 
 get_size = getSize
 
 init_shadow_trav = initShadowTrav
 
 make_all_pipes = makeAllPipes
 
 make_camera = makeCamera
 
 make_camera2d = makeCamera2d
 
 make_camera2dp = makeCamera2dp
 
 make_default_pipe = makeDefaultPipe
 
 make_module_pipe = makeModulePipe
 
 notify = directNotify.newCategory("ShowBase")
 
 oobe_cull = oobeCull
 
 open_default_window = openDefaultWindow
 
 open_main_window = openMainWindow
 
 open_window = openWindow
 
 remove_camera_frustum = removeCameraFrustum
 
 revive_input = reviveInput
 
 save_cube_map = saveCubeMap
 
 save_sphere_map = saveSphereMap
 
 set_aspect_ratio = setAspectRatio
 
 set_background_color = setBackgroundColor
 
 set_frame_rate_meter = setFrameRateMeter
 
 set_mouse_on_node = setMouseOnNode
 
 set_scene_graph_analyzer_meter = setSceneGraphAnalyzerMeter
 
 set_sleep = setSleep
 
 setup_data_graph = setupDataGraph
 
 setup_mouse = setupMouse
 
 setup_mouse_cb = setupMouseCB
 
 setup_render = setupRender
 
 setup_render2d = setupRender2d
 
 setup_render2dp = setupRender2dp
 
 setup_window_controls = setupWindowControls
 
 show_camera_frustum = showCameraFrustum
 
 silence_input = silenceInput
 
 start_direct = startDirect
 
 start_tk = startTk
 
 start_wx = startWx
 
 texture_off = textureOff
 
 texture_on = textureOn
 
 toggle_backface = toggleBackface
 
 toggle_particles = toggleParticles
 
 toggle_show_vertices = toggleShowVertices
 
 toggle_tex_mem = toggleTexMem
 
 toggle_texture = toggleTexture
 
 toggle_wireframe = toggleWireframe
 
 use_drive = useDrive
 
 use_trackball = useTrackball
 
 wireframe_off = wireframeOff
 
 wireframe_on = wireframeOn
 
- 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 inherited from ShowBase
 _doOpenWindow (self, props=None, fbprops=None, pipe=None, gsg=None, host=None, type=None, name=None, size=None, aspectRatio=None, makeCamera=True, keepCamera=False, scene=None, stereo=None, unexposedDraw=None, callbackWindowDict=None)
 
 _movieTask (self, state)
 
- Protected Member Functions inherited from DirectObject
 _addTask (self, task)
 
 _clearTask (self, task)
 
- Protected Attributes inherited from DirectObject
 _taskList
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self)
Opens a window, sets up a 3-D and several 2-D scene graphs, and
everything else needed to render the scene graph to the window.

To prevent a window from being opened, set windowType to the string
'none' (or 'offscreen' to create an offscreen buffer).  If this is not
specified, the default value is taken from the 'window-type'
configuration variable.

This constructor will add various things to the Python builtins scope,
including this instance itself (under the name ``base``).

Reimplemented from ShowBase.

Member Function Documentation

◆ makeCamera()

makeCamera ( self,
win,
sort = 0,
scene = None,
displayRegion = (0, 1, 0, 1),
stereo = None,
aspectRatio = None,
clearDepth = 0,
clearColor = None,
lens = None,
camName = 'cam',
mask = None,
useCamera = None )
Makes a new 3-d camera associated with the indicated window,
and creates a display region in the indicated subrectangle.

If stereo is True, then a stereo camera is created, with a
pair of DisplayRegions.  If stereo is False, then a standard
camera is created.  If stereo is None or omitted, a stereo
camera is created if the window says it can render in stereo.

If useCamera is not None, it is a NodePath to be used as the
camera to apply to the window, rather than creating a new
camera.

:rtype: panda3d.core.NodePath

Reimplemented from ShowBase.

Member Data Documentation

◆ camLL

camLL

◆ camRS

camRS

◆ camUR

camUR