Click or drag to resize

Vector3 Structure

Represents a 3D vector using three double-precision floating-point numbers.

Namespace:  Internal.Net3dBool
Assembly:  NeoAxis.Core (in NeoAxis.Core.dll) Version: 2024.1.1.0 (2024.1.1.0)
Syntax
C#
[SerializableAttribute]
public struct Vector3 : IEquatable<Vector3>

The Vector3 type exposes the following members.

Constructors
  NameDescription
Public methodVector3(Double)
Initializes a new instance of the Vector3 class
Public methodVector3(Vector3)
Constructs a new instance from the given Vector3d.
Public methodVector3(Double, Double, Double)
Constructs a new Vector3.
Top
Properties
  NameDescription
Public propertyItem
Public propertyLength
Gets the length (magnitude) of the vector.
Public propertyLengthSquared
Gets the square of the vector length (magnitude).
Top
Methods
  NameDescription
Public methodStatic memberAdd(Vector3, Vector3)
Adds two vectors.
Public methodStatic memberAdd(Vector3, Vector3, Vector3)
Adds two vectors.
Public methodStatic memberBaryCentric(Vector3, Vector3, Vector3, Double, Double)
Interpolate 3 Vectors using Barycentric coordinates
Public methodStatic memberBaryCentric(Vector3, Vector3, Vector3, Double, Double, Vector3)
Interpolate 3 Vectors using Barycentric coordinates
Public methodStatic memberCalculateAngle(Vector3, Vector3)
Calculates the angle (in radians) between two vectors.
Public methodStatic memberCalculateAngle(Vector3, Vector3, Double)
Calculates the angle (in radians) between two vectors.
Public methodStatic memberClamp(Vector3, Vector3, Vector3)
Clamp a vector to the given minimum and maximum vectors
Public methodStatic memberClamp(Vector3, Vector3, Vector3, Vector3)
Clamp a vector to the given minimum and maximum vectors
Public methodStatic memberCollinear
Checks if 3 points are collinear (all lie on the same line).
Public methodStatic memberComponentMax(Vector3)
Public methodStatic memberComponentMax(Vector3, Vector3)
Calculate the component-wise maximum of two vectors
Public methodStatic memberComponentMax(Vector3, Vector3, Vector3)
Calculate the component-wise maximum of two vectors
Public methodStatic memberComponentMin(Vector3)
Public methodStatic memberComponentMin(Vector3, Vector3)
Calculate the component-wise minimum of two vectors
Public methodStatic memberComponentMin(Vector3, Vector3, Vector3)
Calculate the component-wise minimum of two vectors
Public methodStatic memberCross(Vector3, Vector3)
Caclulate the cross (vector) product of two vectors
Public methodStatic memberCross(Vector3, Vector3, Vector3)
Caclulate the cross (vector) product of two vectors
Public methodStatic memberDivide(Vector3, Vector3)
Divides a vector by the components of a vector (scale).
Public methodStatic memberDivide(Vector3, Double)
Divides a vector by a scalar.
Public methodStatic memberDivide(Vector3, Vector3, Vector3)
Divide a vector by the components of a vector (scale).
Public methodStatic memberDivide(Vector3, Double, Vector3)
Divides a vector by a scalar.
Public methodStatic memberDot(Vector3, Vector3)
Calculate the dot (scalar) product of two vectors
Public methodStatic memberDot(Vector3, Vector3, Double)
Calculate the dot (scalar) product of two vectors
Public methodEquals(Object)
Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Vector3)
Indicates whether the current vector is equal to another vector.
Public methodEquals(Vector3, Double)
Indicates whether this instance and a specified object are equal within an error range.
Public methodGetHashCode
Returns the hashcode for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetNormal
Returns a normalized Vector of this.
Public methodStatic memberGetPerpendicular
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberLerp(Vector3, Vector3, Double)
Returns a new Vector that is the linear blend of the 2 given Vectors
Public methodStatic memberLerp(Vector3, Vector3, Double, Vector3)
Returns a new Vector that is the linear blend of the 2 given Vectors
Public methodStatic memberMax
Returns the Vector3d with the minimum magnitude
Public methodStatic memberMin
Returns the Vector3d with the minimum magnitude
Public methodStatic memberMultiply(Vector3, Vector3)
Multiplies a vector by the components a vector (scale).
Public methodStatic memberMultiply(Vector3, Double)
Multiplies a vector by a scalar.
Public methodStatic memberMultiply(Vector3, Vector3, Vector3)
Multiplies a vector by the components of a vector (scale).
Public methodStatic memberMultiply(Vector3, Double, Vector3)
Multiplies a vector by a scalar.
Public methodNormalize
Scales the Vector3d to unit length.
Public methodStatic memberNormalize(Vector3)
Scale a vector to unit length
Public methodStatic memberNormalize(Vector3, Vector3)
Scale a vector to unit length
Public methodStatic memberSubtract(Vector3, Vector3)
Subtract one Vector from another
Public methodStatic memberSubtract(Vector3, Vector3, Vector3)
Subtract one Vector from another
Public methodToArray
Public methodToString
Returns a System.String that represents the current Vector3.
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberAddition
Adds two instances.
Public operatorStatic memberDivision(Double, Vector3)
Creates a new vector which is the numerator devided by each component of the vector.
Public operatorStatic memberDivision(Vector3, Double)
Divides an instance by a scalar.
Public operatorStatic memberEquality
Compares two instances for equality.
Public operatorStatic memberInequality
Compares two instances for inequality.
Public operatorStatic memberMultiply(Double, Vector3)
Multiplies an instance by a scalar.
Public operatorStatic memberMultiply(Vector3, Vector3)
Component wise multiply two vectors together, x*x, y*y, z*z.
Public operatorStatic memberMultiply(Vector3, Double)
Multiplies an instance by a scalar.
Public operatorStatic memberSubtraction
Subtracts two instances.
Public operatorStatic memberUnaryNegation
Negates an instance.
Top
Fields
  NameDescription
Public fieldStatic memberNegativeInfinity
Defines an instance with all components set to negative infinity.
Public fieldStatic memberOne
Defines an instance with all components set to 1.
Public fieldStatic memberPositiveInfinity
Defines an instance with all components set to positive infinity.
Public fieldStatic memberSizeInBytes
Defines the size of the Vector3d struct in bytes.
Public fieldStatic memberUnitX
Defines a unit-length Vector3d that points towards the X-axis.
Public fieldStatic memberUnitY
Defines a unit-length Vector3d that points towards the Y-axis.
Public fieldStatic memberUnitZ
/// Defines a unit-length Vector3d that points towards the Z-axis.
Public fieldx
The X component of the Vector3.
Public fieldy
The Y component of the Vector3.
Public fieldz
The Z component of the Vector3.
Public fieldStatic memberZero
Defines a zero-length Vector3.
Top
Extension Methods
See Also