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

Public Member Functions

def __init__ (self)
 
def isSelected (self)
 
def checkMeshIntersect (self, ray, nodes, tris)
 
def mousePress (self, camera, e)
 
def mouseRelease (self, e)
 
def mouseMove (self, e)
 
def getCameraRay (self, x=None, y=None)
 
def getCameraDirection (self)
 
def getDragDistance (self, axis, dragvec, startpos, isPerpendicular=False)
 
def setPosition (self, pos)
 
def setScale (self, scale)
 
def setRotation (self, yaw, pitch, roll)
 
- Public Member Functions inherited from Handle
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

 figscale
 
 prevX
 
 prevY
 
 buttons
 
 pressedCamera
 
 lastIntersect
 
- Public Attributes inherited from Handle
 figs
 

Additional Inherited Members

- Static Public Attributes inherited from Handle
 handleMatName
 

Detailed Description

This represents a manipulable handle in the 3D view only. It represents an object the user can interact with using
the mouse rather than the indicator for a manipulable object in another view.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Member Function Documentation

◆ checkMeshIntersect()

def checkMeshIntersect (   self,
  ray,
  nodes,
  tris 
)
Returns the (index,result) pair if `ray' intersects `tris' through the triangle at that index with `node's as
the list of vertices. Returns (-1,None) if no intersect.
Here is the caller graph for this function:

◆ getCameraDirection()

def getCameraDirection (   self)
Get the direction vector of the camera selecting this handle, or +Z if not selected.
Here is the call graph for this function:

◆ getCameraRay()

def getCameraRay (   self,
  x = None,
  y = None 
)
Get the ray originating from the previous mouse position, or (x,y) if provided, on the camera selecting this
handle. If not selected, None is returned.

◆ getDragDistance()

def getDragDistance (   self,
  axis,
  dragvec,
  startpos,
  isPerpendicular = False 
)
Calculates the distance a mouse drag represents in relation to a given axis. The drag is represented by the
position delta `dragvec', ie. vec3(b.x()-a.x(),b.y()-a.y(),0) if the mouse was dragged from screen position a to b.
The argument `startpos' is where the attached object was when the button was first pressed.
The returned value is proportional to how parallel (or perpendiculat if `isPerpendicular' is true) to the screen
axis the drag is: in the direction of `axis' yields values up to 1, directly away from yields values down to -1.

◆ isSelected()

def isSelected (   self)

◆ mouseMove()

def mouseMove (   self,
  e 
)
Called when the handle is dragged, sets previous position and calls self.mouseDrag().
Here is the call graph for this function:

◆ mousePress()

def mousePress (   self,
  camera,
  e 
)
Called when the handle is clicked, sets previous position, self.buttons, and self.pressedCamera.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mouseRelease()

def mouseRelease (   self,
  e 
)
Called when handle is released, clears all state values.
Here is the caller graph for this function:

◆ setPosition()

def setPosition (   self,
  pos 
)
Set the position of each internal figure to `pos'.
Here is the caller graph for this function:

◆ setRotation()

def setRotation (   self,
  yaw,
  pitch,
  roll 
)
Set the rotation of each internal figure to rotator(yaw,pitch,roll).
Here is the caller graph for this function:

◆ setScale()

def setScale (   self,
  scale 
)
Set the scale of each internal figure to `scale'.
Here is the caller graph for this function:

Member Data Documentation

◆ buttons

buttons

◆ figscale

figscale

◆ lastIntersect

lastIntersect

◆ pressedCamera

pressedCamera

◆ prevX

prevX

◆ prevY

prevY

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