Ctrl+K

Matrix4

Declaration

public struct Strawberry.Math.Matrix4

Implements: System.IEquatable

Constructors

Matrix4

Constructor for 4x4 Matrix

void Matrix4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)

Parameters:

Name Type Description
m11 System.Single A Single
m12 System.Single A Single
m13 System.Single A Single
m14 System.Single A Single
m21 System.Single A Single
m22 System.Single A Single
m23 System.Single A Single
m24 System.Single A Single
m31 System.Single A Single
m32 System.Single A Single
m33 System.Single A Single
m34 System.Single A Single
m41 System.Single A Single
m42 System.Single A Single
m43 System.Single A Single
m44 System.Single A Single

Properties

Identity static

Matrix4 Identity { get }

Array

float[] Array { get }

Backward

Vector3 Backward { get set }

Down

Vector3 Down { get set }

Forward

Vector3 Forward { get set }

Left

Vector3 Left { get set }
Vector3 Right { get set }

Translation

Vector3 Translation { get set }

Up

Vector3 Up { get set }

Fields

M11

float M11

M12

float M12

M13

float M13

M14

float M14

M21

float M21

M22

float M22

M23

float M23

M24

float M24

M31

float M31

M32

float M32

M33

float M33

M34

float M34

M41

float M41

M42

float M42

M43

float M43

M44

float M44

Methods

CreateWorld static

Matrix4 CreateWorld(Vector3 position, Vector3 forward, Vector3 up)

Parameters:

Name Type Description
position Strawberry.Math.Vector3
forward Strawberry.Math.Vector3
up Strawberry.Math.Vector3

CreateWorld static

void CreateWorld(ref Vector3 position, ref Vector3 forward, ref Vector3 up, out Matrix4 result)

Parameters:

Name Type Description
position ref Strawberry.Math.Vector3
forward ref Strawberry.Math.Vector3
up ref Strawberry.Math.Vector3
result out Strawberry.Math.Matrix4

Add static

Adds second matrix to the first.

Matrix4 Add(Matrix4 matrix1, Matrix4 matrix2)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4 A Matrix4
matrix2 Strawberry.Math.Matrix4 A Matrix4

Returns: A Matrix4

Add static

Adds two Matrix and save to the result Matrix

void Add(ref Matrix4 matrix1, ref Matrix4 matrix2, out Matrix4 result)

Parameters:

Name Type Description
matrix1 ref Strawberry.Math.Matrix4 A Matrix4
matrix2 ref Strawberry.Math.Matrix4 A Matrix4
result out Strawberry.Math.Matrix4 A Matrix4

CreateBillboard static

Matrix4 CreateBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, Vector3? cameraForwardVector)

Parameters:

Name Type Description
objectPosition Strawberry.Math.Vector3
cameraPosition Strawberry.Math.Vector3
cameraUpVector Strawberry.Math.Vector3
cameraForwardVector Strawberry.Math.Vector3?

CreateBillboard static

void CreateBillboard(ref Vector3 objectPosition, ref Vector3 cameraPosition, ref Vector3 cameraUpVector, Vector3? cameraForwardVector, out Matrix4 result)

Parameters:

Name Type Description
objectPosition ref Strawberry.Math.Vector3
cameraPosition ref Strawberry.Math.Vector3
cameraUpVector ref Strawberry.Math.Vector3
cameraForwardVector Strawberry.Math.Vector3?
result out Strawberry.Math.Matrix4

CreateConstrainedBillboard static

Matrix4 CreateConstrainedBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, Vector3? cameraForwardVector, Vector3? objectForwardVector)

Parameters:

Name Type Description
objectPosition Strawberry.Math.Vector3
cameraPosition Strawberry.Math.Vector3
rotateAxis Strawberry.Math.Vector3
cameraForwardVector Strawberry.Math.Vector3?
objectForwardVector Strawberry.Math.Vector3?

CreateConstrainedBillboard static

void CreateConstrainedBillboard(ref Vector3 objectPosition, ref Vector3 cameraPosition, ref Vector3 rotateAxis, Vector3? cameraForwardVector, Vector3? objectForwardVector, out Matrix4 result)

Parameters:

