/** Transforms the specified point in the actor's coordinates to be in the stage's coordinates. */ public Vector2 localToStageCoordinates (Vector2 localCoords) { return localToAscendantCoordinates(null, localCoords); }
/** Transforms the specified point in the actor's coordinates to be in the stage's coordinates. */ public Vector2 localToStageCoordinates (Vector2 localCoords) { return localToAscendantCoordinates(null, localCoords); }
/** Transforms the specified point in the actor's coordinates to be in screen coordinates. * @see Stage#stageToScreenCoordinates(Vector2) */ public Vector2 localToScreenCoordinates (Vector2 localCoords) { Stage stage = this.stage; if (stage == null) return localCoords; return stage.stageToScreenCoordinates(localToAscendantCoordinates(null, localCoords)); }
/** Transforms the specified point in the actor's coordinates to be in screen coordinates. * @see Stage#stageToScreenCoordinates(Vector2) */ public Vector2 localToScreenCoordinates (Vector2 localCoords) { Stage stage = this.stage; if (stage == null) return localCoords; return stage.stageToScreenCoordinates(localToAscendantCoordinates(null, localCoords)); }
/** Transforms the specified point in the actor's coordinates to be in the stage's coordinates. */ public Vector2 localToStageCoordinates (Vector2 localCoords) { return localToAscendantCoordinates(null, localCoords); }
/** Transforms the specified point in the actor's coordinates to be in screen coordinates. * @see Stage#stageToScreenCoordinates(Vector2) */ public Vector2 localToScreenCoordinates (Vector2 localCoords) { Stage stage = this.stage; if (stage == null) return localCoords; return stage.stageToScreenCoordinates(localToAscendantCoordinates(null, localCoords)); }
/** @param vec the coordinates * @param actor the actor in which coordinate system vec is given * @param other the actor into which coordinate system to convert the coordinates to * @throws IllegalArgumentException if the given actors are not in the same hierarchy */ public static void localToOtherCoordinates(Vector2 vec, Actor actor, Actor other) { Group lastParent = lastParent(actor); if(lastParent == null || lastParent != lastParent(other)) throw new IllegalArgumentException(actor + " and " + other + " are not in the same hierarchy"); actor.localToAscendantCoordinates(lastParent, vec); lastParent.localToDescendantCoordinates(other, vec); }