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

Public Member Functions

def __init__ (self)
 
def isVisible (self)
 
def setVisible (self, isVisible)
 
def isSelected (self)
 
def setSelected (self, isSelected)
 
def checkSelected (self, selectObj)
 
def isActive (self)
 
def setActive (self, isActive)
 
def addToScene (self, mgr, scene)
 
def removeFromScene (self, mgr, scene)
 
def mousePress (self, camera, e)
 
def mouseRelease (self, e)
 
def mouseMove (self, e)
 
def mouseDrag (self, e, dragvec)
 
def getPosition (self)
 
def setPosition (self, pos)
 
def setScale (self, scale)
 
def setRotation (self, yaw, pitch, roll)
 

Public Attributes

 figs
 

Static Public Attributes

 handleMatName
 

Static Private Member Functions

def _defaultMaterial (mgr)
 

Private Attributes

 _isVisible
 

Detailed Description

Base class for handles, which are UI elements in the render window or 2D windows used to manipulate scene objects
or represent some other form of data (ig. points of interest, clip boxes). A handle has 3 different state values:
 - isVisible()  -- True iff the handle is visible on screen, manipulable subcomponents may not be visible
 - isActive()   -- True iff the handle can be manipulated/selected and all its subcomponents are visible
 - isSelected() -- True iff the handle has been selected by mouse click and is being manipulated
    
A handle can only be selected if its visible. Clicking on an inactive handle makes it both selected and active. The
checks to determine if it's been selected are done with checkSelected(). A handle can be active and not selected if
it was previously selected but then checkSelected() subsequently returned False. In this case the subcomponents are 
visible but the user is not current interacting with the handle. If the handle is selected then the mouse has been 
clicked on the handle and held down, so the handle will only then receive mouse inputs. A handle can be invisible 
but active, meaning the subcomponents will still be visible once the handle becomes visible again.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Member Function Documentation

◆ _defaultMaterial()

def _defaultMaterial (   mgr)
staticprivate

◆ addToScene()

def addToScene (   self,
  mgr,
  scene 
)

◆ checkSelected()

def checkSelected (   self,
  selectObj 
)
Check whether this object is selected given the input `selectObj'. The input will vary depending on context,
for a handle selected from a 3D window this should be a Ray and so the handle should do a ray intersection
test. For a 2D handle this may be the screen coordinates. In any case the object should be fresh and retainable
by the handle. This method should return True if the selection criteria is met, and isSelected() should then 
return the same until checkSelected() is called again. This method should return False if isVisible() is False. 
If it returns True it should also make the handle active.

◆ getPosition()

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

◆ isActive()

def isActive (   self)
Returns True if this handle is active.
Here is the caller graph for this function:

◆ isSelected()

def isSelected (   self)
Returns True if this handle is selected as determined by checkSelected().
Here is the caller graph for this function:

◆ isVisible()

def isVisible (   self)
Returns True if the handle is visible.
Here is the caller graph for this function:

◆ mouseDrag()

def mouseDrag (   self,
  e,
  dragvec 
)
Called by mouseMove() when the mouse is dragged by a distance of `dragvec' screen coordinates.
Here is the caller graph for this function:

◆ mouseMove()

def mouseMove (   self,
  e 
)

◆ mousePress()

def mousePress (   self,
  camera,
  e 
)
Here is the caller graph for this function:

◆ mouseRelease()

def mouseRelease (   self,
  e 
)
Here is the caller graph for this function:

◆ removeFromScene()

def removeFromScene (   self,
  mgr,
  scene 
)
Remove the handle from the scene, this makes the figures invisible and clears self.figs.

◆ setActive()

def setActive (   self,
  isActive 
)
Set the active state of the handle. The handle can still be inactive if visible, but cannot be manipulated.
Here is the caller graph for this function:

◆ setPosition()

def setPosition (   self,
  pos 
)
Here is the caller graph for this function:

◆ setRotation()

def setRotation (   self,
  yaw,
  pitch,
  roll 
)
Here is the caller graph for this function:

◆ setScale()

def setScale (   self,
  scale 
)
Here is the caller graph for this function:

◆ setSelected()

def setSelected (   self,
  isSelected 
)
Set the selection state of the handle.

◆ setVisible()

def setVisible (   self,
  isVisible 
)
Set the visibility of the handle. The handle can still be active if invisible, but cannot be manipulated.
Here is the caller graph for this function:

Member Data Documentation

◆ _isVisible

_isVisible
private

◆ figs

figs

◆ handleMatName

handleMatName
static

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