Name Type Description
objectPosition ref Strawberry.Math.Vector3
cameraPosition ref Strawberry.Math.Vector3
rotateAxis ref Strawberry.Math.Vector3
cameraForwardVector Strawberry.Math.Vector3?
objectForwardVector Strawberry.Math.Vector3?
result out Strawberry.Math.Matrix4

CreateFromAxisAngle static

Matrix4 CreateFromAxisAngle(Vector3 axis, float angle)

Parameters:

Name Type Description
axis Strawberry.Math.Vector3
angle System.Single

CreateFromAxisAngle static

void CreateFromAxisAngle(ref Vector3 axis, float angle, out Matrix4 result)

Parameters:

Name Type Description
axis ref Strawberry.Math.Vector3
angle System.Single
result out Strawberry.Math.Matrix4

CreateLookAt static

Matrix4 CreateLookAt(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector)

Parameters:

Name Type Description
cameraPosition Strawberry.Math.Vector3
cameraTarget Strawberry.Math.Vector3
cameraUpVector Strawberry.Math.Vector3

CreateLookAt static

void CreateLookAt(ref Vector3 cameraPosition, ref Vector3 cameraTarget, ref Vector3 cameraUpVector, out Matrix4 result)

Parameters:

Name Type Description
cameraPosition ref Strawberry.Math.Vector3
cameraTarget ref Strawberry.Math.Vector3
cameraUpVector ref Strawberry.Math.Vector3
result out Strawberry.Math.Matrix4

CreateOrthographic static

Matrix4 CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane)

Parameters:

Name Type Description
width System.Single
height System.Single
zNearPlane System.Single
zFarPlane System.Single

CreateOrthographic static

Matrix4 CreateOrthographic(float left, float right, float bottom, float top, float near, float far)

Parameters:

Name Type Description
left System.Single
right System.Single
bottom System.Single
top System.Single
near System.Single
far System.Single

CreateOrthographic static

void CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane, out Matrix4 result)

Parameters:

Name Type Description
width System.Single
height System.Single
zNearPlane System.Single
zFarPlane System.Single
result out Strawberry.Math.Matrix4

CreateOrthographicOffCenter static

Matrix4 CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane)

Parameters:

Name Type Description
left System.Single
right System.Single
bottom System.Single
top System.Single
zNearPlane System.Single
zFarPlane System.Single

CreateOrthographicOffCenter static

void CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane, out Matrix4 result)

Parameters:

Name Type Description
left System.Single
right System.Single
bottom System.Single
top System.Single
zNearPlane System.Single
zFarPlane System.Single
result out Strawberry.Math.Matrix4

CreatePerspective static

Matrix4 CreatePerspective(float width, float height, float zNearPlane, float zFarPlane)

Parameters:

Name Type Description
width System.Single
height System.Single
zNearPlane System.Single
zFarPlane System.Single

CreatePerspective static

void CreatePerspective(float width, float height, float zNearPlane, float zFarPlane, out Matrix4 result)

Parameters:

Name Type Description
width System.Single
height System.Single
zNearPlane System.Single
zFarPlane System.Single
result out Strawberry.Math.Matrix4

CreatePerspectiveFieldOfView static

Matrix4 CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance)

Parameters:

Name Type Description
fieldOfView System.Single
aspectRatio System.Single
nearPlaneDistance System.Single
farPlaneDistance System.Single

CreatePerspectiveFieldOfView static

void CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance, out Matrix4 result)

Parameters:

Name Type Description
fieldOfView System.Single
aspectRatio System.Single
nearPlaneDistance System.Single
farPlaneDistance System.Single
result out Strawberry.Math.Matrix4

CreatePerspectiveOffCenter static

Matrix4 CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane)

Parameters:

Name Type Description
left System.Single
right System.Single
bottom System.Single
top System.Single
zNearPlane System.Single
zFarPlane System.Single

CreatePerspectiveOffCenter static

void CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance, out Matrix4 result)

Parameters:

Name Type Description
left System.Single
right System.Single
bottom System.Single
top System.Single
nearPlaneDistance System.Single
farPlaneDistance System.Single
result out Strawberry.Math.Matrix4

CreateRotationX static

