GlCable
rendering cables for links
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
LINETYPE_CURVED: number |
|
public |
LINETYPE_HANGING: number |
|
public |
LINETYPE_SIMPLE: number |
|
public |
LINETYPE_STRAIGHT: number |
|
public get |
hovering: * |
|
public get |
subPatch: * |
|
public set |
|
Private Members | ||
private |
_buttonRect: * |
|
private |
_buttonSize: * |
|
private |
_curvedSimple: boolean |
|
private |
_disposed: boolean |
|
private |
_distFromPort: number |
|
private |
_glPatch: * |
|
private |
_linetype: * |
|
private |
_link: * |
|
private |
|
|
private |
_log: * |
|
private |
_oldx: * |
|
private |
_oldx2: * |
|
private |
_oldy2: * |
|
private |
_points: *[] |
|
private |
|
|
private |
_splineIdx: * |
|
private |
_subPatch: * |
|
private |
_tension: number |
|
private |
_type: * |
|
private |
_visible: boolean |
|
private |
_x: number |
|
private |
_x2: number |
|
private |
_y: number |
|
private |
_y2: number |
Method Summary
Public Methods | ||
public |
collideLine(x1: *, y1: *, x2: *, y2: *): boolean |
|
public |
collideLineLine(x1: *, y1: *, x2: *, y2: *, x3: *, y3: *, x4: *, y4: *): boolean |
|
public |
collideMouse(e: *, x1: *, y1: *, x2: *, y2: *, cx: *, cy: *, r: *): boolean |
|
public |
dispose() |
|
public |
isHoveredButtonRect(): * |
|
public |
setCloseToMouse(b: *) |
|
public |
setColor(r: *, g: *, b: *, a: *) |
|
public |
setPosition(x: *, y: *, x2: *, y2: *) |
|
public |
setSpeed(speed: *) |
|
public |
setText(t: *) |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Private Methods | ||
private |
_checkCollide(e: *): boolean |
|
private |
_collideLinePoint(x1: *, y1: *, x2: *, y2: *, px: *, py: *): boolean |
|
private |
_collidePointCircle(px: *, py: *, cx: *, cy: *, r: *): boolean |
|
private |
_dist(x: *, y: *, x2: *, y2: *): * |
|
private |
|
|
private |
_subdivide(inPoints: *, divs: *): * |
|
private |
_unHover() |
|
private |
|
|
private |
|
Public Constructors
public constructor() source
Public Members
public LINETYPE_CURVED: number source
public LINETYPE_HANGING: number source
public LINETYPE_SIMPLE: number source
public LINETYPE_STRAIGHT: number source
public get hovering: * source
public get subPatch: * source
public set visible source
Private Members
private _buttonRect: * source
private _buttonSize: * source
private _curvedSimple: boolean source
private _disposed: boolean source
private _distFromPort: number source
private _glPatch: * source
private _linetype: * source
private _link: * source
private _listenerMousemove: * source
private _log: * source
private _oldx: * source
private _oldx2: * source
private _oldy2: * source
private _points: *[] source
private _splineDrawer: * source
private _splineIdx: * source
private _subPatch: * source
private _tension: number source
private _type: * source
private _visible: boolean source
private _x: number source
private _x2: number source
private _y: number source
private _y2: number source
Public Methods
public collideLine(x1: *, y1: *, x2: *, y2: *): boolean source
Params:
Name | Type | Attribute | Description |
x1 | * | ||
y1 | * | ||
x2 | * | ||
y2 | * |
Return:
boolean |
public collideLineLine(x1: *, y1: *, x2: *, y2: *, x3: *, y3: *, x4: *, y4: *): boolean source
Params:
Name | Type | Attribute | Description |
x1 | * | ||
y1 | * | ||
x2 | * | ||
y2 | * | ||
x3 | * | ||
y3 | * | ||
x4 | * | ||
y4 | * |
Return:
boolean |
public collideMouse(e: *, x1: *, y1: *, x2: *, y2: *, cx: *, cy: *, r: *): boolean source
Params:
Name | Type | Attribute | Description |
e | * | ||
x1 | * | ||
y1 | * | ||
x2 | * | ||
y2 | * | ||
cx | * | ||
cy | * | ||
r | * |
Return:
boolean |
public dispose() source
public setCloseToMouse(b: *) source
Params:
Name | Type | Attribute | Description |
b | * |
public setColor(r: *, g: *, b: *, a: *) source
Params:
Name | Type | Attribute | Description |
r | * | ||
g | * | ||
b | * | ||
a | * |
public setPosition(x: *, y: *, x2: *, y2: *) source
Params:
Name | Type | Attribute | Description |
x | * | ||
y | * | ||
x2 | * | ||
y2 | * |
public setSpeed(speed: *) source
Params:
Name | Type | Attribute | Description |
speed | * |
public setText(t: *) source
Params:
Name | Type | Attribute | Description |
t | * |
public updateColor() source
public updateLineStyle() source
public updateMouseListener() source
public updateVisible() source
Private Methods
private _checkCollide(e: *): boolean source
Params:
Name | Type | Attribute | Description |
e | * |
Return:
boolean |
private _collideLinePoint(x1: *, y1: *, x2: *, y2: *, px: *, py: *): boolean source
Params:
Name | Type | Attribute | Description |
x1 | * | ||
y1 | * | ||
x2 | * | ||
y2 | * | ||
px | * | ||
py | * |
Return:
boolean |
private _collidePointCircle(px: *, py: *, cx: *, cy: *, r: *): boolean source
Params:
Name | Type | Attribute | Description |
px | * | ||
py | * | ||
cx | * | ||
cy | * | ||
r | * |
Return:
boolean |
private _dist(x: *, y: *, x2: *, y2: *): * source
Params:
Name | Type | Attribute | Description |
x | * | ||
y | * | ||
x2 | * | ||
y2 | * |
Return:
* |
private _setPositionButton() source
private _subdivide(inPoints: *, divs: *): * source
Params:
Name | Type | Attribute | Description |
inPoints | * | ||
divs | * |
Return:
* |