C# 클래스 OpenBveApi.Math.Vector3

Represents a three-dimensional vector.
파일 보기 프로젝트 열기: leezer3/OpenBVE 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Backward Vector3
Down Vector3
Forward Vector3
Left Vector3
Null Vector3
Right Vector3
Up Vector3
X double
Y double
Z double

공개 메소드들

메소드 설명
AreColinear ( Vector3 a, Vector3 b, Vector3 c ) : bool

Checks whether three spatial coordinates are colinear.

CosineInterpolate ( Vector3 Vector1, Vector3 Vector2, double mu ) : Vector3

Interpolates between two Vector3 values using a simple Cosine algorithm

CreateNormal ( Vector3 a, Vector3 b, Vector3 c, Vector3 &normal ) : bool

Creates a unit vector perpendicular to the plane described by three spatial coordinates, suitable for being a surface normal.

Cross ( Vector3 a, Vector3 b ) : Vector3

Gives the cross product of two vectors.

Dot ( Vector3 a, Vector3 b ) : double

Gives the dot product of two vectors.

GetVector3 ( Vector2 Vector, double Y ) : Vector3

Returns a normalized vector based on a 2D vector in the XZ plane and an additional Y-coordinate.

IsNullVector ( ) : bool

Checks whether the vector is a null vector.

IsNullVector ( Vector3 vector ) : bool

Checks whether a vector is a null vector.

IsNullVector ( double tolerance ) : bool

Checks whether the vector is considered a null vector.

IsZero ( Vector3 Vector ) : bool

Determines whether this is a zero (0,0,0) vector

LinearInterpolate ( Vector3 Vector1, Vector3 Vector2, double mu ) : Vector3

Linearly interpolates between two vectors

Norm ( ) : double

Gets the euclidean norm.

Norm ( Vector3 vector ) : double

Gets the euclidean norm of the specified vector.

NormSquared ( ) : double

Gets the square of the euclidean norm.

NormSquared ( Vector3 vector ) : double

Gets the square of the euclidean norm of the specified vector.

Normalize ( Vector3 vector ) : Vector3

Normalizes a vector.

Normalize ( ) : void

Normalizes the vector.

Rotate ( Vector3 vector, Orientation3 orientation ) : Vector3

Rotates a vector from the default orientation into a specified orientation.

The default orientation is X = {1, 0, 0), Y = {0, 1, 0} and Z = {0, 0, 1}.

Rotate ( Vector3 vector, Vector3 direction, double cosineOfAngle, double sineOfAngle ) : Vector3

Rotates a vector on the plane perpendicular to a specified direction by a specified angle.

Rotate ( Orientation3 orientation ) : void

Rotates the vector from the default orientation into a specified orientation.

The default orientation is X = {1, 0, 0), Y = {0, 1, 0} and Z = {0, 0, 1}.

Rotate ( Vector3 direction, double cosineOfAngle, double sineOfAngle ) : void

Rotates the vector on the plane perpendicular to a specified direction by a specified angle.

Scale ( Vector3 vector, Vector3 factor ) : Vector3

Scales a vector by a specified factor.

Scale ( Vector3 factor ) : void

Scales the vector by a specified factor.

ToString ( ) : string

Returns the representation of the vector in string format

Translate ( Vector3 vector, Orientation3 orientation, Vector3 offset ) : Vector3

Translates a vector by a specified offset that is measured along a specified orientation.

Translate ( Vector3 vector, Vector3 offset ) : Vector3

Translates a vector by a specified offset.

Translate ( Orientation3 orientation, Vector3 offset ) : void

Translates the vector by a specified offset that is measured in a specified orientation.

Translate ( Vector3 offset ) : void

Translates the vector by a specified offset.

Vector3 ( double x, double y, double z ) : System

Creates a new three-dimensional vector.

operator ( ) : Vector3

Adds two vectors.

operator ( ) : bool

Checks whether the two specified vectors are equal.

메소드 상세

AreColinear() 공개 정적인 메소드

Checks whether three spatial coordinates are colinear.
public static AreColinear ( Vector3 a, Vector3 b, Vector3 c ) : bool
a Vector3 The first spatial coordinate.
b Vector3 The second spatial coordinate.
c Vector3 The third spatial coordinate.
리턴 bool

