C# Класс Accord.Math.Vector3

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
X float
Y float
Z float

Открытые методы

Метод Описание
Abs ( ) : Vector3

Calculate absolute values of the vector.

Add ( Vector3 vector1, Vector3 vector2 ) : Vector3

Adds corresponding coordinates of two vectors.

Add ( Vector3 vector, float value ) : Vector3

Adds a value to all coordinates of the specified vector.

Cross ( Vector3 vector1, Vector3 vector2 ) : Vector3

Calculates cross product of two vectors.

Divide ( Vector3 vector1, Vector3 vector2 ) : Vector3

Divides corresponding coordinates of two vectors.

Divide ( Vector3 vector, float factor ) : Vector3

Divides coordinates of the specified vector by the specified factor.

Dot ( Vector3 vector1, Vector3 vector2 ) : float

Calculates dot product of two vectors.

Equals ( Object obj ) : bool

Tests whether the vector equals to the specified object.

Equals ( Vector3 vector ) : bool

Tests whether the vector equals to the specified one.

GetHashCode ( ) : int

Returns the hashcode for this instance.

Inverse ( ) : Vector3

Inverse the vector.

Multiply ( Vector3 vector1, Vector3 vector2 ) : Vector3

Multiplies corresponding coordinates of two vectors.

Multiply ( Vector3 vector, float factor ) : Vector3

Multiplies coordinates of the specified vector by the specified factor.

Normalize ( ) : float

Normalizes the vector by dividing it’s all coordinates with the vector's norm.

Subtract ( Vector3 vector1, Vector3 vector2 ) : Vector3

Subtracts corresponding coordinates of two vectors.

Subtract ( Vector3 vector, float value ) : Vector3

Subtracts a value from all coordinates of the specified vector.

ToArray ( ) : float[]

Returns array representation of the vector.

ToString ( ) : string

Returns a string representation of this object.

ToVector4 ( ) : Vector4

Converts the vector to a 4D vector.

The method returns a 4D vector which has X, Y and Z coordinates equal to the coordinates of this 3D vector and W coordinate set to 1.0.

Vector3 ( float value ) : System

Initializes a new instance of the Vector3 structure.

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

Initializes a new instance of the Vector3 structure.

operator ( ) : Vector3

Adds corresponding coordinates of two vectors.

operator ( ) : bool

Tests whether two specified vectors are equal.

Описание методов

Abs() публичный Метод

Calculate absolute values of the vector.
public Abs ( ) : Vector3
Результат Vector3

Add() публичный статический Метод

Adds corresponding coordinates of two vectors.
public static Add ( Vector3 vector1, Vector3 vector2 ) : Vector3
vector1 Vector3 The vector to add to.
vector2 Vector3 The vector to add to the first vector.
Результат Vector3

Add() публичный статический Метод

Adds a value to all coordinates of the specified vector.
public static Add ( Vector3 vector, float value ) : Vector3
vector Vector3 Vector to add the specified value to.
value float Value to add to all coordinates of the vector.
Результат Vector3

Cross() публичный статический Метод

Calculates cross product of two vectors.
public static Cross ( Vector3 vector1, Vector3 vector2 ) : Vector3
vector1 Vector3 First vector to use for cross product calculation.
vector2 Vector3 Second vector to use for cross product calculation.
Результат Vector3

Divide() публичный статический Метод

Divides corresponding coordinates of two vectors.
public static Divide ( Vector3 vector1, Vector3 vector2 ) : Vector3
vector1 Vector3 The first vector to divide.
vector2 Vector3 The second vector to devide.
Результат Vector3

Divide() публичный статический Метод

Divides coordinates of the specified vector by the specified factor.
public static Divide ( Vector3 vector, float factor ) : Vector3
vector Vector3 Vector to divide coordinates of.
factor float Factor to divide coordinates of the specified vector by.
Результат Vector3

Dot() публичный статический Метод

Calculates dot product of two vectors.
public static Dot ( Vector3 vector1, Vector3 vector2 ) : float
vector1 Vector3 First vector to use for dot product calculation.
vector2 Vector3 Second vector to use for dot product calculation.
Результат float

Equals() публичный Метод

Tests whether the vector equals to the specified object.
public Equals ( Object obj ) : bool
obj Object The object to test equality with.
Результат bool

Equals() публичный Метод

Tests whether the vector equals to the specified one.
public Equals ( Vector3 vector ) : bool
vector Vector3 The vector to test equality with.
Результат bool

GetHashCode() публичный Метод

Returns the hashcode for this instance.
public GetHashCode ( ) : int
Результат int

Inverse() публичный Метод

Inverse the vector.
public Inverse ( ) : Vector3
Результат Vector3

Multiply() публичный статический Метод

Multiplies corresponding coordinates of two vectors.
public static Multiply ( Vector3 vector1, Vector3 vector2 ) : Vector3
vector1 Vector3 The first vector to multiply.
vector2 Vector3 The second vector to multiply.
Результат Vector3

Multiply() публичный статический Метод

Multiplies coordinates of the specified vector by the specified factor.
public static Multiply ( Vector3 vector, float factor ) : Vector3
vector Vector3 Vector to multiply coordinates of.
factor float Factor to multiple coordinates of the specified vector by.
Результат Vector3

Normalize() публичный Метод

Normalizes the vector by dividing it’s all coordinates with the vector's norm.
public Normalize ( ) : float
Результат float

Subtract() публичный статический Метод

Subtracts corresponding coordinates of two vectors.
public static Subtract ( Vector3 vector1, Vector3 vector2 ) : Vector3
vector1 Vector3 The vector to subtract from.
vector2 Vector3 The vector to subtract from the first vector.
Результат Vector3

Subtract() публичный статический Метод

Subtracts a value from all coordinates of the specified vector.
public static Subtract ( Vector3 vector, float value ) : Vector3
vector Vector3 Vector to subtract the specified value from.
value float Value to subtract from all coordinates of the vector.
Результат Vector3

ToArray() публичный Метод

Returns array representation of the vector.
public ToArray ( ) : float[]
Результат float[]

ToString() публичный Метод

Returns a string representation of this object.
public ToString ( ) : string
Результат string

ToVector4() публичный Метод

Converts the vector to a 4D vector.

The method returns a 4D vector which has X, Y and Z coordinates equal to the coordinates of this 3D vector and W coordinate set to 1.0.

public ToVector4 ( ) : Vector4
Результат Vector4

Vector3() публичный Метод

Initializes a new instance of the Vector3 structure.
public Vector3 ( float value ) : System
value float Value, which is set to all 3 coordinates of the vector.
Результат System

Vector3() публичный Метод

Initializes a new instance of the Vector3 structure.
public Vector3 ( float x, float y, float z ) : System
x float X coordinate of the vector.
y float Y coordinate of the vector.
z float Z coordinate of the vector.
Результат System

operator() публичный статический Метод

Adds corresponding coordinates of two vectors.
public static operator ( ) : Vector3
Результат Vector3

operator() публичный статический Метод

Tests whether two specified vectors are equal.
public static operator ( ) : bool
Результат bool

Описание свойств

X публичное свойство

X coordinate of the vector.
public float X
Результат float

Y публичное свойство

Y coordinate of the vector.
public float Y
Результат float

Z публичное свойство

Z coordinate of the vector.
public float Z
Результат float