Matrix4 CreateRotationX(float radians)

Parameters:

Name Type Description
radians System.Single

CreateRotationX static

void CreateRotationX(float radians, out Matrix4 result)

Parameters:

Name Type Description
radians System.Single
result out Strawberry.Math.Matrix4

CreateRotationY static

Matrix4 CreateRotationY(float radians)

Parameters:

Name Type Description
radians System.Single

CreateRotationY static

void CreateRotationY(float radians, out Matrix4 result)

Parameters:

Name Type Description
radians System.Single
result out Strawberry.Math.Matrix4

CreateRotationZ static

Matrix4 CreateRotationZ(float radians)

Parameters:

Name Type Description
radians System.Single

CreateRotationZ static

void CreateRotationZ(float radians, out Matrix4 result)

Parameters:

Name Type Description
radians System.Single
result out Strawberry.Math.Matrix4

CreateScale static

Matrix4 CreateScale(float scale)

Parameters:

Name Type Description
scale System.Single

CreateScale static

void CreateScale(float scale, out Matrix4 result)

Parameters:

Name Type Description
scale System.Single
result out Strawberry.Math.Matrix4

CreateScale static

Matrix4 CreateScale(float xScale, float yScale, float zScale)

Parameters:

Name Type Description
xScale System.Single
yScale System.Single
zScale System.Single

CreateScale static

void CreateScale(float xScale, float yScale, float zScale, out Matrix4 result)

Parameters:

Name Type Description
xScale System.Single
yScale System.Single
zScale System.Single
result out Strawberry.Math.Matrix4

CreateScale static

Matrix4 CreateScale(Vector3 scales)

Parameters:

Name Type Description
scales Strawberry.Math.Vector3

CreateScale static

void CreateScale(ref Vector3 scales, out Matrix4 result)

Parameters:

Name Type Description
scales ref Strawberry.Math.Vector3
result out Strawberry.Math.Matrix4

CreateTranslation static

Matrix4 CreateTranslation(float xPosition, float yPosition, float zPosition)

Parameters:

Name Type Description
xPosition System.Single
yPosition System.Single
zPosition System.Single

CreateTranslation static

void CreateTranslation(float xPosition, float yPosition, float zPosition, out Matrix4 result)

Parameters:

Name Type Description
xPosition System.Single
yPosition System.Single
zPosition System.Single
result out Strawberry.Math.Matrix4

CreateTranslation static

Matrix4 CreateTranslation(Vector3 position)

Parameters:

Name Type Description
position Strawberry.Math.Vector3

CreateTranslation static

void CreateTranslation(ref Vector3 position, out Matrix4 result)

Parameters:

Name Type Description
position ref Strawberry.Math.Vector3
result out Strawberry.Math.Matrix4

Divide static

Matrix4 Divide(Matrix4 matrix1, Matrix4 matrix2)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
matrix2 Strawberry.Math.Matrix4

Divide static

void Divide(ref Matrix4 matrix1, ref Matrix4 matrix2, out Matrix4 result)

Parameters:

Name Type Description
matrix1 ref Strawberry.Math.Matrix4
matrix2 ref Strawberry.Math.Matrix4
result out Strawberry.Math.Matrix4

Divide static

Matrix4 Divide(Matrix4 matrix1, float divider)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
divider System.Single

Divide static

void Divide(ref Matrix4 matrix1, float divider, out Matrix4 result)

Parameters:

Name Type Description
matrix1 ref Strawberry.Math.Matrix4
divider System.Single
result out Strawberry.Math.Matrix4

Invert static

Matrix4 Invert(Matrix4 matrix)

Parameters:

Name Type Description
matrix Strawberry.Math.Matrix4

Invert static

void Invert(ref Matrix4 matrix, out Matrix4 result)

Parameters:

Name Type Description
matrix ref Strawberry.Math.Matrix4
result out Strawberry.Math.Matrix4

Lerp static

Matrix4 Lerp(Matrix4 matrix1, Matrix4 matrix2, float amount)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
matrix2 Strawberry.Math.Matrix4
amount System.Single

Lerp static

void Lerp(ref Matrix4 matrix1, ref Matrix4 matrix2, float amount, out Matrix4 result)

