C# Class CSharpGL.glm

ファイルを表示 Open project: bitzhuwei/CSharpGL

Public Methods

Method Description
acos ( float x ) : float

acosh ( float x ) : float

asin ( float x ) : float

asinh ( float x ) : float

atan ( float y_over_x ) : float

atan ( float y, float x ) : float

atanh ( float x ) : float

cos ( float angle ) : float

cosh ( float angle ) : float

degrees ( float radians ) : float

frustum ( float left, float right, float bottom, float top, float nearVal, float farVal ) : CSharpGL.mat4

Creates a frustrum projection matrix.

infinitePerspective ( float fovy, float aspect, float zNear ) : CSharpGL.mat4

Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.

inverse ( CSharpGL.mat2 m ) : CSharpGL.mat2

Gets the inversed matrix.

获取逆矩阵。

inverse ( mat3 m ) : mat3

Gets the inversed matrix.

获取逆矩阵。

inverse ( CSharpGL.mat4 m ) : CSharpGL.mat4

Gets the inversed matrix.

获取逆矩阵。

lookAt ( vec2 eye, vec2 center, bool up ) : mat3

Build a look at view matrix. transform object's coordinate from world's space to camera's space.

lookAt ( vec3 eye, vec3 center, vec3 up ) : CSharpGL.mat4

Build a look at view matrix. transform object's coordinate from world's space to camera's space.

ortho ( float left, float right, float bottom, float top ) : CSharpGL.mat4

Creates a matrix for projecting two-dimensional coordinates onto the screen.

this equals ortho(left, right, bottom, top, -1, 1)

ortho ( float left, float right, float bottom, float top, float zNear, float zFar ) : CSharpGL.mat4

Creates a matrix for an orthographic parallel viewing volume.

perspective ( float fovy, float aspect, float zNear, float zFar ) : CSharpGL.mat4

Creates a perspective transformation matrix.

perspectiveFov ( float fov, float width, float height, float zNear, float zFar ) : CSharpGL.mat4

Builds a perspective projection matrix based on a field of view.

pickMatrix ( vec2 center, vec2 delta, vec4 viewport ) : CSharpGL.mat4

Define a picking region.

project ( vec3 modelPosition, CSharpGL.mat4 view, CSharpGL.mat4 proj, vec4 viewport ) : vec3

Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.

radians ( float degrees ) : float

rotate ( float angleDegree ) : mat3

rotate ( mat3 m, float angleDegree ) : mat3
rotate ( float angleDegree, vec3 v ) : CSharpGL.mat4

rotate ( CSharpGL.mat4 m, float angleDegree, vec3 v ) : CSharpGL.mat4

Builds a rotation 4 * 4 matrix created from an axis vector and an angle.

scale ( mat3 m, vec2 v ) : mat3

Applies a scale transformation to matrix m by vector v.

scale ( CSharpGL.mat4 m, vec3 v ) : CSharpGL.mat4

Applies a scale transformation to matrix m by vector v.

sin ( float angle ) : float

sinh ( float angle ) : float

tan ( float angle ) : float

tanh ( float angle ) : float

translate ( mat3 m, vec2 v ) : mat3

Applies a translation transformation to matrix m by vector v.

translate ( CSharpGL.mat4 m, vec3 v ) : CSharpGL.mat4

Applies a translation transformation to matrix m by vector v.

transpose ( CSharpGL.mat2 m ) : CSharpGL.mat2

Gets the transposed matrix.

获取转置矩阵。

transpose ( mat3 m ) : mat3

Gets the transposed matrix.

获取转置矩阵。

transpose ( CSharpGL.mat4 m ) : CSharpGL.mat4

Gets the transposed matrix.

获取转置矩阵。

tweakedInfinitePerspective ( float fovy, float aspect, float zNear ) : CSharpGL.mat4

Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.

