Свойство | Тип | Описание | |
---|---|---|---|
Instance |
Метод | Описание | |
---|---|---|
ButtonDown ( Canguro activeView, System e ) : void |
Responds to MouseDown event. Performs picking or selection (start and end of window selection) according to the current SelectionFilter. It also sends a signal to CommandServices when selection is over so as to unlock waiting commands.
|
|
ButtonUp ( Canguro activeView, System e ) : void |
If Right Mouse Button was clicked, then end current selection cycle
|
|
GetViewableObjectsCentroid ( Canguro activeView ) : System.Vector3 | ||
MouseMove ( Canguro activeView, System e ) : void | ||
Reset ( ) : void |
End current selection cycle and puts Selection in a default state, except for the currently assigned CommandServices, which link Selection to the current Model Command under execution (if any). For a hard Reset which sets CommandServices = null use Selection.Start(null).
|
|
Start ( Canguro services ) : void | ||
endWindowSelection ( bool performSelection, Canguro activeView, Canguro wf ) : void | ||
resetCursor ( ) : void | ||
setCursor ( Canguro selectionFilter ) : void | ||
startWindowSelection ( System location ) : void |
Метод | Описание | |
---|---|---|
SelectWindow ( Canguro activeView, int fx1, int fy1, int fx2, int fy2, List |
Método para determinar lo objetos que se encuentren dentro de la ventana. Para ello se obtienen primero los parámetros (normal n y punto en el plano s) de 4 planos correspondientes a las 4 aristas de la ventana. Estos pueden ser ortogonales o piramidales (perspectiva) según el tipo de proyección activo. Las esquinas se nombran como sigue: A----------B (fx1,fy1)-----------(fx2,fy1) | World | | Screen space | | Space | | | D----------C (fx1,fy2)-----------(fx2,fy2) Tomando las siguientes ecuaciones vectoriales: X = P + rQ (Ec. Recta) 0 = (X - S) . N (Ec. Plano) Se puede conocer la distancia entre un punto P y un plano si se crea una recta con base en P y dirección N y se interseca con el plano. La intersección de una recta y un plano es como sigue: 0 = (P + rQ - S) . N, y si la dirección de la recta es perpendicular al plano, tenemos que: Q = N lo que nos lleva a: r = (P - S) . N/|N| = (P.(N/|N|)) - (S.(N/|N|)) Si N es un vector unitario, entonces: N = N / |N| Por lo tanto: r = P.N - S.N y la distancia entre P y el plano es igual a r. P.N es la distancia desde el punto al origen, perpendicular al plano posX es P.N con N = la normal al plano BC posY es P.N con N = la normal al plano AB deltaX es la distancia entre los planos BC y DA deltaY es la distancia entre los planos AB y CD Si N apunta hacia afuera en los 4 planos mencionados arriba, entonces una r positiva corresponde a estar en la parte interna del plano (con respecto a la caja formada por los 4). Por lo tanto un punto con las 4 r's positivas será un punto dentro de dicha caja.
|
|
Selection ( ) : System | ||
endCycle ( object pickedObject ) : void | ||
endTracking ( ) : void | ||
getJointPos ( Canguro j, float displacements, float scalefactor ) : System.Vector3 | ||
getPlanes ( Canguro activeView, int fx1, int fy1, int fx2, int fy2, System.Vector3 &nAB, System.Vector3 &sAB, System.Vector3 &nBC, System.Vector3 &sBC, System.Vector3 &nCD, System.Vector3 &sCD, System.Vector3 &nDA, System.Vector3 &sDA, System.Vector3 &corners1, System.Vector3 &corners2 ) : void |
Method to return the four bounding planes given two points in screen coordinates (as in two mouse clicks). A plane can be defined by a point on it and its normal, which is what is beaing returned for each of the four planes as defined by selectWindow. For this, 8 points are calculated, two for each corner, for the front and back plane. This defines a box. The points are to be defined as pointing towards the screen (i.e. a1 lies in the middle of the volume and a2 is in the front plane), regardless of the coordinate system used (left or right handed), and the second point will be at the screen plane.
|
|
isCornerInsideTriangle ( System.Vector3 &p, System.Vector3 &u, System.Vector3 &v, System.Vector3 &w, System.Vector3 &qs ) : bool |
Check if the ray of each corner of the selection box intersects the area Let the area can be divided in two triangles T1 and T2, and the corners of the selection window be named C1, C2, C3 and C4. The equation for the planes defined by T1 and T2 is P + rU + sV = X where P is any point in the triangle, and U and V are the vectors forming the triangle's edges The equation for each corner will be Q - tW = X where Q is any point on the ray and W is the direction vector (perpendicular to the screen) Q's are obtained from corners1 and W from cornersDir This solution involves solving the following linear system of equations: | U0 V0 W0 | | r | | U1 V1 W1 | x | s | = (Q - P) | U2 V2 W2 | | t |
|
|
pick ( int x, int y ) : object | ||
pick ( int x, int y, Controller wf ) : object | ||
pickPoint ( Canguro activeView ) : Controller.Snap.Magnet | ||
startTracking ( System p ) : void |
public ButtonDown ( Canguro activeView, System e ) : void | ||
activeView | Canguro | The active View |
e | System | MouseDown event arguments |
Результат | void |
public ButtonUp ( Canguro activeView, System e ) : void | ||
activeView | Canguro | The active View |
e | System | MouseUp event arguments |
Результат | void |
public GetViewableObjectsCentroid ( Canguro activeView ) : System.Vector3 | ||
activeView | Canguro | |
Результат | System.Vector3 |
public MouseMove ( Canguro activeView, System e ) : void | ||
activeView | Canguro | |
e | System | |
Результат | void |
public endWindowSelection ( bool performSelection, Canguro activeView, Canguro wf ) : void | ||
performSelection | bool | |
activeView | Canguro | |
wf | Canguro | |
Результат | void |
public setCursor ( Canguro selectionFilter ) : void | ||
selectionFilter | Canguro | |
Результат | void |
public startWindowSelection ( System location ) : void | ||
location | System | |
Результат | void |