C# Class PSSMDemo.MatrixHelper

Show file Open project: willcraftia/TestXna

Public Methods

Method Description
CreateLook ( Vector3 &position, Vector3 &direction, Vector3 &up, Matrix &result ) : void

カメラの位置、視線方向、UP ベクトルでビュー行列を生成します。 これは、Matrix.CreateLookAt(position, position + direction, up) と等価です。 なお、Matrix.CreateLookAt はその内部で position と target から direction を算出しています。

ExtractOrthographic ( Matrix &matrix, float &left, float &right, float &bottom, float &top, float &nearPlaneDistance, float &farPlaneDistance ) : bool
ExtractPerspective ( Matrix &matrix, float &fieldOfView, float &aspectRatio, float &left, float &right, float &bottom, float &top, float &nearPlaneDistance, float &farPlaneDistance ) : bool

Method Details

CreateLook() public static method

カメラの位置、視線方向、UP ベクトルでビュー行列を生成します。 これは、Matrix.CreateLookAt(position, position + direction, up) と等価です。 なお、Matrix.CreateLookAt はその内部で position と target から direction を算出しています。
public static CreateLook ( Vector3 &position, Vector3 &direction, Vector3 &up, Matrix &result ) : void
position Vector3
direction Vector3
up Vector3
result Matrix
return void

ExtractOrthographic() public static method

public static ExtractOrthographic ( Matrix &matrix, float &left, float &right, float &bottom, float &top, float &nearPlaneDistance, float &farPlaneDistance ) : bool
matrix Matrix
left float
right float
bottom float
top float
nearPlaneDistance float
farPlaneDistance float
return bool

ExtractPerspective() public static method

public static ExtractPerspective ( Matrix &matrix, float &fieldOfView, float &aspectRatio, float &left, float &right, float &bottom, float &top, float &nearPlaneDistance, float &farPlaneDistance ) : bool
matrix Matrix
fieldOfView float
aspectRatio float
left float
right float
bottom float
top float
nearPlaneDistance float
farPlaneDistance float
return bool