Eidolon
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
SceneObjectRepr Class Reference
Inheritance diagram for SceneObjectRepr:
Inheritance graph
Collaboration diagram for SceneObjectRepr:
Collaboration graph

Public Member Functions

def __init__ (self, parent, reprtype, reprcount, matname='Default')
 
def __getattr__ (self, name)
 
def isInScene (self)
 
def getAABB (self, isTransformed=False, isDerived=True, recalculate=False)
 
def calculateAABB (self)
 
def getLabel (self)
 
def getName (self)
 
def setName (self, name)
 
def getDataset (self)
 
def getMaterialName (self)
 
def setTimestep (self, ts)
 
def getTimestep (self)
 
def getTimestepList (self)
 
def getTimestepRange (self)
 
def getTimestepInterval (self)
 
def getTimestepRepr (self, ts=0)
 
def setParent (self, prepr)
 
def getParent (self)
 
def enumChildren (self, allChildren=False)
 
def addChild (self, child)
 
def removeChild (self, child)
 
def enumSubreprs (self)
 
def enumFigures (self)
 
def enumInternalMaterials (self)
 
def addModifier (self, mod)
 
def removeModifier (self, mod)
 
def getParamDefs (self)
 
def getParam (self, name)
 
def setParam (self, name, value)
 
def setGPUParam (self, name, val, progtype, kwargs)
 
def getRayIntersect (self, ray)
 
def getPropTuples (self)
 
def removeFromScene (self, scene)
 
def applySpectrum (self, spec)
 
def createHandles (self, kwargs)
 
def setMaterialName (self, matname)
 
def setVisible (self, isVisible)
 
def isVisible (self)
 
def setTransparent (self, isTrans)
 
def isTransparent (self)
 
def addToScene (self, scene)
 
def prepareBuffers (self)
 
def update (self, scene)
 
def setPosition (self, pos)
 
def getPosition (self, isDerived=False)
 
def setRotation (self, yaw, pitch, roll)
 
def getRotation (self, isDerived=False)
 
def setScale (self, scale)
 
def getScale (self, isDerived=False)
 
def getTransform (self, isDerived=False)
 
def setTransform (self, trans)
 
def __repr__ (self)
 

Public Attributes

 parent
 
 plugin
 
 name
 
 matname
 
 reprcount
 
 reprtype
 
 aabb
 
 rparent
 
 children
 

Private Member Functions

def _getInteralFigures (self)
 

Private Attributes

 _isVisible
 

Detailed Description

A SceneObjectRepr encapsulates a single method of representing a SceneObject visually in the scene. It contains the
information generated from the SceneObject's data which is sent to the renderer for drawing, and has the facilities
controlling how it appears in the scene such as the use of materials. A representation can be a range of renderable
concepts, such as a point list represented using points or billboards, line lists used to draw the outlines of
figures, triangle meshes for rendering solid objects, texture planes for representing imaging data, and so forth.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  parent,
  reprtype,
  reprcount,
  matname = 'Default' 
)

Member Function Documentation

◆ __getattr__()

def __getattr__ (   self,
  name 
)

◆ __repr__()

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

◆ _getInteralFigures()

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

◆ addChild()

def addChild (   self,
  child 
)
Add a child to the internal children set, should only be called by setParent().

◆ addModifier()

def addModifier (   self,
  mod 
)

◆ addToScene()

def addToScene (   self,
  scene 
)
Initialize the scene data objects and call 'update' to fill in their data.

◆ applySpectrum()

def applySpectrum (   self,
  spec 
)
Replaces the spectrum information for each internal material with that in `spec'.

◆ calculateAABB()

def calculateAABB (   self)
Recalculate the AABB after the data has changed.

◆ createHandles()

def createHandles (   self,
  kwargs 
)
Returns either a single Handle object or a list thereof for this representation. The default code simply calls
the same function of the plugin, which will create one TransformHandle by default. Handles are objects rendered
in the scene which can be manipulated with the mouse in conjunction with the keyboard to perform some operation
or transformation on the associated object (or its components). This method should be called only once per object
otherwise multiple redundant handles are created.

◆ enumChildren()

def enumChildren (   self,
  allChildren = False 
)
Yield every child of this object, descending depth first into the scene node tree if allChildren is true.
Here is the caller graph for this function:

◆ enumFigures()

def enumFigures (   self)
Yield every Figure object which comprises this representation.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ enumInternalMaterials()

def enumInternalMaterials (   self)
Yield every internal material (ie. created by this object) used to define this representation.
Here is the caller graph for this function:

◆ enumSubreprs()

def enumSubreprs (   self)
Yield every internal sub-representation of this object excluding `self', or [`self'] if no internal
representations are used in this type.
Here is the caller graph for this function:

◆ getAABB()

def getAABB (   self,
  isTransformed = False,
  isDerived = True,
  recalculate = False 
)
Returns the untransformed axis-aligned bound box enclosing the geometry of this representation.
Here is the caller graph for this function:

◆ getDataset()

def getDataset (   self)
Returns the Dataset object for this representation, or whatever data object is used.

◆ getLabel()

def getLabel (   self)
Returns the UI label, this may be different from the name and include additional information.
Here is the caller graph for this function:

◆ getMaterialName()

def getMaterialName (   self)
Returns the applied material's name.

◆ getName()

def getName (   self)
Returns the name of this representation.
Here is the caller graph for this function:

◆ getParam()