Parameters:

Name Type Description
matrix1 ref Strawberry.Math.Matrix4
matrix2 ref Strawberry.Math.Matrix4
amount System.Single
result out Strawberry.Math.Matrix4

Multiply static

Matrix4 Multiply(Matrix4 matrix1, Matrix4 matrix2)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
matrix2 Strawberry.Math.Matrix4

Multiply static

void Multiply(ref Matrix4 matrix1, ref Matrix4 matrix2, out Matrix4 result)

Parameters:

Name Type Description
matrix1 ref Strawberry.Math.Matrix4
matrix2 ref Strawberry.Math.Matrix4
result out Strawberry.Math.Matrix4

Multiply static

Matrix4 Multiply(Matrix4 matrix1, float factor)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
factor System.Single

Multiply static

void Multiply(ref Matrix4 matrix1, float factor, out Matrix4 result)

Parameters:

Name Type Description
matrix1 ref Strawberry.Math.Matrix4
factor System.Single
result out Strawberry.Math.Matrix4

Negate static

Matrix4 Negate(Matrix4 matrix)

Parameters:

Name Type Description
matrix Strawberry.Math.Matrix4

Negate static

void Negate(ref Matrix4 matrix, out Matrix4 result)

Parameters:

Name Type Description
matrix ref Strawberry.Math.Matrix4
result out Strawberry.Math.Matrix4

Subtract static

Matrix4 Subtract(Matrix4 matrix1, Matrix4 matrix2)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
matrix2 Strawberry.Math.Matrix4

Subtract static

void Subtract(ref Matrix4 matrix1, ref Matrix4 matrix2, out Matrix4 result)

Parameters:

Name Type Description
matrix1 ref Strawberry.Math.Matrix4
matrix2 ref Strawberry.Math.Matrix4
result out Strawberry.Math.Matrix4

Transpose static

Matrix4 Transpose(Matrix4 matrix)

Parameters:

Name Type Description
matrix Strawberry.Math.Matrix4

Transpose static

void Transpose(ref Matrix4 matrix, out Matrix4 result)

Parameters:

Name Type Description
matrix ref Strawberry.Math.Matrix4
result out Strawberry.Math.Matrix4

Determinant

float Determinant()

Equals

bool Equals(Matrix4 other)

Parameters:

Name Type Description
other Strawberry.Math.Matrix4

Equals override

bool Equals(object obj)

Parameters:

Name Type Description
obj System.Object

GetHashCode override

int GetHashCode()

ToString override

string ToString()

Operators

op_Addition static

Matrix4 op_Addition(Matrix4 matrix1, Matrix4 matrix2)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
matrix2 Strawberry.Math.Matrix4

op_Division static

Matrix4 op_Division(Matrix4 matrix1, Matrix4 matrix2)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
matrix2 Strawberry.Math.Matrix4

op_Division static

Matrix4 op_Division(Matrix4 matrix1, float divider)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
divider System.Single

op_Equality static

bool op_Equality(Matrix4 matrix1, Matrix4 matrix2)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
matrix2 Strawberry.Math.Matrix4

op_Inequality static

bool op_Inequality(Matrix4 matrix1, Matrix4 matrix2)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
matrix2 Strawberry.Math.Matrix4

op_Multiply static

Matrix4 op_Multiply(Matrix4 matrix1, Matrix4 matrix2)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
matrix2 Strawberry.Math.Matrix4

op_Multiply static

Matrix4 op_Multiply(Matrix4 matrix, float scaleFactor)

Parameters:

Name Type Description
matrix Strawberry.Math.Matrix4
scaleFactor System.Single

op_Multiply static

Matrix4 op_Multiply(float scaleFactor, Matrix4 matrix)

Parameters:

Name Type Description
scaleFactor System.Single
matrix Strawberry.Math.Matrix4

op_Subtraction static

Matrix4 op_Subtraction(Matrix4 matrix1, Matrix4 matrix2)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4
matrix2 Strawberry.Math.Matrix4

op_UnaryNegation static

Matrix4 op_UnaryNegation(Matrix4 matrix1)

Parameters:

Name Type Description
matrix1 Strawberry.Math.Matrix4