LocalToGlobal() public method

public LocalToGlobal ( Vector2 localVector ) : Vector2
localVector Vector2
return Vector2
Beispiel #1
0
    public FNodeFollower(FNode follower,FNode following)
    {
        _follower=follower;
        _following=following;

        Vector2 globalPos=_following.LocalToGlobal(Vector2.zero);
        Vector2 localPos=_follower.container.GlobalToLocal(globalPos);
        _offset=_follower.GetPosition()-localPos;

        ((IFNodeWatcher)this).Watch(_following);
    }
Beispiel #2
0
 public static Vector2 GetGlobalTopLeftRectPoint(Rect rect, FNode node)
 {
     if (node.isOnStage)
     {
         return(node.LocalToGlobal(new Vector2(rect.xMin, rect.yMax)));
     }
     else
     {
         return(new Vector2(-1, -1));
     }
 }
Beispiel #3
0
 public static Vector2 GetGlobalBottomRightRectPoint(Rect rect, FNode node)
 {
     if (node.isOnStage)
     {
         return(node.LocalToGlobal(new Vector2(rect.xMax, rect.yMin)));
     }
     else
     {
         return(new Vector2(-1, -1));
     }
 }
Beispiel #4
0
 public Vector2 OtherToLocal(FNode otherNode, Vector2 otherVector)     //takes a point in another node and converts it to a point in this node
 {
     return(GlobalToLocal(otherNode.LocalToGlobal(otherVector)));
 }
 //takes a point in another node and converts it to a point in this node
 public Vector2 OtherToLocal(FNode otherNode, Vector2 otherVector)
 {
     return GlobalToLocal(otherNode.LocalToGlobal(otherVector));
 }
Beispiel #6
0
 //returns the position in THIS node of a point in the OTHER node
 public Vector2 LocalToLocal(FNode otherNode, Vector2 otherVector)
 {
     UpdateMatrix();
     return GlobalToLocal(otherNode.LocalToGlobal(otherVector));
 }
Beispiel #7
0
	public Vector2 OtherToLocal(FNode otherNode, Vector2 otherVector) //takes a point in another node and converts it to a point in this node
	{
		return GlobalToLocal(otherNode.LocalToGlobal(otherVector));
	}
Beispiel #8
0
 public Vector2 LocalToLocal(FNode otherNode, Vector2 otherVector)     //returns the position in THIS node of a point in the OTHER node
 {
     return(GlobalToLocal(otherNode.LocalToGlobal(otherVector)));
 }