# Vector3 Members

XNA Game Studio 4.0

The following tables list the members exposed by the Vector3 type.

## Public Constructors

NameDescription
Vector3Overloaded. Initializes a new instance of Vector3.

## Public Fields

NameDescription
XGets or sets the x-component of the vector.
YGets or sets the y-component of the vector.
ZGets or sets the z-component of the vector.

## Public Properties

NameDescription
BackwardReturns a unit Vector3 designating backward in a right-handed coordinate system (0, 0, 1).
DownReturns a unit Vector3 designating down (0, −1, 0).
ForwardReturns a unit Vector3 designating forward in a right-handed coordinate system(0, 0, −1).
LeftReturns a unit Vector3 designating left (−1, 0, 0).
OneReturns a Vector3 with ones in all of its components.
RightReturns a unit Vector3 pointing to the right (1, 0, 0).
UnitXReturns the x unit Vector3 (1, 0, 0).
UnitY Returns the y unit Vector3 (0, 1, 0).
UnitZ Returns the z unit Vector3 (0, 0, 1).
UpReturns a unit vector designating up (0, 1, 0).
ZeroReturns a Vector3 with all of its components set to zero.

## Public Methods

NameDescription
BarycentricOverloaded. Returns a Vector3 containing the 3D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 3D triangle.
CatmullRomOverloaded. Performs a Catmull-Rom interpolation using the specified positions.
ClampOverloaded. Restricts a value to be within a specified range.
CrossOverloaded. Calculates the cross product of two vectors.
DistanceOverloaded. Calculates the distance between two vectors.
DistanceSquaredOverloaded. Calculates the distance between two vectors squared.
DivideOverloaded. Divide a vector by a scalar or another vector.
DotOverloaded. Calculates the dot product of two vectors. If the two vectors are unit vectors, the dot product returns a floating point value between -1 and 1 that can be used to determine some properties of the angle between two vectors. For example, it can show whether the vectors are orthogonal, parallel, or have an acute or obtuse angle between them.
EqualsOverloaded. Returns a value that indicates whether the current instance is equal to a specified object.
GetHashCodeGets the hash code of the vector object.
GetType(Inherited from Object.)
HermiteOverloaded. Performs a Hermite spline interpolation.
LengthCalculates the length of the vector.
LengthSquaredCalculates the length of the vector squared.
LerpOverloaded. Performs a linear interpolation between two vectors.
MaxOverloaded. Returns a vector that contains the highest value from each matching pair of components.
MinOverloaded. Returns a vector that contains the lowest value from each matching pair of components.
MultiplyOverloaded. Multiplies a vector by a scalar or another vector.
NegateOverloaded. Returns a vector pointing in the opposite direction.
NormalizeOverloaded. Creates a unit vector from the specified vector. The result is a vector one unit in length pointing in the same direction as the original vector.
op_DivisionOverloaded. Divides a vector by a scalar or another vector.
op_EqualityTests vectors for equality.
op_InequalityTests vectors for inequality.
op_MultiplyOverloaded. Multiplies a vector by a scalar or another vector.
op_SubtractionSubtracts a vector from a vector.
op_UnaryNegationReturns a vector pointing in the opposite direction.
ReflectOverloaded. Returns the reflection of a vector off a surface that has the specified normal.
SmoothStepOverloaded. Interpolates between two values using a cubic equation.
SubtractOverloaded. Subtracts a vector from a vector.
ToStringRetrieves a string representation of the current object.
TransformOverloaded. Transforms a Vector3 or array of Vector3s by a specified Matrix or Quaternion.
TransformNormalOverloaded. Transforms a vector normal by a matrix.

## Protected Methods

NameDescription
Finalize(Inherited from Object.)
MemberwiseClone(Inherited from Object.)