CosineInterpolate() 공개 정적인 메소드

Interpolates between two Vector3 values using a simple Cosine algorithm
public static CosineInterpolate ( Vector3 Vector1, Vector3 Vector2, double mu ) : Vector3
Vector1 Vector3 The first vector
Vector2 Vector3 The second vector
mu double The position on the curve of the new vector
리턴 Vector3

CreateNormal() 공개 정적인 메소드

Creates a unit vector perpendicular to the plane described by three spatial coordinates, suitable for being a surface normal.
public static CreateNormal ( Vector3 a, Vector3 b, Vector3 c, Vector3 &normal ) : bool
a Vector3 The first spatial coordinate.
b Vector3 The second spatial coordinate.
c Vector3 The third spatial coordinate.
normal Vector3 On success, receives the vector perpendicular to the described plane. On failure, receives Vector3.Up.
리턴 bool

Cross() 공개 정적인 메소드

Gives the cross product of two vectors.
public static Cross ( Vector3 a, Vector3 b ) : Vector3
a Vector3 The first vector.
b Vector3 The second vector.
리턴 Vector3

Dot() 공개 정적인 메소드

Gives the dot product of two vectors.
public static Dot ( Vector3 a, Vector3 b ) : double
a Vector3 The first vector.
b Vector3 The second vector.
리턴 double

GetVector3() 공개 정적인 메소드

Returns a normalized vector based on a 2D vector in the XZ plane and an additional Y-coordinate.
public static GetVector3 ( Vector2 Vector, double Y ) : Vector3
Vector Vector2 The vector in the XZ-plane. The X and Y components in Vector represent the X- and Z-coordinates, respectively.
Y double The Y-coordinate.
리턴 Vector3

IsNullVector() 공개 메소드

Checks whether the vector is a null vector.
public IsNullVector ( ) : bool
리턴 bool

IsNullVector() 공개 정적인 메소드

Checks whether a vector is a null vector.
public static IsNullVector ( Vector3 vector ) : bool
vector Vector3
리턴 bool

IsNullVector() 공개 메소드

Checks whether the vector is considered a null vector.
public IsNullVector ( double tolerance ) : bool
tolerance double The highest absolute value that each component of the vector may have before the vector is not considered a null vector.
리턴 bool

IsZero() 공개 정적인 메소드

Determines whether this is a zero (0,0,0) vector
public static IsZero ( Vector3 Vector ) : bool
Vector Vector3
리턴 bool

LinearInterpolate() 공개 정적인 메소드

Linearly interpolates between two vectors
public static LinearInterpolate ( Vector3 Vector1, Vector3 Vector2, double mu ) : Vector3
Vector1 Vector3 The first vector
Vector2 Vector3 The second vector
mu double The position on the interpolation curve of the new vector
리턴 Vector3

Norm() 공개 메소드

Gets the euclidean norm.
public Norm ( ) : double
리턴 double

Norm() 공개 정적인 메소드

Gets the euclidean norm of the specified vector.
public static Norm ( Vector3 vector ) : double
vector Vector3 The vector.
리턴 double

NormSquared() 공개 메소드

Gets the square of the euclidean norm.
public NormSquared ( ) : double
리턴 double

NormSquared() 공개 정적인 메소드

Gets the square of the euclidean norm of the specified vector.
public static NormSquared ( Vector3 vector ) : double
vector Vector3 The vector.
리턴 double

Normalize() 공개 정적인 메소드

Normalizes a vector.
Raised when the vector is a null vector.
public static Normalize ( Vector3 vector ) : Vector3
vector Vector3 The vector.
리턴 Vector3

Normalize() 공개 메소드

Normalizes the vector.
Raised when the vector is a null vector.
public Normalize ( ) : void
리턴 void

Rotate() 공개 정적인 메소드

Rotates a vector from the default orientation into a specified orientation.
The default orientation is X = {1, 0, 0), Y = {0, 1, 0} and Z = {0, 0, 1}.
public static Rotate ( Vector3 vector, Orientation3 orientation ) : Vector3
vector Vector3 The vector.
orientation Orientation3 The orientation.
리턴 Vector3

Rotate() 공개 정적인 메소드

