C# 클래스 Sparrow.Geom.Matrix

The Matrix class describes an affine, 2D transformation Matrix. It provides methods to manipulate the matrix in convenient ways, and can be used to transform points. The matrix has the following form: |a c tx| |b d ty| |0 0 1|
상속: SparrowSharp.Pool.PooledObject
파일 보기 프로젝트 열기: fmotagarcia/sparrow-sharp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
A float
B float
C float
D float
Tx float
Ty float

공개 메소드들

메소드 설명
AppendMatrix ( Matrix matrix ) : void
ConvertToMatrix4 ( ) : Matrix4

Creates and returns an OpenGL Matrix4 object based on this Matrix

ConvertToMatrix4d ( ) : System.Matrix4d

Creates and returns an OpenGL Matrix4d object based on this Matrix

CopyFromMatrix ( Matrix matrix ) : void
Create ( float a = 1.0f, float b = 0.0f, float c = 0.0f, float d = 1.0f, float tx = 0.0f, float ty = 0.0f ) : Matrix
Identity ( ) : void

Converts the matrix to an Identity matrix

Invert ( ) : void
IsEqual ( Matrix other ) : bool
PrependMatrix ( Matrix matrix ) : void
PrependTranslation ( float dx, float dy ) : void
Rotate ( float angleInRadians ) : void

Applies a rotation on the matrix (angle in radians).

Scale ( float sx, float sy ) : void
Skew ( float sx, float sy ) : void

Appends a skew transformation to a matrix (angles in radians). The skew matrix has the following form: | cos(skewY) -sin(skewX) 0 | | sin(skewY) cos(skewX) 0 | | 0 0 1 |

ToString ( ) : string
TransformPoint ( Point point ) : Point

Returns a point that is transformed by this matrix

TransformPoint ( float x, float y ) : Point
Translate ( float dx, float dy ) : void

비공개 메소드들

메소드 설명
Init ( ) : Matrix
Matrix ( float a = 1.0f, float b = 0.0f, float c = 0.0f, float d = 1.0f, float tx = 0.0f, float ty = 0.0f ) : System

메소드 상세

AppendMatrix() 공개 메소드

public AppendMatrix ( Matrix matrix ) : void
matrix Matrix
리턴 void

ConvertToMatrix4() 공개 메소드

Creates and returns an OpenGL Matrix4 object based on this Matrix
public ConvertToMatrix4 ( ) : Matrix4
리턴 Matrix4

ConvertToMatrix4d() 공개 메소드

Creates and returns an OpenGL Matrix4d object based on this Matrix
public ConvertToMatrix4d ( ) : System.Matrix4d
리턴 System.Matrix4d

CopyFromMatrix() 공개 메소드

public CopyFromMatrix ( Matrix matrix ) : void
matrix Matrix
리턴 void

Create() 공개 정적인 메소드

public static Create ( float a = 1.0f, float b = 0.0f, float c = 0.0f, float d = 1.0f, float tx = 0.0f, float ty = 0.0f ) : Matrix
a float
b float
c float
d float
tx float
ty float
리턴 Matrix

Identity() 공개 메소드

Converts the matrix to an Identity matrix
public Identity ( ) : void
리턴 void

Invert() 공개 메소드

public Invert ( ) : void
리턴 void

IsEqual() 공개 메소드

public IsEqual ( Matrix other ) : bool
other Matrix
리턴 bool

PrependMatrix() 공개 메소드

public PrependMatrix ( Matrix matrix ) : void
matrix Matrix
리턴 void

PrependTranslation() 공개 메소드

public PrependTranslation ( float dx, float dy ) : void
dx float
dy float
리턴 void

Rotate() 공개 메소드

Applies a rotation on the matrix (angle in radians).
public Rotate ( float angleInRadians ) : void
angleInRadians float
리턴 void

Scale() 공개 메소드

public Scale ( float sx, float sy ) : void
sx float
sy float
리턴 void

Skew() 공개 메소드

Appends a skew transformation to a matrix (angles in radians). The skew matrix has the following form: | cos(skewY) -sin(skewX) 0 | | sin(skewY) cos(skewX) 0 | | 0 0 1 |
public Skew ( float sx, float sy ) : void
sx float
sy float
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

TransformPoint() 공개 메소드

Returns a point that is transformed by this matrix
public TransformPoint ( Point point ) : Point
point Point
리턴 Point

TransformPoint() 공개 메소드

public TransformPoint ( float x, float y ) : Point
x float
y float
리턴 Point

Translate() 공개 메소드

public Translate ( float dx, float dy ) : void
dx float
dy float
리턴 void

프로퍼티 상세

A 공개적으로 프로퍼티

public float A
리턴 float

B 공개적으로 프로퍼티

public float B
리턴 float

C 공개적으로 프로퍼티

public float C
리턴 float

D 공개적으로 프로퍼티

public float D
리턴 float

Tx 공개적으로 프로퍼티

public float Tx
리턴 float

Ty 공개적으로 프로퍼티

public float Ty
리턴 float