Click or drag to resize
Accord.NET (logo)

Vector3 Structure

3D Vector structure with X, Y and Z coordinates.

Namespace:  Accord.Math
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
[SerializableAttribute]
public struct Vector3
Request Example View Source

The Vector3 type exposes the following members.

Constructors
  NameDescription
Public methodVector3(Single)
Initializes a new instance of the Vector3 structure.
Public methodVector3(Single, Single, Single)
Initializes a new instance of the Vector3 structure.
Top
Properties
  NameDescription
Public propertyMax
Returns maximum value of the vector.
Public propertyMaxIndex
Returns index of the coordinate with maximum value.
Public propertyMin
Returns minimum value of the vector.
Public propertyMinIndex
Returns index of the coordinate with minimum value.
Public propertyNorm
Returns vector's norm.
Public propertySquare
Returns square of the vector's norm.
Top
Methods
  NameDescription
Public methodAbs
Calculate absolute values of the vector.
Public methodStatic memberAdd(Vector3, Vector3)
Adds corresponding coordinates of two vectors.
Public methodStatic memberAdd(Vector3, Single)
Adds a value to all coordinates of the specified vector.
Public methodStatic memberCross
Calculates cross product of two vectors.
Public methodStatic memberDivide(Vector3, Vector3)
Divides corresponding coordinates of two vectors.
Public methodStatic memberDivide(Vector3, Single)
Divides coordinates of the specified vector by the specified factor.
Public methodStatic memberDot
Calculates dot product of two vectors.
Public methodEquals(Object)
Tests whether the vector equals to the specified object.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Vector3)
Tests whether the vector equals to the specified one.
Public methodGetHashCode
Returns the hashcode for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInverse
Inverse the vector.
Public methodStatic memberMultiply(Vector3, Vector3)
Multiplies corresponding coordinates of two vectors.
Public methodStatic memberMultiply(Vector3, Single)
Multiplies coordinates of the specified vector by the specified factor.
Public methodNormalize
Normalizes the vector by dividing it’s all coordinates with the vector's norm.
Public methodStatic memberSubtract(Vector3, Vector3)
Subtracts corresponding coordinates of two vectors.
Public methodStatic memberSubtract(Vector3, Single)
Subtracts a value from all coordinates of the specified vector.
Public methodToArray
Returns array representation of the vector.
Public methodToString
Returns a string representation of this object.
(Overrides ValueTypeToString.)
Public methodToVector4
Converts the vector to a 4D vector.
Top
Operators
  NameDescription
Public operatorStatic memberAddition(Vector3, Vector3)
Adds corresponding coordinates of two vectors.
Public operatorStatic memberAddition(Vector3, Single)
Adds a value to all coordinates of the specified vector.
Public operatorStatic memberDivision(Vector3, Vector3)
Divides corresponding coordinates of two vectors.
Public operatorStatic memberDivision(Vector3, Single)
Divides coordinates of the specified vector by the specified factor.
Public operatorStatic memberEquality
Tests whether two specified vectors are equal.
Public operatorStatic memberInequality
Tests whether two specified vectors are not equal.
Public operatorStatic memberMultiply(Vector3, Vector3)
Multiplies corresponding coordinates of two vectors.
Public operatorStatic memberMultiply(Vector3, Single)
Multiplies coordinates of the specified vector by the specified factor.
Public operatorStatic memberSubtraction(Vector3, Vector3)
Subtracts corresponding coordinates of two vectors.
Public operatorStatic memberSubtraction(Vector3, Single)
Subtracts a value from all coordinates of the specified vector.
Top
Fields
  NameDescription
Public fieldX
X coordinate of the vector.
Public fieldY
Y coordinate of the vector.
Public fieldZ
Z coordinate of the vector.
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

The structure incapsulates X, Y and Z coordinates of a 3D vector and provides some operations with it.

See Also