Eidolon
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
SceneManager Class Reference

Inherits TaskQueue.

Collaboration diagram for SceneManager:
Collaboration graph

Public Member Functions

def __init__ (self, win, conf)
 
def taskExcept (self, ex, msg, title)
 
def getCurrentTask (self)
 
def runTasks (self, tasks, resFuture=None, isSequential=False)
 
def execScriptsTask (self, scripts)
 
def loadFilesTask (self, files)
 
def execBatchProgramTask (self, exefile, exeargs, kwargs)
 
def setTaskStatus (self, msgOrTask, progress=0, progressmax=0)
 
def getPlugin (self, name)
 
def getPluginNames (self)
 
def addRuntimePlugin (self, plug)
 
def createProjectObj (self, name, rootdir, projconst)
 
def deleteProjectObj (self)
 
def execScript (self, filename, updateLocals=True, tryHard=False)
 
def execLastScript (self)
 
def getUserAppDir (self)
 
def getUserAppFile (self, filename)
 
def getUserTempDir (self, dirname)
 
def quit (self)
 
def callThreadSafe (self, func, args, kwargs)
 
def proxyThreadSafe (self, func)
 
def checkFutureResult (self, future)
 
def logMsg (self, msgs, kwargs)
 
def logError (self, msgs, kwargs)
 
def showExcept (self, ex, msg='', title='Exception Caught', format_exc=None)
 
def showMsg (self, msg, title='Message', text=None, doLog=True, width=600, height=300)
 
def showTextBox (self, msg, title, text, width=600, height=300)
 
def showStatusBarMsg (self, msg, timeout=1000)
 
def showTimeDialog (self, doShow=None, timestepMin=None, timestepMax=None, timestepSpan=None)
 
def isTimeDialogShown (self)
 
def create2DView (self, name=None, constr=Camera2DView)
 
def createDockWidget (self, constr, title, w=200, h=200)
 
def setTimestep (self, ts)
 
def incTimestep (self)
 
def decTimestep (self)
 
def setTimeFPS (self, fps)
 
def setTimeStepsPerSec (self, sps)
 
def play (self)
 
def stop (self)
 
def addEventHandler (self, name, cb, isPriority=False, isPostEvent=False)
 
def removeEventHandler (self, cb)
 
def createCamera (self, name=None, isSecondary=False)
 
def removeCamera (self, camera)
 
def setSingleFreeCamera (self)
 
def setCameraController (self, controller)
 
def setCameraOrtho (self, ortho)
 
def setCameraWire (self, wire)
 
def setCameraZLocked (self, zlock)
 
def setCameraConfig (self, fov=None, nearclip=None, farclip=None)
 
def setCameraSeeAll (self)
 
def resetCamera (self)
 
def setAmbientLight (self, col)
 
def setBackgroundColor (self, col)
 
def setAxesType (self, axestype)
 
def setCenterType (self, centertype)
 
def saveScreenshot (self, filename, camera_or_widget=None, width=0, height=0, stereoOffset=0, tformat=TF_RGB24)
 
def saveTimestepScreenshots (self, fileprefix, stepvalue=1.0, start=0.0, end=None, camera_or_widget=None, width=0, height=0, extension='.png', stereoOffset=0, tformat=TF_RGB24)
 
def getSceneCode (self)
 
def repaint (self, renderHighQual=True)
 
def setAlwaysHighQual (self, val)
 
def addSceneObject (self, obj, category=None)
 
def addSceneObjectTask (self, obj, category=None)
 
def addSceneObjectRepr (self, rep)
 
def enumSceneObjects (self)
 
def enumSceneObjectReprs (self)
 
def enumAllObjects (self)
 
def findObject (self, name_or_fn)
 
def getUniqueObjName (self, name, spacer='_')
 
def getSceneAABB (self)
 
def updateSceneObjectRepr (self, rep, task=None)
 
def renameSceneObject (self, obj, newname)
 
def showBoundBox (self, rep, doShow=True, matname='BoundBoxes')
 
def isBoundBoxShown (self, rep)
 
def showHandle (self, rep, doShow=True)
 
def isHandleShown (self, rep)
 
def removeHandle (self, rep)
 
def setReprProps (self, rep, props)
 
def removeSceneObject (self, obj)
 
def removeSceneObjectRepr (self, rep)
 
def clearScene (self)
 
