LocalToGlobal() 공개 메소드

public LocalToGlobal ( Vector2 localVector ) : Vector2
localVector Vector2
리턴 Vector2
예제 #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);
    }
예제 #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));
     }
 }
예제 #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));
     }
 }
예제 #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)));
 }
예제 #5
0
 //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));
 }
예제 #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));
 }
예제 #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));
	}
예제 #8
0
파일: FNode.cs 프로젝트: hunktop/awayteam
 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)));
 }