def getParam (   self,
  name 
)
Get the value of an additional parameter.
Here is the call graph for this function:

◆ getParamDefs()

def getParamDefs (   self)
Get the ParamDef objects describing the additional parameters to this representation.

◆ getParent()

def getParent (   self)
Returns the parent representation object.
Here is the caller graph for this function:

◆ getPosition()

def getPosition (   self,
  isDerived = False 
)
Returns the position vec3 object.

◆ getPropTuples()

def getPropTuples (   self)
Returns a list of name/value pairs listing the properties to display for this scene object in the UI.

◆ getRayIntersect()

def getRayIntersect (   self,
  ray 
)
Return the distance value where `ray' intersects this object, or None if not known or not intersected.

◆ getRotation()

def getRotation (   self,
  isDerived = False 
)
Returns a (yaw,pitch,roll) triple of Euler angles, each angle between -pi and +pi.

◆ getScale()

def getScale (   self,
  isDerived = False 
)
Returns the scale vec3 object.

◆ getTimestep()

def getTimestep (   self)
Get the current timestep position.

◆ getTimestepInterval()

def getTimestepInterval (   self)
Returns the interval between timesteps.
Here is the call graph for this function:

◆ getTimestepList()

def getTimestepList (   self)
Returns the list of timesteps, [0] for non-time-dependent objects.
Here is the caller graph for this function:

◆ getTimestepRange()

def getTimestepRange (   self)
Returns the timestep start and end values.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTimestepRepr()

def getTimestepRepr (   self,
  ts = 0 
)
Returns the subrepresentation at timestep `ts' or nearest if `ts' is non-integer. For non-time-dependent
representations, this instead returns `self'.
Here is the caller graph for this function:

◆ getTransform()

def getTransform (   self,
  isDerived = False 
)
Here is the caller graph for this function:

◆ isInScene()

def isInScene (   self)
Returns true if this representation has been initialized and included into the scene, false otherwise.
Here is the caller graph for this function:

◆ isTransparent()

def isTransparent (   self)
Returns whether the scene data objects have been set to be transparent or not.

◆ isVisible()

def isVisible (   self)
Returns True if the object is in the scene and visible, False otherwise.
Here is the caller graph for this function:

◆ prepareBuffers()

def prepareBuffers (   self)
Fill internal buffers with data before they are sent to the Figure objects in update().

◆ removeChild()

def removeChild (   self,
  child 
)
Remove a child to the internal children set, should only be called by setParent().
Here is the caller graph for this function:

◆ removeFromScene()

def removeFromScene (   self,
  scene 
)
Removes the representation from the scene, but may not destroy scene data (ie. just sets visibility).

◆ removeModifier()

def removeModifier (   self,
  mod 
)

◆ setGPUParam()

def setGPUParam (   self,
  name,
  val,
  progtype,
  kwargs 
)
Sets the GPU program parameter `name' with value `val' for every internal material. The `progtype' value
specifies which program type this is for. The value of `val' must be a vec3, real, int, long, or color.
Here is the call graph for this function:

◆ setMaterialName()

def setMaterialName (   self,
  matname 
)
Sets the material name of the representation's internal components.

◆ setName()

def setName (   self,
  name 
)
Sets the name of the object.

◆ setParam()

def setParam (   self,
  name,
  value 
)
Set the value of an additional parameter.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setParent()

def setParent (   self,
  prepr 
)
Set this object's parent representation to `prepr'. This sets every internal figure to be a child of the
first figure yielded by `prepr.enumFigures()'. This establishes a one-to-many relationship between objects
such that an affine transformation performed on the parent is compounded with that applied to the child. In
effect the child exists and is transformed in the local coordinates of its parent.

If `prepr' is None then this representation will have no parent and its subfigures will be children of the
root scene node only.
Here is the call graph for this function:

◆ setPosition()

def setPosition (   self,
  pos 
)
Sets the vec3 position of the representation.
Here is the caller graph for this function:

◆ setRotation()

def setRotation (   self,
  yaw,
  pitch,
  roll 
)
Sets the rotation in terms of Euler angles.
Here is the caller graph for this function:

◆ setScale()

def setScale (   self,
  scale 
)
Sets the scale in terms of a vec3 object to multiply the nodes of the representation by.
Here is the caller graph for this function:

◆ setTimestep()

def setTimestep (   self,
  ts 
)
Set the current timestep to that which is nearest to `ts'.

◆ setTransform()

def setTransform (   self,
  trans 
)

◆ setTransparent()

def setTransparent (   self,
  isTrans 
)
Sets the transparency properties of the scene data objects, this is necessary to get alpha compositing to
look correct since transparent objects get rendered in a separate queue. This does not actually make the objects
transparent, only allows transparent objects to be rendered correctly.

◆ setVisible()

def setVisible (   self,
  isVisible 
)
Sets the visibility of the representation's geometry in the scene.
Here is the caller graph for this function:

◆ update()

def update (   self,
  scene 
)
Fill or refill the scene data objects with their geometry information. This is called by SceneManager and
probably should never be called by any other client.
Here is the caller graph for this function:

Member Data Documentation

◆ _isVisible

_isVisible
private

◆ aabb

aabb

◆ children

children

◆ matname

matname

◆ name

name

◆ parent

parent

◆ plugin

plugin

◆ reprcount

reprcount

◆ reprtype

reprtype

◆ rparent

rparent

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