Rotates a vector on the plane perpendicular to a specified direction by a specified angle.
public static Rotate ( Vector3 vector, Vector3 direction, double cosineOfAngle, double sineOfAngle ) : Vector3
vector Vector3 The vector.
direction Vector3 The direction perpendicular to the plane on which to rotate.
cosineOfAngle double The cosine of the angle.
sineOfAngle double The sine of the angle.
리턴 Vector3

Rotate() 공개 메소드

Rotates the vector from the default orientation into a specified orientation.
The default orientation is X = {1, 0, 0), Y = {0, 1, 0} and Z = {0, 0, 1}.
public Rotate ( Orientation3 orientation ) : void
orientation Orientation3 The orientation.
리턴 void

Rotate() 공개 메소드

Rotates the vector on the plane perpendicular to a specified direction by a specified angle.
public Rotate ( Vector3 direction, double cosineOfAngle, double sineOfAngle ) : void
direction Vector3 The direction perpendicular to the plane on which to rotate.
cosineOfAngle double The cosine of the angle.
sineOfAngle double The sine of the angle.
리턴 void

Scale() 공개 정적인 메소드

Scales a vector by a specified factor.
public static Scale ( Vector3 vector, Vector3 factor ) : Vector3
vector Vector3 The vector.
factor Vector3 The factor.
리턴 Vector3

Scale() 공개 메소드

Scales the vector by a specified factor.
public Scale ( Vector3 factor ) : void
factor Vector3 The factor.
리턴 void

ToString() 공개 메소드

Returns the representation of the vector in string format
public ToString ( ) : string
리턴 string

Translate() 공개 정적인 메소드

Translates a vector by a specified offset that is measured along a specified orientation.
public static Translate ( Vector3 vector, Orientation3 orientation, Vector3 offset ) : Vector3
vector Vector3 The vector.
orientation Orientation3 The orientation.
offset Vector3 The offset measured in the specified orientation.
리턴 Vector3

Translate() 공개 정적인 메소드

Translates a vector by a specified offset.
public static Translate ( Vector3 vector, Vector3 offset ) : Vector3
vector Vector3 The vector.
offset Vector3 The offset.
리턴 Vector3

Translate() 공개 메소드

Translates the vector by a specified offset that is measured in a specified orientation.
public Translate ( Orientation3 orientation, Vector3 offset ) : void
orientation Orientation3 The orientation.
offset Vector3 The offset measured in the specified orientation.
리턴 void

Translate() 공개 메소드

Translates the vector by a specified offset.
public Translate ( Vector3 offset ) : void
offset Vector3 The offset.
리턴 void

Vector3() 공개 메소드

Creates a new three-dimensional vector.
public Vector3 ( double x, double y, double z ) : System
x double The x-coordinate.
y double The y-coordinate.
z double The z-coordinate.
리턴 System

operator() 공개 정적인 메소드

Adds two vectors.
public static operator ( ) : Vector3
리턴 Vector3

operator() 공개 정적인 메소드

Checks whether the two specified vectors are equal.
public static operator ( ) : bool
리턴 bool

프로퍼티 상세

Backward 공개적으로 정적으로 프로퍼티

Represents a vector pointing up.
public static Vector3 Backward
리턴 Vector3

Down 공개적으로 정적으로 프로퍼티

Represents a vector pointing down.
public static Vector3 Down
리턴 Vector3

Forward 공개적으로 정적으로 프로퍼티

Represents a vector pointing down.
public static Vector3 Forward
리턴 Vector3

Left 공개적으로 정적으로 프로퍼티

Represents a vector pointing left.
public static Vector3 Left
리턴 Vector3

Null 공개적으로 정적으로 프로퍼티

Represents a null vector.
public static Vector3 Null
리턴 Vector3

Right 공개적으로 정적으로 프로퍼티

Represents a vector pointing right.
public static Vector3 Right
리턴 Vector3

Up 공개적으로 정적으로 프로퍼티

Represents a vector pointing up.
public static Vector3 Up
리턴 Vector3

X 공개적으로 프로퍼티

The x-coordinate.
public double X
리턴 double

Y 공개적으로 프로퍼티

The y-coordinate.
public double Y
리턴 double

Z 공개적으로 프로퍼티

The z-coordinate.
public double Z
리턴 double