unProject ( vec3 windowPos, CSharpGL.mat4 view, CSharpGL.mat4 proj, vec4 viewport ) : vec3

Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.

Method Details

acos() public static method

public static acos ( float x ) : float
x float
return float

acosh() public static method

public static acosh ( float x ) : float
x float
return float

asin() public static method

public static asin ( float x ) : float
x float
return float

asinh() public static method

public static asinh ( float x ) : float
x float
return float

atan() public static method

public static atan ( float y_over_x ) : float
y_over_x float
return float

atan() public static method

public static atan ( float y, float x ) : float
y float
x float
return float

atanh() public static method

public static atanh ( float x ) : float
x float
return float

cos() public static method

public static cos ( float angle ) : float
angle float
return float

cosh() public static method

public static cosh ( float angle ) : float
angle float
return float

degrees() public static method

public static degrees ( float radians ) : float
radians float
return float

frustum() public static method

Creates a frustrum projection matrix.
public static frustum ( float left, float right, float bottom, float top, float nearVal, float farVal ) : CSharpGL.mat4
left float The left.
right float The right.
bottom float The bottom.
top float The top.
nearVal float The near val.
farVal float The far val.
return CSharpGL.mat4

infinitePerspective() public static method

Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.
public static infinitePerspective ( float fovy, float aspect, float zNear ) : CSharpGL.mat4
fovy float The fovy.
aspect float The aspect.
zNear float The z near.
return CSharpGL.mat4

inverse() public static method

Gets the inversed matrix.

获取逆矩阵。

public static inverse ( CSharpGL.mat2 m ) : CSharpGL.mat2
m CSharpGL.mat2
return CSharpGL.mat2

inverse() public static method

Gets the inversed matrix.

获取逆矩阵。

public static inverse ( mat3 m ) : mat3
m mat3
return mat3

inverse() public static method

Gets the inversed matrix.

获取逆矩阵。

public static inverse ( CSharpGL.mat4 m ) : CSharpGL.mat4
m CSharpGL.mat4
return CSharpGL.mat4

lookAt() public static method

Build a look at view matrix. transform object's coordinate from world's space to camera's space.
public static lookAt ( vec2 eye, vec2 center, bool up ) : mat3
eye vec2 The eye.
center vec2 The center.
up bool Up.
return mat3

lookAt() public static method

Build a look at view matrix. transform object's coordinate from world's space to camera's space.
public static lookAt ( vec3 eye, vec3 center, vec3 up ) : CSharpGL.mat4
eye vec3 The eye.
center vec3 The center.
up vec3 Up.
return CSharpGL.mat4

ortho() public static method

Creates a matrix for projecting two-dimensional coordinates onto the screen.

this equals ortho(left, right, bottom, top, -1, 1)

public static ortho ( float left, float right, float bottom, float top ) : CSharpGL.mat4
left float The left.
right float The right.
bottom float The bottom.
top float The top.
return CSharpGL.mat4

ortho() public static method

Creates a matrix for an orthographic parallel viewing volume.
public static ortho ( float left, float right, float bottom, float top, float zNear, float zFar ) : CSharpGL.mat4
left float The left.
right float The right.
bottom float The bottom.
top float The top.
zNear float The z near.
zFar float The z far.
return CSharpGL.mat4

perspective() public static method

Creates a perspective transformation matrix.
public static perspective ( float fovy, float aspect, float zNear, float zFar ) : CSharpGL.mat4
fovy float The field of view angle, in radians.
aspect float The aspect ratio.
zNear float The near depth clipping plane.
zFar float The far depth clipping plane.
return CSharpGL.mat4

perspectiveFov() public static method

Builds a perspective projection matrix based on a field of view.
public static perspectiveFov ( float fov, float width, float height, float zNear, float zFar ) : CSharpGL.mat4
fov float The fov (in radians).
width float The width.
height float The height.
zNear float The z near.
zFar float The z far.
return CSharpGL.mat4

