C# Класс NewTOAPIA.Graphics.Matrix4

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Identity Matrix4

Открытые методы

Метод Описание
Frustum ( float left, float right, float bottom, float top, float near, float far ) : Matrix4

Build a projection matrix

Invert ( Matrix4 mat ) : Matrix4

Calculate the inverse of the given matrix

LookAt ( Vector3f eye, Vector3f target, Vector3f up ) : Matrix4

Build a world space to camera space matrix

Matrix4 ( ) : System
Matrix4 ( float elements ) : System
Matrix4 ( float4 row0, float4 row1, float4 row2, float4 row3 ) : System

Construct a new matrix from 4 vectors representing each row

Mult ( Matrix4 left, Matrix4 right ) : Matrix4

Post multiply this matrix by another matrix

Mult ( Matrix4 &left, Matrix4 &right, Matrix4 &result ) : void
Perspective ( float fovy, float aspect, float near, float far ) : Matrix4

Build a projection matrix

Rotate ( Quaternion q ) : Matrix4

Build a rotation matrix from a quaternion

Rotate ( float3 axis, float angle ) : Matrix4

Build a rotation matrix to rotate about the given axis

RotateX ( float angle ) : Matrix4

Build a rotation matrix that rotates about the x-axis

RotateY ( float angle ) : Matrix4

Build a rotation matrix that rotates about the y-axis

RotateZ ( float angle ) : Matrix4

Build a rotation matrix that rotates about the z-axis

Scale ( float x, float y, float z ) : void
Set ( float vec ) : void
SetToIdentity ( ) : void
ToString ( ) : string

Returns a System.String that represents the current Matrix44.

Translate ( float x, float y, float z ) : void
Translation ( Vector3f trans ) : Matrix4

Build a translation matrix with the given translation

Translation ( float x, float y, float z ) : Matrix4

Build a translation matrix with the given translation

Transpose ( Matrix4 mat ) : Matrix4

Calculate the transpose of the given matrix

Transpose ( ) : void
Transpose ( Matrix4 &mat, Matrix4 &result ) : void

Calculate the transpose of the given matrix

get ( int x, int y ) : float
operator ( ) : Matrix4

Matrix multiplication

Описание методов

Frustum() публичный статический Метод

Build a projection matrix
public static Frustum ( float left, float right, float bottom, float top, float near, float far ) : Matrix4
left float Left edge of the view frustum
right float Right edge of the view frustum
bottom float Bottom edge of the view frustum
top float Top edge of the view frustum
near float Distance to the near clip plane
far float Distance to the far clip plane
Результат Matrix4

Invert() публичный статический Метод

Calculate the inverse of the given matrix
Thrown if the Matrix4 is singular.
public static Invert ( Matrix4 mat ) : Matrix4
mat Matrix4 The matrix to invert
Результат Matrix4

LookAt() публичный статический Метод

Build a world space to camera space matrix
public static LookAt ( Vector3f eye, Vector3f target, Vector3f up ) : Matrix4
eye Vector3f Eye (camera) position in world space
target Vector3f Target position in world space
up Vector3f Up vector in world space (should not be parallel to the camera direction, that is target - eye)
Результат Matrix4

Matrix4() публичный Метод

public Matrix4 ( ) : System
Результат System

Matrix4() публичный Метод

public Matrix4 ( float elements ) : System
elements float
Результат System

Matrix4() публичный Метод

Construct a new matrix from 4 vectors representing each row
public Matrix4 ( float4 row0, float4 row1, float4 row2, float4 row3 ) : System
row0 float4 Top row of the matrix
row1 float4 2nd row of the matrix
row2 float4 3rd row of the matrix
row3 float4 Bottom row of the matrix
Результат System

Mult() публичный статический Метод

Post multiply this matrix by another matrix
public static Mult ( Matrix4 left, Matrix4 right ) : Matrix4
left Matrix4
right Matrix4 The matrix to multiply
Результат Matrix4

Mult() публичный статический Метод

public static Mult ( Matrix4 &left, Matrix4 &right, Matrix4 &result ) : void
left Matrix4
right Matrix4
result Matrix4
Результат void

Perspective() публичный статический Метод

Build a projection matrix
public static Perspective ( float fovy, float aspect, float near, float far ) : Matrix4
fovy float Angle of the field of view in the y direction (in radians)
aspect float Aspect ratio of the view (width / height)
near float Distance to the near clip plane
far float Distance to the far clip plane
Результат Matrix4

Rotate() публичный статический Метод

Build a rotation matrix from a quaternion
public static Rotate ( Quaternion q ) : Matrix4
q Quaternion the quaternion
Результат Matrix4

Rotate() публичный статический Метод

Build a rotation matrix to rotate about the given axis
public static Rotate ( float3 axis, float angle ) : Matrix4
axis float3 the axis to rotate about
angle float angle in radians to rotate counter-clockwise (looking in the direction of the given axis)
Результат Matrix4

RotateX() публичный статический Метод

Build a rotation matrix that rotates about the x-axis
public static RotateX ( float angle ) : Matrix4
angle float angle in radians to rotate counter-clockwise around the x-axis
Результат Matrix4

RotateY() публичный статический Метод

Build a rotation matrix that rotates about the y-axis
public static RotateY ( float angle ) : Matrix4
angle float angle in radians to rotate counter-clockwise around the y-axis
Результат Matrix4

RotateZ() публичный статический Метод

Build a rotation matrix that rotates about the z-axis
public static RotateZ ( float angle ) : Matrix4
angle float angle in radians to rotate counter-clockwise around the z-axis
Результат Matrix4

Scale() публичный Метод

public Scale ( float x, float y, float z ) : void
x float
y float
z float
Результат void

Set() публичный Метод

public Set ( float vec ) : void
vec float
Результат void

SetToIdentity() публичный Метод

public SetToIdentity ( ) : void
Результат void

ToString() публичный Метод

Returns a System.String that represents the current Matrix44.
public ToString ( ) : string
Результат string

Translate() публичный Метод

public Translate ( float x, float y, float z ) : void
x float
y float
z float
Результат void

Translation() публичный статический Метод

Build a translation matrix with the given translation
public static Translation ( Vector3f trans ) : Matrix4
trans Vector3f The vector to translate along
Результат Matrix4

Translation() публичный статический Метод

Build a translation matrix with the given translation
public static Translation ( float x, float y, float z ) : Matrix4
x float X translation
y float Y translation
z float Z translation
Результат Matrix4

Transpose() публичный статический Метод

Calculate the transpose of the given matrix
public static Transpose ( Matrix4 mat ) : Matrix4
mat Matrix4 The matrix to transpose
Результат Matrix4

Transpose() публичный Метод

public Transpose ( ) : void
Результат void

Transpose() публичный статический Метод

Calculate the transpose of the given matrix
public static Transpose ( Matrix4 &mat, Matrix4 &result ) : void
mat Matrix4 The matrix to transpose
result Matrix4
Результат void

get() публичный Метод

public get ( int x, int y ) : float
x int
y int
Результат float

operator() публичный статический Метод

Matrix multiplication
public static operator ( ) : Matrix4
Результат Matrix4

Описание свойств

Identity статическое публичное свойство

The identity matrix
static public Matrix4 Identity
Результат Matrix4