Class Matrix
- Namespace
- Graphene
- Assembly
- Graphene-1.0.dll
public sealed class Matrix : BoxedRecord, GTypeProvider, InstanceFactory, IEquatable<Matrix>, IDisposable
- Inheritance
-
Matrix
- Implements
- Inherited Members
Constructors
Matrix()
public Matrix()
Matrix(MatrixOwnedHandle)
public Matrix(MatrixOwnedHandle handle)
Parameters
handleMatrixOwnedHandle
Properties
Handle
public MatrixOwnedHandle Handle { get; }
Property Value
Methods
Alloc()
[Version("1.0")]
public static Matrix Alloc()
Returns
Decompose(out Vec3, out Vec3, out Quaternion, out Vec3, out Vec4)
public bool Decompose(out Vec3 translate, out Vec3 scale, out Quaternion rotate, out Vec3 shear, out Vec4 perspective)
Parameters
translateVec3scaleVec3rotateQuaternionshearVec3perspectiveVec4
Returns
Determinant()
[Version("1.0")]
public float Determinant()
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Equal(Matrix)
[Version("1.10")]
public bool Equal(Matrix b)
Parameters
bMatrix
Returns
EqualFast(Matrix)
[Version("1.10")]
public bool EqualFast(Matrix b)
Parameters
bMatrix
Returns
Equals(Matrix?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Matrix? other)
Parameters
otherMatrixAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
Free()
[Version("1.0")]
public void Free()
GetGType()
public static Type GetGType()
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetRow(uint, out Vec4)
[Version("1.0")]
public void GetRow(uint index, out Vec4 res)
Parameters
GetValue(uint, uint)
[Version("1.0")]
public float GetValue(uint row, uint col)
Parameters
Returns
GetXScale()
[Version("1.0")]
public float GetXScale()
Returns
GetXTranslation()
[Version("1.10")]
public float GetXTranslation()
Returns
GetYScale()
[Version("1.0")]
public float GetYScale()
Returns
GetYTranslation()
[Version("1.10")]
public float GetYTranslation()
Returns
GetZScale()
[Version("1.0")]
public float GetZScale()
Returns
GetZTranslation()
[Version("1.10")]
public float GetZTranslation()
Returns
InitFrom2d(double, double, double, double, double, double)
[Version("1.0")]
public Matrix InitFrom2d(double xx, double yx, double xy, double yy, double x0, double y0)
Parameters
Returns
InitFromMatrix(Matrix)
[Version("1.0")]
public Matrix InitFromMatrix(Matrix src)
Parameters
srcMatrix
Returns
InitFromVec4(Vec4, Vec4, Vec4, Vec4)
[Version("1.0")]
public Matrix InitFromVec4(Vec4 v0, Vec4 v1, Vec4 v2, Vec4 v3)
Parameters
Returns
InitFrustum(float, float, float, float, float, float)
[Version("1.2")]
public Matrix InitFrustum(float left, float right, float bottom, float top, float zNear, float zFar)
Parameters
Returns
InitIdentity()
[Version("1.0")]
public Matrix InitIdentity()
Returns
InitLookAt(Vec3, Vec3, Vec3)
[Version("1.0")]
public Matrix InitLookAt(Vec3 eye, Vec3 center, Vec3 up)
Parameters
Returns
InitOrtho(float, float, float, float, float, float)
[Version("1.0")]
public Matrix InitOrtho(float left, float right, float top, float bottom, float zNear, float zFar)
Parameters
Returns
InitPerspective(float, float, float, float)
[Version("1.0")]
public Matrix InitPerspective(float fovy, float aspect, float zNear, float zFar)
Parameters
Returns
InitRotate(float, Vec3)
[Version("1.0")]
public Matrix InitRotate(float angle, Vec3 axis)
Parameters
Returns
InitScale(float, float, float)
[Version("1.0")]
public Matrix InitScale(float x, float y, float z)
Parameters
Returns
InitSkew(float, float)
[Version("1.0")]
public Matrix InitSkew(float xSkew, float ySkew)
Parameters
Returns
InitTranslate(Point3D)
[Version("1.0")]
public Matrix InitTranslate(Point3D p)
Parameters
pPoint3D
Returns
Interpolate(Matrix, double, out Matrix)
[Version("1.0")]
public void Interpolate(Matrix b, double factor, out Matrix res)
Parameters
Inverse(out Matrix)
[Version("1.0")]
public bool Inverse(out Matrix res)
Parameters
resMatrix
Returns
Is2d()
[Version("1.0")]
public bool Is2d()
Returns
IsBackfaceVisible()
[Version("1.0")]
public bool IsBackfaceVisible()
Returns
IsIdentity()
[Version("1.0")]
public bool IsIdentity()
Returns
IsSingular()
[Version("1.0")]
public bool IsSingular()
Returns
Multiply(Matrix, out Matrix)
[Version("1.0")]
public void Multiply(Matrix b, out Matrix res)
Parameters
Near(Matrix, float)
[Version("1.10")]
public bool Near(Matrix b, float epsilon)
Parameters
Returns
Normalize(out Matrix)
[Version("1.0")]
public void Normalize(out Matrix res)
Parameters
resMatrix
Perspective(float, out Matrix)
[Version("1.0")]
public void Perspective(float depth, out Matrix res)
Parameters
Print()
[Version("1.0")]
public void Print()
ProjectPoint(Point, out Point)
[Version("1.0")]
public void ProjectPoint(Point p, out Point res)
Parameters
ProjectRect(Rect, out Quad)
[Version("1.2")]
public void ProjectRect(Rect r, out Quad res)
Parameters
ProjectRectBounds(Rect, out Rect)
[Version("1.0")]
public void ProjectRectBounds(Rect r, out Rect res)
Parameters
Rotate(float, Vec3)
[Version("1.0")]
public void Rotate(float angle, Vec3 axis)
Parameters
RotateEuler(Euler)
[Version("1.2")]
public void RotateEuler(Euler e)
Parameters
eEuler
RotateQuaternion(Quaternion)
[Version("1.2")]
public void RotateQuaternion(Quaternion q)
Parameters
RotateX(float)
[Version("1.0")]
public void RotateX(float angle)
Parameters
anglefloat
RotateY(float)
[Version("1.0")]
public void RotateY(float angle)
Parameters
anglefloat
RotateZ(float)
[Version("1.0")]
public void RotateZ(float angle)
Parameters
anglefloat
Scale(float, float, float)
[Version("1.0")]
public void Scale(float factorX, float factorY, float factorZ)
Parameters
SkewXy(float)
[Version("1.0")]
public void SkewXy(float factor)
Parameters
factorfloat
SkewXz(float)
[Version("1.0")]
public void SkewXz(float factor)
Parameters
factorfloat
SkewYz(float)
[Version("1.0")]
public void SkewYz(float factor)
Parameters
factorfloat
To2d(out double, out double, out double, out double, out double, out double)
[Version("1.0")]
public bool To2d(out double xx, out double yx, out double xy, out double yy, out double x0, out double y0)
Parameters
Returns
TransformBounds(Rect, out Rect)
[Version("1.0")]
public void TransformBounds(Rect r, out Rect res)
Parameters
TransformBox(Box, out Box)
[Version("1.2")]
public void TransformBox(Box b, out Box res)
Parameters
TransformPoint(Point, out Point)
[Version("1.0")]
public void TransformPoint(Point p, out Point res)
Parameters
TransformPoint3d(Point3D, out Point3D)
[Version("1.2")]
public void TransformPoint3d(Point3D p, out Point3D res)
Parameters
TransformRay(Ray, out Ray)
[Version("1.4")]
public void TransformRay(Ray r, out Ray res)
Parameters
TransformRect(Rect, out Quad)
[Version("1.0")]
public void TransformRect(Rect r, out Quad res)
Parameters
TransformSphere(Sphere, out Sphere)
[Version("1.2")]
public void TransformSphere(Sphere s, out Sphere res)
Parameters
TransformVec3(Vec3, out Vec3)
[Version("1.0")]
public void TransformVec3(Vec3 v, out Vec3 res)
Parameters
TransformVec4(Vec4, out Vec4)
[Version("1.0")]
public void TransformVec4(Vec4 v, out Vec4 res)
Parameters
Translate(Point3D)
[Version("1.0")]
public void Translate(Point3D pos)
Parameters
posPoint3D
Transpose(out Matrix)
[Version("1.0")]
public void Transpose(out Matrix res)
Parameters
resMatrix
UnprojectPoint3d(Matrix, Point3D, out Point3D)
[Version("1.2")]
public void UnprojectPoint3d(Matrix modelview, Point3D point, out Point3D res)
Parameters
UntransformBounds(Rect, Rect, out Rect)
[Version("1.0")]
public void UntransformBounds(Rect r, Rect bounds, out Rect res)
Parameters
UntransformPoint(Point, Rect, out Point)
[Version("1.0")]
public bool UntransformPoint(Point p, Rect bounds, out Point res)