public Vector3 GetWorldPosition() { Vector3 pos; Quaternion rot; Vector3 scl; WorldTransformations.Decompose(out scl, out rot, out pos); return(pos); }
/// <summary> /// Determine if the world point falls within the sprite's bounds. /// </summary> public bool Contains(Vector2 point) { point = WorldTransformations.Localize(point); Vector2 origin = new Vector2(Size.X * Origin.X, Size.Y * Origin.Y); point += origin; if (point.X >= 0 && point.X <= Size.X && point.Y >= 0 && point.Y <= Size.Y) { return(true); } return(false); }