pickMatrix() public static method

Define a picking region.
public static pickMatrix ( vec2 center, vec2 delta, vec4 viewport ) : CSharpGL.mat4
center vec2 The center.
delta vec2 The delta.
viewport vec4 The viewport.
return CSharpGL.mat4

project() public static method

Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
public static project ( vec3 modelPosition, CSharpGL.mat4 view, CSharpGL.mat4 proj, vec4 viewport ) : vec3
modelPosition vec3 The object.
view CSharpGL.mat4 The view.
proj CSharpGL.mat4 The proj.
viewport vec4 The viewport.
return vec3

radians() public static method

public static radians ( float degrees ) : float
degrees float
return float

rotate() public static method

public static rotate ( float angleDegree ) : mat3
angleDegree float ANgle in Degree.
return mat3

rotate() public static method

public static rotate ( mat3 m, float angleDegree ) : mat3
m mat3 The m.
angleDegree float ANgle in Degree.
return mat3

rotate() public static method

public static rotate ( float angleDegree, vec3 v ) : CSharpGL.mat4
angleDegree float ANgle in Degree.
v vec3
return CSharpGL.mat4

rotate() public static method

Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
public static rotate ( CSharpGL.mat4 m, float angleDegree, vec3 v ) : CSharpGL.mat4
m CSharpGL.mat4 The m.
angleDegree float ANgle in Degree.
v vec3 The v.
return CSharpGL.mat4

scale() public static method

Applies a scale transformation to matrix m by vector v.
public static scale ( mat3 m, vec2 v ) : mat3
m mat3 The matrix to transform.
v vec2 The vector to scale by.
return mat3

scale() public static method

Applies a scale transformation to matrix m by vector v.
public static scale ( CSharpGL.mat4 m, vec3 v ) : CSharpGL.mat4
m CSharpGL.mat4 The matrix to transform.
v vec3 The vector to scale by.
return CSharpGL.mat4

sin() public static method

public static sin ( float angle ) : float
angle float
return float

sinh() public static method

public static sinh ( float angle ) : float
angle float
return float

tan() public static method

public static tan ( float angle ) : float
angle float
return float

tanh() public static method

public static tanh ( float angle ) : float
angle float
return float

translate() public static method

Applies a translation transformation to matrix m by vector v.
public static translate ( mat3 m, vec2 v ) : mat3
m mat3 The matrix to transform.
v vec2 The vector to translate by.
return mat3

translate() public static method

Applies a translation transformation to matrix m by vector v.
public static translate ( CSharpGL.mat4 m, vec3 v ) : CSharpGL.mat4
m CSharpGL.mat4 The matrix to transform.
v vec3 The vector to translate by.
return CSharpGL.mat4

transpose() public static method

Gets the transposed matrix.

获取转置矩阵。

public static transpose ( CSharpGL.mat2 m ) : CSharpGL.mat2
m CSharpGL.mat2
return CSharpGL.mat2

transpose() public static method

Gets the transposed matrix.

获取转置矩阵。

public static transpose ( mat3 m ) : mat3
m mat3
return mat3

transpose() public static method

Gets the transposed matrix.

获取转置矩阵。

public static transpose ( CSharpGL.mat4 m ) : CSharpGL.mat4
m CSharpGL.mat4
return CSharpGL.mat4

tweakedInfinitePerspective() public static method

Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
public static tweakedInfinitePerspective ( float fovy, float aspect, float zNear ) : CSharpGL.mat4
fovy float The fovy.
aspect float The aspect.
zNear float The z near.
return CSharpGL.mat4

unProject() public static method

Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
public static unProject ( vec3 windowPos, CSharpGL.mat4 view, CSharpGL.mat4 proj, vec4 viewport ) : vec3
windowPos vec3 The win.
view CSharpGL.mat4 The view.
proj CSharpGL.mat4 The proj.
viewport vec4 The viewport.
return vec3