The Vector struct represents a threecomponent mathematical vector or point such as a direction or position in threedimensional space. More...
Inherits IEquatable< Vector >.
Public Member Functions  
float  AngleTo (Vector other) 
The angle between this vector and the specified vector in radians. More...  
Vector  Cross (Vector other) 
The cross product of this vector and the specified vector. More...  
float  DistanceTo (Vector other) 
The distance between the point represented by this Vector object and a point represented by the specified Vector object. More...  
float  Dot (Vector other) 
The dot product of this vector with another vector. More...  
bool  Equals (Vector v) 
Compare Vector equality componentwise. More...  
bool  IsValid () 
Returns true if all of the vector's components are finite. More...  
float[]  ToFloatArray () 
Convert this vector to an array of three float values: [x,y,z]. More...  
override string  ToString () 
Returns a string containing this vector in a human readable format: (x, y, z). More...  
Vector (float x, float y, float z)  
Creates a new Vector with the specified component values. More...  
Vector (Vector vector)  
Copies the specified Vector. More...  
Static Public Member Functions  
static bool  operator!= (Vector v1, Vector v2) 
Compare two vectors for equality. More...  
static Vector  operator* (Vector v1, float scalar) 
Multiply vector by a scalar. More...  
static Vector  operator* (float scalar, Vector v1) 
Multiply vector by a scalar on the lefthand side. More...  
static Vector  operator+ (Vector v1, Vector v2) 
Add vectors componentwise. More...  
static Vector  operator (Vector v1, Vector v2) 
Subtract vectors componentwise. More...  
static Vector  operator (Vector v1) 
Negate a vector. More...  
static Vector  operator/ (Vector v1, float scalar) 
Divide vector by a scalar. More...  
static bool  operator== (Vector v1, Vector v2) 
Compare two vectors for equality. More...  
Public Attributes  
float  x 
The horizontal component. More...  
float  y 
The vertical component. More...  
float  z 
The depth component. More...  
Static Public Attributes  
static readonly Vector  Backward = new Vector(0, 0, 1) 
The unit vector pointing backward along the positive zaxis: (0, 0, 1) More...  
static readonly Vector  Down = new Vector(0, 1, 0) 
The unit vector pointing down along the negative yaxis: (0, 1, 0) More...  
static readonly Vector  Forward = new Vector(0, 0, 1) 
The unit vector pointing forward along the negative zaxis: (0, 0, 1) More...  
static readonly Vector  Left = new Vector(1, 0, 0) 
The unit vector pointing left along the negative xaxis: (1, 0, 0) More...  
static readonly Vector  Ones = new Vector(1, 1, 1) 
The ones vector: (1, 1, 1) More...  
static readonly Vector  Right = new Vector(1, 0, 0) 
The unit vector pointing right along the positive xaxis: (1, 0, 0) More...  
static readonly Vector  Up = new Vector(0, 1, 0) 
The unit vector pointing up along the positive yaxis: (0, 1, 0) More...  
static readonly Vector  XAxis = new Vector(1, 0, 0) 
The xaxis unit vector: (1, 0, 0) More...  
static readonly Vector  YAxis = new Vector(0, 1, 0) 
The yaxis unit vector: (0, 1, 0) More...  
static readonly Vector  ZAxis = new Vector(0, 0, 1) 
The zaxis unit vector: (0, 0, 1) More...  
static readonly Vector  Zero = new Vector(0, 0, 0) 
The zero vector: (0, 0, 0) More...  
Properties  
float  Magnitude [get] 
The magnitude, or length, of this vector. More...  
float  MagnitudeSquared [get] 
The square of the magnitude, or length, of this vector. More...  
Vector  Normalized [get] 
A normalized copy of this vector. More...  
float  Pitch [get] 
The pitch angle in radians. More...  
float  Roll [get] 
The roll angle in radians. More...  
float  Yaw [get] 
The yaw angle in radians. More...  
The Vector struct represents a threecomponent mathematical vector or point such as a direction or position in threedimensional space.
The Leap Motion software employs a righthanded Cartesian coordinate system. Values given are in units of realworld millimeters. The origin is centered at the center of the Leap Motion Controller. The x and zaxes lie in the horizontal plane, with the xaxis running parallel to the long edge of the device. The yaxis is vertical, with positive values increasing upwards (in contrast to the downward orientation of most computer graphics coordinate systems). The zaxis has positive values increasing away from the computer screen.
Vector  (  float  x, 
float  y,  
float  z  
) 
float AngleTo  (  Vector  other  ) 
The angle between this vector and the specified vector in radians.
The angle is measured in the plane formed by the two vectors. The angle returned is always the smaller of the two conjugate angles. Thus A.angleTo(B) == B.angleTo(A)
and is always a positive value less than or equal to pi radians (180 degrees).
If either vector has zero length, then this function returns zero.
other  A Vector object. 
The cross product of this vector and the specified vector.
The cross product is a vector orthogonal to both original vectors. It has a magnitude equal to the area of a parallelogram having the two vectors as sides. The direction of the returned vector is determined by the righthand rule. Thus A.cross(B) == B.cross(A).
other  A Vector object. 
float DistanceTo  (  Vector  other  ) 
float Dot  (  Vector  other  ) 
The dot product of this vector with another vector.
The dot product is the magnitude of the projection of this vector onto the specified vector.
other  A Vector object. 
bool Equals  (  Vector  v  ) 
bool IsValid  (  ) 
Returns true if all of the vector's components are finite.
If any component is NaN or infinite, then this returns false.
Multiply vector by a scalar on the lefthand side.
float [] ToFloatArray  (  ) 
Convert this vector to an array of three float values: [x,y,z].
override string ToString  (  ) 
Returns a string containing this vector in a human readable format: (x, y, z).
float x 
The horizontal component.
float y 
The vertical component.
float z 
The depth component.

get 
The magnitude, or length, of this vector.
The magnitude is the L2 norm, or Euclidean distance between the origin and the point represented by the (x, y, z) components of this Vector object.

get 
The square of the magnitude, or length, of this vector.

get 

get 
The pitch angle in radians.
Pitch is the angle between the negative zaxis and the projection of the vector onto the yz plane. In other words, pitch represents rotation around the xaxis. If the vector points upward, the returned angle is between 0 and pi radians (180 degrees); if it points downward, the angle is between 0 and pi radians.

get 
The roll angle in radians.
Roll is the angle between the yaxis and the projection of the vector onto the xy plane. In other words, roll represents rotation around the zaxis. If the vector points to the left of the yaxis, then the returned angle is between 0 and pi radians (180 degrees); if it points to the right, the angle is between 0 and pi radians.
Use this function to get roll angle of the plane to which this vector is a normal. For example, if this vector represents the normal to the palm, then this function returns the tilt or roll of the palm plane compared to the horizontal (xz) plane.

get 
The yaw angle in radians.
Yaw is the angle between the negative zaxis and the projection of the vector onto the xz plane. In other words, yaw represents rotation around the yaxis. If the vector points to the right of the negative zaxis, then the returned angle is between 0 and pi radians (180 degrees); if it points to the left, the angle is between 0 and pi radians.