def loadTextureFile (self, filename)
 
def createTexture (self, name, width, height, depth, format)
 
def getTexture (self, name, isFilename=False)
 
def listTextureNames (self)
 
def removeTexture (self, texture)
 
def createLight (self, lighttype, name=None, position=vec3(), direction=vec3(1, 0, 0))
 
def removeLight (self, light)
 
def getLight (self, name)
 
def loadGPUScriptFile (self, filename, progtype, name=None, profiles=None, lang=None, entry=None, ignoreError=False)
 
def createGPUProgram (self, name, progtype, src=None, profiles=None, lang=None, entry=None)
 
def listGPUProgramNames (self, progtype=None)
 
def getGPUProgram (self, name)
 
def createMaterial (self, matname)
 
def getMaterial (self, matname)
 
def listMaterialNames (self)
 
def removeMaterial (self, mat)
 
def applyMaterial (self, mat)
 
def cloneMaterial (self, mat, name=None)
 
def createSpectrum (self, specname)
 
def getSpectrum (self, specname)
 
def listSpectrumNames (self)
 
def cloneSpectrum (self, spec, name=None)
 
def removeSpectrum (self, spec)
 

Public Attributes

 win
 
 conf
 
 scene
 
 evtHandler
 
 project
 
 controller
 
 singleController
 
 multiController
 
 cameras
 
 objs
 
 specs
 
 mats
 
 textures
 
 lights
 
 programs
 
 ambientColor
 
 backgroundColor
 
 bbmap
 
 handlemap
 
 taskthread
 
 updatethread
 
 matcontrol
 
 lightcontrol
 
 progcontrol
 
 timestep
 
 timestepMin
 
 timestepMax
 
 timestepSpan
 
 timeFPS
 
 timeStepsPerSec
 
 playerEvent
 
 player
 
 scriptlocals
 
 lastScript
 
 meshplugin
 
 imageplugin
 

Static Public Attributes

 mgrName
 

Private Member Functions

def _windowConnect (self)
 
def _updateUI (self)
 
def _updateManagedObjects (self)
 
def _mousePressHandleCheck (self, e)
 
def _mouseMoveHandleCheck (self, e)
 
def _mouseReleaseHandleCheck (self, e)
 
def _keyPressEvent (self, e)
 
def _processTasks (self)
 
def _playerThread (self)
 
def _repaintEvent (self, _)
 
def _triggerEvent (self, name, args)
 
def _repaintHighQual (self)
 
def _collect (self)
 
def _newProjectButton (self)
 
def _newSpectrumButton (self)
 
def _newMaterialButton (self)
 
def _newLightButton (self)
 
def _removeObjectButton (self)
 
def _renameObjectButton (self)
 
def _clearSceneButton (self)
 
def _cloneAssetButton (self)
 
def _removeAssetButton (self)
 
def _openProjectButton (self)
 
def _openScriptButton (self)
 
def _rerunScriptButton (self)
 
def _saveProjectButton (self)
 
def _saveScriptButton (self)
 
def _loadTextureButton (self)
 
def _loadGPUScriptButton (self)
 
def _saveScreenshotAction (self)
 

Detailed Description

The manager object for scene objects, assets, and UI. It represents the link between the UI and the scene itself,
containing the code to change the scene as directed by interaction with the UI, ie. part of the controller part of 
MVC. Most of the functionality for performing operatiosn and calculating data is defined in plugins and controller
objects instead which   include both UI and algorithm code. The purpose of the SceneManager is to be the central 
point of interaction with the system without becoming a god object by including too much functionality. It also
manages the task thread and the playing of time-dependent data.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  win,
  conf 
)

Member Function Documentation

◆ _clearSceneButton()

