|
Eidolon
|


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 | |
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.
| def __init__ | ( | self | ) |
| 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.

| def getCameraDirection | ( | self | ) |
Get the direction vector of the camera selecting this handle, or +Z if not selected.

| 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.
| 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.
| def isSelected | ( | self | ) |
| def mouseMove | ( | self, | |
| e | |||
| ) |
Called when the handle is dragged, sets previous position and calls self.mouseDrag().

| def mousePress | ( | self, | |
| camera, | |||
| e | |||
| ) |
Called when the handle is clicked, sets previous position, self.buttons, and self.pressedCamera.


| def mouseRelease | ( | self, | |
| e | |||
| ) |
Called when handle is released, clears all state values.

| def setPosition | ( | self, | |
| pos | |||
| ) |
Set the position of each internal figure to `pos'.

| def setRotation | ( | self, | |
| yaw, | |||
| pitch, | |||
| roll | |||
| ) |
Set the rotation of each internal figure to rotator(yaw,pitch,roll).

| def setScale | ( | self, | |
| scale | |||
| ) |
Set the scale of each internal figure to `scale'.

| buttons |
| figscale |
| lastIntersect |
| pressedCamera |
| prevX |
| prevY |
1.8.13