Decomposed transform defined by a position, a rotation and a scale
A note on coordinates and undistorted rendering: By default, SFML (or more exactly, OpenGL) may interpolate drawable objects such as sprites or texts when rendering. While this allows transitions like slow movements or rotations to appear smoothly, it can lead to unwanted results in some cases, for example blurred or distorted objects. In order to render a SFML.Graphics.Drawable object pixel-perfectly, make sure the involved coordinates allow a 1:1 mapping of pixels in the window to texels (pixels in the texture). More specifically, this means: * The object's position, origin and scale have no fractional part * The object's and the view's rotation are a multiple of 90 degrees * The view's center and size have no fractional part
Inheritance: SFML.System.ObjectBase
 ////////////////////////////////////////////////////////////
 /// <summary>
 /// Construct the transformable from another transformable
 /// </summary>
 /// <param name="transformable">Transformable to copy</param>
 ////////////////////////////////////////////////////////////
 public Transformable(Transformable transformable) :
     base(IntPtr.Zero)
 {
     Origin   = transformable.Origin;
     Position = transformable.Position;
     Rotation = transformable.Rotation;
     Scale    = transformable.Scale;
 }
Example #2
0
 ////////////////////////////////////////////////////////////
 /// <summary>
 /// Construct the transformable from another transformable
 /// </summary>
 /// <param name="transformable">Transformable to copy</param>
 ////////////////////////////////////////////////////////////
 public Transformable(Transformable transformable) :
     base(IntPtr.Zero)
 {
     Origin = transformable.Origin;
     Position = transformable.Position;
     Rotation = transformable.Rotation;
     Scale = transformable.Scale;
 }
Example #3
0
 public TransformComponent(Vector2f position, float rotation)
     : base()
 {
     transform = new Transformable {Position = position, Rotation = rotation};
 }