def _clearSceneButton (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _cloneAssetButton()

def _cloneAssetButton (   self)
private
Clones the selected asset.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _collect()

def _collect (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _keyPressEvent()

def _keyPressEvent (   self,
  e 
)
private
Keypress event handler for the render widget.
Here is the call graph for this function:

◆ _loadGPUScriptButton()

def _loadGPUScriptButton (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _loadTextureButton()

def _loadTextureButton (   self)
private
Brings up the file choose dialog and then loads a texture.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _mouseMoveHandleCheck()

def _mouseMoveHandleCheck (   self,
  e 
)
private
Checks if a handle has been clicked on, sending it the event and returning true if so. This assumes this
function is the first event handler for moves.
Here is the call graph for this function:

◆ _mousePressHandleCheck()

def _mousePressHandleCheck (   self,
  e 
)
private
Checks if a mouse click is on a handle, if so send the event to the handle and return true so no other
events are processed. This assumes this function is the first event handler for clicks.
Here is the call graph for this function:

◆ _mouseReleaseHandleCheck()

def _mouseReleaseHandleCheck (   self,
  e 
)
private
Here is the call graph for this function:

◆ _newLightButton()

def _newLightButton (   self)
private
Opens the UI dialog to choose a new light name, and then creates a new light.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _newMaterialButton()

def _newMaterialButton (   self)
private
Opens the UI dialog to choose a new material name, and then creates a new material.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _newProjectButton()

def _newProjectButton (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _newSpectrumButton()

def _newSpectrumButton (   self)
private
Opens the UI dialog to choose a new spectrum name, and then creates a new spectrum.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _openProjectButton()

def _openProjectButton (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _openScriptButton()

def _openScriptButton (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _playerThread()

def _playerThread (   self)
private
Thread implementing timestep animation, this must be executed in a daemon thread.
Here is the call graph for this function:

◆ _processTasks()

def _processTasks (   self)
private
Takes tasks from the queue and runs them. This is executed in a separate daemon thread and should not be called.
Here is the call graph for this function:

◆ _removeAssetButton()

def _removeAssetButton (   self)
private
Removes the selected asset.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _removeObjectButton()

def _removeObjectButton (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _renameObjectButton()

def _renameObjectButton (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _repaintEvent()

def _repaintEvent (   self,
  _ 
)
private
Here is the call graph for this function:

◆ _repaintHighQual()

def _repaintHighQual (   self)
private
Here is the call graph for this function:

◆ _rerunScriptButton()

def _rerunScriptButton (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _saveProjectButton()

def _saveProjectButton (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _saveScreenshotAction()

def _saveScreenshotAction (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _saveScriptButton()

def _saveScriptButton (   self)
private
Here is the caller graph for this function:

◆ _triggerEvent()

def _triggerEvent (   self,
  name,
  args 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _updateManagedObjects()

def _updateManagedObjects (   self)
private
Executed before each redraw, this is used to set scene objects/figures that are managed by this object.
Here is the caller graph for this function:

◆ _updateUI()

def _updateUI (   self)
private
Here is the call graph for this function:

◆ _windowConnect()

def _windowConnect (   self)
private
Initializes all the UI control code, mostly connecting slots with action functions.

◆ addEventHandler()

def addEventHandler (   self,
  name,
  cb,
  isPriority = False,
  isPostEvent = False 
)
Here is the caller graph for this function:

◆ addRuntimePlugin()

def addRuntimePlugin (   self,
  plug 
)
Add a plugin to the system at runtime. Typically plugins are loaded at load time and their init() method just 
after the SceneManager is created. This method is used to load plugins which can be initialized at a later time.
Here is the call graph for this function:

◆ addSceneObject()

def addSceneObject (   self,
  obj,
  category = None 
)
Adds the SceneObject instance to the scene. If `obj' has no plugin, the appropriate default is assigned. If
the name of `obj' is not unique, it will be changed to a unique name by suffixing a number. (`category' not used).
The `obj' value can be either a SceneObject or a Future which eventually contains one.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addSceneObjectRepr()

def addSceneObjectRepr (   self,
  rep 
)
Adds the SceneObjectRepr instance to the scene.
Here is the call graph for this function:

◆ addSceneObjectTask()

def addSceneObjectTask (   self,
  obj,
  category = None 
)
Adds a task to the task queue which adds `obj' to the scene.
Here is the call graph for this function:

◆ applyMaterial()

def applyMaterial (   self,
  mat 
)
Applies the given material to any representation that uses it by invoking applyMaterial() on each.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ callThreadSafe()

def callThreadSafe (   self,
  func,
  args,
  kwargs 
)
Forces 'func' to be called by the main/UI thread, which is necessary for many graphics operations. The values
'args' and 'kwargs' are used as the arguments, and the return value of the function is returned when the
main thread has completed the call. If there is no window then the function is called directly in this thread.
This blocks until the call completes, and is both thread-safe and thread-reentrant if there is a UI window.
Here is the caller graph for this function:

◆ checkFutureResult()

def checkFutureResult (   self,
  future 
)
Enqueues a task to check the resulting value in Future `future', showing an exception if one is raised.
Here is the call graph for this function:

◆ clearScene()

def clearScene (   self)
Removes any Project and all SceneObject objects from the scene.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cloneMaterial()

def cloneMaterial (   self,
  mat,
  name = None 
)
Creates a new material with all the properties of the given material 'mat'. The new material's name is 'name'
or a generated one if 'name' is None. The argument 'mat' may be a material object or a material's name.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cloneSpectrum()

def cloneSpectrum (   self,
  spec,
  name = None 
)
Creates a new spectrum from `spec' (either name or Spectrum object). The new spectrum's name is `name'
or a generated one if `name' is None.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ create2DView()

def create2DView (   self,
  name = None,
  constr = Camera2DView 
)
Create a 2D view, add it to a dock in the main window, and return the dock object. This expects `constr' to be a
callable accepting self and a newly created Camera object, and returning the 2D view object. By default this is
Camera2DView so without modification this method creates a generic 2D view, the expectation is that `constr' can
be set to a subtype of Camera2DView although any widget subtype with the expected signature would work. 
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createCamera()

def createCamera (   self,
  name = None,
  isSecondary = False 
)
Here is the caller graph for this function:

◆ createDockWidget()

def createDockWidget (   self,
  constr,
  title,
  w = 200,
  h = 200 
)
Create a widget and add it to a dock widget in the main window, returning the dock object. This expects `constr'
to be callable with no arguments and return the widget object to add to the dock, it will be called in the main
thread. If self.win is None then this method instead does nothing.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createGPUProgram()

def createGPUProgram (   self,
  name,
  progtype,
  src = None,
  profiles = None,
  lang = None,
  entry = None 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createLight()

def createLight (   self,
  lighttype,
  name = None,
  position = vec3(),
  direction = vec3(1,0,0) 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createMaterial()

def createMaterial (   self,
  matname 
)
Creates a new material with the given name, which will be made unique amongst material names.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createProjectObj()

def createProjectObj (   self,
  name,
  rootdir,
  projconst 
)
Creates a new Project object, saving the old one if it existed. The new project object is created by calling
`projconst' with `name', `rootdir', and self as the arguments. This callable is expected to be a constructor
that returns a Project type.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createSpectrum()

def createSpectrum (   self,
  specname 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createTexture()

def createTexture (   self,
  name,
  width,
  height,
  depth,
  format 
)
Here is the call graph for this function:

◆ decTimestep()

def decTimestep (   self)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteProjectObj()

def deleteProjectObj (   self)
Here is the caller graph for this function:

◆ enumAllObjects()

def enumAllObjects (   self)
Yields a SceneObject followed by each of its representations, then the same for every subsequent SceneObject.
Here is the caller graph for this function:

◆ enumSceneObjectReprs()

def enumSceneObjectReprs (   self)
Yields each SceneObjectRepr present in the scene.
Here is the caller graph for this function:

◆ enumSceneObjects()

def enumSceneObjects (   self)
Yields each SceneObject added to the scene.
Here is the caller graph for this function:

◆ execBatchProgramTask()

def execBatchProgramTask (   self,
  exefile,
  exeargs,
  kwargs 
)
Executes the program `exefile' with the string arguments `exeargs'. This is done in a task so the result
is a Future object which will contain a (returncode,output) pair if the program is run successfully, or an
exception otherwise. The integer return code is taken from the program, in the usual case 0 indicating a
correct execution and any other value indicating failure, and the output is a string of the merged stdout
and stderr text. If the program requires input it will deadlock, this is a batch operation routine only. A
keyword value `timeout' can be given indicating how long to wait for the program in seconds before killing
it, otherwise the task will wait forever.
Here is the call graph for this function:

◆ execLastScript()

def execLastScript (   self)
Rerun the last script executed with the arguments passed to execScript().
Here is the call graph for this function:
Here is the caller graph for this function:

◆ execScript()

def execScript (   self,
  filename,
  updateLocals = True,
  tryHard = False 
)
Executes the given script file using internal environment, updates local/console variables if `updateLocals'.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ execScriptsTask()

def execScriptsTask (   self,
  scripts 
)
Enqueues a task which will execute the given script files in sequence when run. If a directory is present in
`scripts' containing a .py file of the same, the file is assumed to be a project script and is run instead.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ findObject()

def findObject (   self,
  name_or_fn 
)
Finds an object with the given name or which matches the given selector function.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCurrentTask()

def getCurrentTask (   self)
Returns the current Task object if called within the task execution thread, None otherwise.
Here is the caller graph for this function:

◆ getGPUProgram()

def getGPUProgram (   self,
  name 
)
Here is the call graph for this function:

◆ getLight()

def getLight (   self,
  name 
)
Here is the call graph for this function:

◆ getMaterial()

def getMaterial (   self,
  matname 
)
Returns the material object with the given, or None if not found.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPlugin()

def getPlugin (   self,
  name 
)
Returns the named plugin if found, None otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPluginNames()

def getPluginNames (   self)
Returns the names of loaded plugins.

◆ getSceneAABB()

def getSceneAABB (   self)
Returns the AABB containing all visible repr objects.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSceneCode()

def getSceneCode (   self)
Returns the code representation of the current scene as can be constructed by plugins.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSpectrum()

def getSpectrum (   self,
  specname 
)
Returns the spectrum object with the given, or None if not found.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTexture()

def getTexture (   self,
  name,
  isFilename = False 
)
Returns the first texture found with the given name, or filename if 'isFilename' is true. If no texture
is found, returns None.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getUniqueObjName()

def getUniqueObjName (   self,
  name,
  spacer = '_' 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getUserAppDir()

def getUserAppDir (   self)
Returns the per-user application directory as defined by ConfVars.userappdir in the config object.
Here is the caller graph for this function:

◆ getUserAppFile()

def getUserAppFile (   self,
  filename 
)
Returns the path to a file named `filename' in the per-user application directory. This file may not exist.
Here is the call graph for this function:

◆ getUserTempDir()

def getUserTempDir (   self,
  dirname 
)
Create a temporary directory (deleted on exit) in the per-user application directory and return its path.
Here is the call graph for this function:

◆ incTimestep()

def incTimestep (   self)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isBoundBoxShown()

def isBoundBoxShown (   self,
  rep 
)
Returns true if the bound box for 'rep' is visible.

◆ isHandleShown()

def isHandleShown (   self,
  rep 
)

◆ isTimeDialogShown()

def isTimeDialogShown (   self)
Returns True if the time dialog box is visible.

◆ listGPUProgramNames()

def listGPUProgramNames (   self,
  progtype = None 
)
Here is the caller graph for this function:

◆ listMaterialNames()

def listMaterialNames (   self)
Returns a list of all material names.
Here is the caller graph for this function:

◆ listSpectrumNames()

def listSpectrumNames (   self)
Returns a list of all material names.
Here is the caller graph for this function:

◆ listTextureNames()

def listTextureNames (   self)
Returns a list of all texture names.
Here is the caller graph for this function:

◆ loadFilesTask()

def loadFilesTask (   self,
  files 
)
Loads the given data files, script files, or directories. Each file in `files' is loaded in the order given.
If the file is a Python script, this is executed. If a project directory (ie. a directory containing a Python
script with the same name) the contained script file is executed. For any other file, the first plugin whose
acceptFile() method returns true is tasked to load the file through its loadObject() method.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadGPUScriptFile()

def loadGPUScriptFile (   self,
  filename,
  progtype,
  name = None,
  profiles = None,
  lang = None,
  entry = None,
  ignoreError = False 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadTextureFile()

def loadTextureFile (   self,
  filename 
)
Loads the given texture file and adds it to the asset list in the UI.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logError()

def logError (   self,
  msgs,
  kwargs 
)
Writes a log entry composed of the string representations of the members of 'msgs' as well as to stderr.
If 'nl' is present in 'kwargs' and is False, no newline appears at the end of the stderr write.
Here is the caller graph for this function:

◆ logMsg()

def logMsg (   self,
  msgs,
  kwargs 
)
Writes a log entry composed of the string representations of the members of 'msgs' as well as to stdout.
If 'nl' is present in 'kwargs' and is False, no newline appears at the end of the stdout write.
Here is the caller graph for this function:

◆ play()

def play (   self)
Play timestepping animation, do nothing if the steps/s is too large or frames/s is too small.
Here is the caller graph for this function:

◆ proxyThreadSafe()

def proxyThreadSafe (   self,
  func 
)
Returns a proxy function which calls `func' in the main thread when invoked. This method can be a decorator.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ quit()

def quit (   self)
Quit the program after all tasks have completed. Ensures thread-safety with the UI thread.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeCamera()

def removeCamera (   self,
  camera 
)

◆ removeEventHandler()

def removeEventHandler (   self,
  cb 
)
Here is the caller graph for this function:

◆ removeHandle()

def removeHandle (   self,
  rep 
)
Remove and delete the handle(s) for representation `rep'.

◆ removeLight()

def removeLight (   self,
  light 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeMaterial()

def removeMaterial (   self,
  mat 
)
Removes the material object from the scene and UI.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeSceneObject()

def removeSceneObject (   self,
  obj 
)
Removes the SceneObject instance an its representations from the scene.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeSceneObjectRepr()

def removeSceneObjectRepr (   self,
  rep 
)
Removes the SceneObjectRepr instance from the scene.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeSpectrum()

def removeSpectrum (   self,
  spec 
)
Here is the caller graph for this function:

◆ removeTexture()

def removeTexture (   self,
  texture 
)
Removes the given texture object from the scene and UI.
Here is the caller graph for this function:

◆ renameSceneObject()

def renameSceneObject (   self,
  obj,
  newname 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ repaint()

def repaint (   self,
  renderHighQual = True 
)
Forces the scene to redraw. if `renderHighQual' is true a high quality render is done.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetCamera()

def resetCamera (   self)
Resets the camera's rotational values but does not move its look-at position.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ runTasks()

def runTasks (   self,
  tasks,
  resFuture = None,
  isSequential = False 
)
Executes the given list of tasks if `isSequential' or if the call was made in the task execution thread. When
all the tasks have been executed, the Future object 'resFuture' is queried for its value, which is returned.
If neither condition is true the tasks are added to the task queue instead and `resFuture' is returned. The
argument `resFuture' is expected to be a Future object which the tasks will provide an object for, or None.
This allows functions to add multiple tasks to the queue and then return a Future object, as well as permit
tasks to call such functions and execute tasks immediately and thus avoid deadlock. 
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveScreenshot()

def saveScreenshot (   self,
  filename,
  camera_or_widget = None,
  width = 0,
  height = 0,
  stereoOffset = 0,
  tformat = TF_RGB24 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveTimestepScreenshots()

def saveTimestepScreenshots (   self,
  fileprefix,
  stepvalue = 1.0,
  start = 0.0,
  end = None,
  camera_or_widget = None,
  width = 0,
  height = 0,
  extension = '.png',
  stereoOffset = 0,
  tformat = TF_RGB24 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAlwaysHighQual()

def setAlwaysHighQual (   self,
  val 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAmbientLight()

def setAmbientLight (   self,
  col 
)
Sets the scene's ambient light value.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAxesType()

def setAxesType (   self,
  axestype 
)
Sets the axes type and handles finalizing the necessary figures.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setBackgroundColor()

def setBackgroundColor (   self,
  col 
)
Sets the scene's background color value by calling setBGColor() on all primary cameras.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCameraConfig()

def setCameraConfig (   self,
  fov = None,
  nearclip = None,
  farclip = None 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCameraController()

def setCameraController (   self,
  controller 
)
Sets the current camera controller to the given one, setting up cameras as needed must be done elsewhere.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCameraOrtho()

def setCameraOrtho (   self,
  ortho 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCameraSeeAll()

def setCameraSeeAll (   self)
Tells the current controller to reposition itself to see every visible object in the scene.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCameraWire()

def setCameraWire (   self,
  wire 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCameraZLocked()

def setCameraZLocked (   self,
  zlock 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCenterType()

def setCenterType (   self,
  centertype 
)
Sets the center indicator type and handles finalizing the necessary figures.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setReprProps()

def setReprProps (   self,
  rep,
  props 
)
Sets various properties of `rep' in a thread-safe way. If `parent' is present, set `rep' to have this object
as its parent. If `trans' is present, set `rep' to have this transform. The purpose of this method is to
provide a convenient thread-safe way of setting these properties, specifically in auto-generated scripts.
Here is the call graph for this function:

◆ setSingleFreeCamera()

def setSingleFreeCamera (   self)
Creates main camera if none exist, creates a AxesCameraController object which is assed to self.controller and
self.singleController, and is then returned. This object is used to control the main camera as the single view.
Here is the call graph for this function:

◆ setTaskStatus()

def setTaskStatus (   self,
  msgOrTask,
  progress = 0,
  progressmax = 0 
)
Sets the task status bar of the window if present, otherwise does nothing.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTimeFPS()

def setTimeFPS (   self,
  fps 
)
Here is the caller graph for this function:

◆ setTimestep()

def setTimestep (   self,
  ts 
)
Set the timestep `ts' for every representation clamped within the range [self.timestepMin,self.timestepMax].
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTimeStepsPerSec()

def setTimeStepsPerSec (   self,
  sps 
)
Here is the caller graph for this function:

◆ showBoundBox()

def showBoundBox (   self,
  rep,
  doShow = True,
  matname = 'BoundBoxes' 
)
Controls the drawing of bound boxes of representations. Given the representation object 'rep', a box using
the given material is show if 'doShow' is true, if 'doShow' is false an existing boundbox is hidden or
nothing is done if one wasn't already visible. This method is thread-safe
Here is the call graph for this function:

◆ showExcept()

def showExcept (   self,
  ex,
  msg = '',
  title = 'Exception Caught',
  format_exc = None 
)
Shows the given exception and writes information to the log file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showHandle()

def showHandle (   self,
  rep,
  doShow = True 
)
Show or hide the control handle(s) for the representation `rep'. There may be just the one transform handle
or multiple point handles (or other custom types) so this routine will show or hide all at once. This method
is thread-safe.
Here is the call graph for this function:

◆ showMsg()

def showMsg (   self,
  msg,
  title = 'Message',
  text = None,
  doLog = True,
  width = 600,
  height = 300 
)
Shows the given message in a message window if the UI is present, and writes it to the log file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showStatusBarMsg()

def showStatusBarMsg (   self,
  msg,
  timeout = 1000 
)
Set the status bar message to `msg' with a timeout in milliseconds before it disappears.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showTextBox()

def showTextBox (   self,
  msg,
  title,
  text,
  width = 600,
  height = 300 
)
Shows the given `text' string in a large textbox widget in a window, this is intended for large text blocks.
Here is the caller graph for this function:

◆ showTimeDialog()

def showTimeDialog (   self,
  doShow = None,
  timestepMin = None,
  timestepMax = None,
  timestepSpan = None 
)
Set the time dialog visibility and settings. If 'doShow' is None then a check is made to see if there are
time-dependent representations. If 'doShow' is a boolean value, then visibility is set to that value. This
also sets the `timestepMin' and `timestepMax' member.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

def stop (   self)
Stop animation.
Here is the caller graph for this function:

◆ taskExcept()

def taskExcept (   self,
  ex,
  msg,
  title 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSceneObjectRepr()

def updateSceneObjectRepr (   self,
  rep,
  task = None 
)
Causes the SceneObjectRepr object to update its data through prepareBuffers() and update(). Updating occurs in
a task which first calls rep.prepareBuffers() in its thread expecting `rep' to setup all data to be loaded into
figures, then rep.update() is called in the main thread where `rep' is expected to create figures and load them 
with data. Once this is done the UI refreshes itself, the scene redraws, and the objectUpdated event is sent.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ambientColor

ambientColor

◆ backgroundColor

backgroundColor

◆ bbmap

bbmap

◆ cameras

cameras

◆ conf

conf

◆ controller

controller

◆ evtHandler

evtHandler

◆ handlemap

handlemap

◆ imageplugin

imageplugin

◆ lastScript

lastScript

◆ lightcontrol

lightcontrol

◆ lights

lights

◆ matcontrol

matcontrol

◆ mats

mats

◆ meshplugin

meshplugin

◆ mgrName

mgrName
static

◆ multiController

multiController

◆ objs

objs

◆ player

player

◆ playerEvent

playerEvent

◆ progcontrol

progcontrol

◆ programs

programs

◆ project

project

◆ scene

scene

◆ scriptlocals

scriptlocals

◆ singleController

singleController

◆ specs

specs

◆ taskthread

taskthread

◆ textures

textures

◆ timeFPS

timeFPS

◆ timestep

timestep

◆ timestepMax

timestepMax

◆ timestepMin

timestepMin

◆ timestepSpan

timestepSpan

◆ timeStepsPerSec

timeStepsPerSec

◆ updatethread

updatethread

◆ win

win

The documentation for this class was generated from the following file: