C# Class Accord.Math.Vector3

Afficher le fichier Open project: accord-net/framework Class Usage Examples

Méthodes publiques

Свойство Type Description
X float
Y float
Z float

Méthodes publiques

Méthode Description
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.

Method Details

Abs() public méthode

Calculate absolute values of the vector.
public Abs ( ) : Vector3
Résultat Vector3

Add() public static méthode

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.
Résultat Vector3

Add() public static méthode

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.
Résultat Vector3

Cross() public static méthode

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.
Résultat Vector3

Divide() public static méthode

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.
Résultat Vector3

Divide() public static méthode

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.
Résultat Vector3

Dot() public static méthode

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.
Résultat float

Equals() public méthode

Tests whether the vector equals to the specified object.
public Equals ( Object obj ) : bool
obj Object The object to test equality with.
Résultat bool

Equals() public méthode

Tests whether the vector equals to the specified one.
public Equals ( Vector3 vector ) : bool
vector Vector3 The vector to test equality with.
Résultat bool

GetHashCode() public méthode

Returns the hashcode for this instance.
public GetHashCode ( ) : int
Résultat int

Inverse() public méthode

Inverse the vector.
public Inverse ( ) : Vector3
Résultat Vector3

Multiply() public static méthode

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.
Résultat Vector3

Multiply() public static méthode

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.
Résultat Vector3

Normalize() public méthode

Normalizes the vector by dividing it’s all coordinates with the vector's norm.
public Normalize ( ) : float
Résultat float

Subtract() public static méthode

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.
Résultat Vector3

Subtract() public static méthode

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.
Résultat Vector3

ToArray() public méthode

Returns array representation of the vector.
public ToArray ( ) : float[]
Résultat float[]

ToString() public méthode

Returns a string representation of this object.
public ToString ( ) : string
Résultat string

ToVector4() public méthode

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
Résultat Vector4

Vector3() public méthode

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.
Résultat System

Vector3() public méthode

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.
Résultat System

operator() public static méthode

Adds corresponding coordinates of two vectors.
public static operator ( ) : Vector3
Résultat Vector3

operator() public static méthode

Tests whether two specified vectors are equal.
public static operator ( ) : bool
Résultat bool

Property Details

X public_oe property

X coordinate of the vector.
public float X
Résultat float

Y public_oe property

Y coordinate of the vector.
public float Y
Résultat float

Z public_oe property

Z coordinate of the vector.
public float Z
Résultat float