Eidolon
|
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 | |
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.
def __init__ | ( | self | ) |
|
staticprivate |
def addToScene | ( | self, | |
mgr, | |||
scene | |||
) |
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.
def getPosition | ( | self | ) |
def isActive | ( | self | ) |
Returns True if this handle is active.
def isSelected | ( | self | ) |
Returns True if this handle is selected as determined by checkSelected().
def isVisible | ( | self | ) |
Returns True if the handle is visible.
def mouseDrag | ( | self, | |
e, | |||
dragvec | |||
) |
Called by mouseMove() when the mouse is dragged by a distance of `dragvec' screen coordinates.
def mouseMove | ( | self, | |
e | |||
) |
def mousePress | ( | self, | |
camera, | |||
e | |||
) |
def mouseRelease | ( | self, | |
e | |||
) |
def removeFromScene | ( | self, | |
mgr, | |||
scene | |||
) |
Remove the handle from the scene, this makes the figures invisible and clears self.figs.
def setActive | ( | self, | |
isActive | |||
) |
Set the active state of the handle. The handle can still be inactive if visible, but cannot be manipulated.
def setPosition | ( | self, | |
pos | |||
) |
def setRotation | ( | self, | |
yaw, | |||
pitch, | |||
roll | |||
) |
def setScale | ( | self, | |
scale | |||
) |
def setSelected | ( | self, | |
isSelected | |||
) |
Set the selection state of the handle.
def setVisible | ( | self, | |
isVisible | |||
) |
Set the visibility of the handle. The handle can still be active if invisible, but cannot be manipulated.
|
private |
figs |
|
static |