Graph Maker
|
The node class primarily used to create the points / bars of axis graphs. More...
Public Member Functions | |
GameObject | CreateLink (GameObject target, Object prefabLink, int linkId, GameObject parent, bool repos) |
Create a link between two nodes. More... | |
virtual void | Reposition (float x, float y) |
Update the position of this node. More... | |
void | SetID (int newID) |
Set node Id. More... | |
void | RepositionRelativeToNode (WMG_Node fromNode, bool fixAngle, int degreeStep, float lengthStep) |
Repositions this node relative to another node. More... | |
Public Member Functions inherited from WMG_GUI_Functions | |
void | SetActive (GameObject obj, bool state) |
bool | activeInHierarchy (GameObject obj) |
void | SetActiveAnchoredSprite (GameObject obj, bool state) |
void | SetActiveImage (GameObject obj, bool state) |
Texture2D | getTexture (GameObject obj) |
void | setTexture (GameObject obj, Sprite sprite) |
void | changeSpriteFill (GameObject obj, float fill) |
void | changeRadialSpriteRotation (GameObject obj, Vector3 newRot) |
void | changeSpriteColor (GameObject obj, Color aColor) |
void | changeSpriteAlpha (GameObject obj, float alpha) |
float | getSpriteAlpha (GameObject obj) |
void | changeSpriteWidth (GameObject obj, int aWidth) |
void | changeSpriteHeight (GameObject obj, int aHeight) |
void | setTextureMaterial (GameObject obj, Material aMat) |
Material | getTextureMaterial (GameObject obj) |
void | changeSpriteSize (GameObject obj, int aWidth, int aHeight) |
void | changeSpriteSizeFloat (GameObject obj, float aWidth, float aHeight) |
Vector2 | getSpriteSize (GameObject obj) |
void | changeBarWidthHeight (GameObject obj, int aWidth, int aHeight) |
float | getSpriteWidth (GameObject obj) |
float | getSpriteHeight (GameObject obj) |
float | getTextWidth (GameObject obj) |
float | getTextHeight (GameObject obj) |
void | forceUpdateText (GameObject obj) |
void | setAnchor (GameObject go, Vector2 anchor, Vector2 pivot, Vector2 anchoredPosition) |
void | setAnchoredPosition (GameObject go, Vector2 anchoredPosition) |
void | stretchToParent (GameObject go) |
bool | rectIntersectRect (GameObject r1, GameObject r2) |
void | getRectDiffs (GameObject child, GameObject container, ref Vector2 xDif, ref Vector2 yDif) |
float | getSpritePositionX (GameObject obj) |
float | getSpritePositionY (GameObject obj) |
Vector2 | getSpritePositionXY (GameObject obj) |
float | getSpritePivotTopToBot (GameObject obj) |
Vector3 | getPositionRelativeTransform (GameObject obj, GameObject relative) |
void | changePositionByRelativeTransform (GameObject obj, GameObject relative, Vector2 delta) |
void | changeSpritePositionTo (GameObject obj, Vector3 newPos) |
void | changeSpritePositionToX (GameObject obj, float newPos) |
void | changeSpritePositionToY (GameObject obj, float newPos) |
Vector2 | getChangeSpritePositionTo (GameObject obj, Vector2 newPos) |
void | changeSpritePositionRelativeToObjBy (GameObject obj, GameObject relObj, Vector3 changeAmt) |
void | changeSpritePositionRelativeToObjByX (GameObject obj, GameObject relObj, float changeAmt) |
void | changeSpritePositionRelativeToObjByY (GameObject obj, GameObject relObj, float changeAmt) |
Vector2 | getSpritePivot (GameObject obj) |
void | changeSpriteParent (GameObject child, GameObject parent) |
void | getFirstCanvasOnSelfOrParent (Transform trans, ref Canvas canv) |
void | addRaycaster (GameObject obj) |
void | setAsNotInteractible (GameObject obj) |
void | bringSpriteToFront (GameObject obj) |
void | sendSpriteToBack (GameObject obj) |
Public Member Functions inherited from WMG_Text_Functions | |
void | changeLabelText (GameObject obj, string aText) |
void | changeLabelFontSize (GameObject obj, int newFontSize) |
Vector2 | getTextSize (GameObject obj) |
void | changeSpritePivot (GameObject obj, WMGpivotTypes theType) |
void | changeLabelColor (GameObject obj, Color newColor) |
void | changeLabelFontStyle (GameObject obj, FontStyle newFontStyle) |
void | changeLabelFont (GameObject obj, Font newFont) |
Public Attributes | |
int | id |
The unique id of this node per instance of WMG_Graph_Manager. More... | |
float | radius |
The radius of this node if it represents a circle, and half the width of this node if it represents a square. More... | |
bool | isSquare |
Whether or not this node represents a square or a circle. More... | |
int | numLinks = 0 |
The number of links connected with this node. More... | |
List< GameObject > | links = new List<GameObject>() |
The links connected with this node. More... | |
List< float > | linkAngles = new List<float>() |
The angles of the links connected with this node. More... | |
GameObject | objectToScale |
Reference to the object that should change scale for this node, typically it is the same object to which this node is attached. More... | |
GameObject | objectToColor |
Reference to the object that should change color for this node, could be a separate child object of this node. More... | |
GameObject | objectToLabel |
Reference to the object that should change label for this node, could be a separate child object of this node. More... | |
bool | isSelected = false |
bool | wasSelected = false |
bool | BFS_mark |
int | BFS_depth |
float | Dijkstra_depth |
WMG_Series | seriesRef |
Additional Inherited Members | |
Public Types inherited from WMG_Text_Functions | |
enum | WMGpivotTypes { WMGpivotTypes.Bottom, WMGpivotTypes.BottomLeft, WMGpivotTypes.BottomRight, WMGpivotTypes.Center, WMGpivotTypes.Left, WMGpivotTypes.Right, WMGpivotTypes.Top, WMGpivotTypes.TopLeft, WMGpivotTypes.TopRight } |
The node class primarily used to create the points / bars of axis graphs.
GameObject WMG_Node.CreateLink | ( | GameObject | target, |
Object | prefabLink, | ||
int | linkId, | ||
GameObject | parent, | ||
bool | repos | ||
) |
Create a link between two nodes.
Sets node references, and repositions to connect the 2 nodes.
target | Target. |
prefabLink | Prefab link. |
linkId | Link identifier. |
parent | Parent. |
repos | If set to true repos. |
|
virtual |
Update the position of this node.
Also repositions and rotates its links to correctly correspond with the new node position.
x | The x coordinate. |
y | The y coordinate. |
void WMG_Node.RepositionRelativeToNode | ( | WMG_Node | fromNode, |
bool | fixAngle, | ||
int | degreeStep, | ||
float | lengthStep | ||
) |
Repositions this node relative to another node.
fromNode | From node. |
fixAngle | If set to true fix angle. |
degreeStep | Degree step. |
lengthStep | Length step. |
void WMG_Node.SetID | ( | int | newID | ) |
Set node Id.
Node Id can change during node deletion, but node Id remains unique.
newID | New I. |
int WMG_Node.BFS_depth |
bool WMG_Node.BFS_mark |
float WMG_Node.Dijkstra_depth |
int WMG_Node.id |
The unique id of this node per instance of WMG_Graph_Manager.
bool WMG_Node.isSelected = false |
bool WMG_Node.isSquare |
Whether or not this node represents a square or a circle.
List<float> WMG_Node.linkAngles = new List<float>() |
The angles of the links connected with this node.
List<GameObject> WMG_Node.links = new List<GameObject>() |
The links connected with this node.
int WMG_Node.numLinks = 0 |
The number of links connected with this node.
GameObject WMG_Node.objectToColor |
Reference to the object that should change color for this node, could be a separate child object of this node.
GameObject WMG_Node.objectToLabel |
Reference to the object that should change label for this node, could be a separate child object of this node.
GameObject WMG_Node.objectToScale |
Reference to the object that should change scale for this node, typically it is the same object to which this node is attached.
float WMG_Node.radius |
The radius of this node if it represents a circle, and half the width of this node if it represents a square.
WMG_Series WMG_Node.seriesRef |
bool WMG_Node.wasSelected = false |