C# Class Zeplin.Transformation

Defines spatial properties for art assets
Mostra file Open project: zumpiez/Zeplin Class Usage Examples

Public Properties

Property Type Description
Pivot Vector2
Position Vector2
Rotation float
Scale Vector2

Public Methods

Method Description
Equals ( object obj ) : bool
GetHashCode ( ) : int
Transformation ( ) : System
Transformation ( Transformation old ) : System
Transformation ( Vector2 position, Vector2 scale, float rotation ) : System

Constructs a transformation with the most common elements (position, scale, rotation)

Transformation ( Vector2 position, Vector2 scale, float rotation, Vector2 pivot ) : System

Constructs a transformation with position, scale, rotation and custom pivot

There are some problems that occur with non-centered pivots. Looking into this.

operator ( ) : bool

Method Details

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

Transformation() public method

public Transformation ( ) : System
return System

Transformation() public method

public Transformation ( Transformation old ) : System
old Transformation
return System

Transformation() public method

Constructs a transformation with the most common elements (position, scale, rotation)
public Transformation ( Vector2 position, Vector2 scale, float rotation ) : System
position Vector2 The object's position in world space
scale Vector2 The object's scale factors
rotation float Degrees rotated, in radians
return System

Transformation() public method

Constructs a transformation with position, scale, rotation and custom pivot
There are some problems that occur with non-centered pivots. Looking into this.
public Transformation ( Vector2 position, Vector2 scale, float rotation, Vector2 pivot ) : System
position Vector2 The object's position in world space
scale Vector2 The object's scale factors
rotation float Degrees rotated, in radians
pivot Vector2 The pivot point, in object space
return System

operator() public static method

public static operator ( ) : bool
return bool

Property Details

Pivot public_oe property

The object's pivot point in object space.
public Vector2 Pivot
return Vector2

Position public_oe property

The object's position in world coordinates
public Vector2 Position
return Vector2

Rotation public_oe property

The object's rotaton in radians
public float Rotation
return float

Scale public_oe property

The object's X and Y scale factors
public Vector2 Scale
return Vector2