Jypeli 4
The simple game programming library
Julkiset jäsenfunktiot | Staattiset julkiset jäsenfunktiot | Julkiset attribuutit | Staattiset julkiset attribuutit | Ominaisuudet
Vector2D tietuereferenssi

This is the Vector Class. Lisää...

Luokan Vector2D luokkakaavio
IVector< V > IAdvanceValueType

Lista kaikista jäsenistä.

Julkiset jäsenfunktiot

 Vector2D (Scalar X, Scalar Y)
 Creates a New Vector2D Instance on the Stack.
 Vector2D (Scalar[] vals)
 Vector2D (Scalar[] vals, int index)
Scalar[] ToArray ()
 Copies the elements of the IAdvanceValueType to a new array of Scalar .
void CopyFrom (Scalar[] array, int index)
 Copies all the elements, up to the Length of the IAdvanceValueType, of the specified one-dimensional Array to the IAdvanceValueType.
void CopyTo (Scalar[] array, int index)
 Copies all the elements of the IAdvanceValueType to the specified one-dimensional Array of Scalar.
Vector3D ToVector3D (Scalar Z)
string ToString (string format)
 Converts the numeric value of this instance to its equivalent string representation, using the specified format.
override string ToString ()
override int GetHashCode ()
 Provides a unique hash code based on the member variables of this class. This should be done because the equality operators (==, !=) have been overriden by this class. The standard implementation is a simple XOR operation between all local member variables.
override bool Equals (object obj)
 Compares this Vector to another object. This should be done because the equality operators (==, !=) have been overriden by this class.
bool Equals (Vector2D other)

Staattiset julkiset jäsenfunktiot

static void Copy (ref Vector2D vector, Scalar[] destArray)
static void Copy (ref Vector2D vector, Scalar[] destArray, int index)
static void Copy (Scalar[] sourceArray, out Vector2D result)
static void Copy (Scalar[] sourceArray, int index, out Vector2D result)
static void Copy (ref Vector4D source, out Vector2D dest)
static void Copy (ref Vector3D source, out Vector2D dest)
static Vector2D Clamp (Vector2D value, Vector2D min, Vector2D max)
 Binds a value to.
static void Clamp (ref Vector2D value, ref Vector2D min, ref Vector2D max, out Vector2D result)
static Vector2D Lerp (Vector2D left, Vector2D right, Scalar amount)
static void Lerp (ref Vector2D left, ref Vector2D right, ref Scalar amount, out Vector2D result)
static Vector2D Lerp (Vector2D left, Vector2D right, Vector2D amount)
static void Lerp (ref Vector2D left, ref Vector2D right, ref Vector2D amount, out Vector2D result)
static Scalar Distance (Vector2D left, Vector2D right)
static void Distance (ref Vector2D left, ref Vector2D right, out Scalar result)
static Scalar DistanceSq (Vector2D left, Vector2D right)
static void DistanceSq (ref Vector2D left, ref Vector2D right, out Scalar result)
static Vector2D FromLengthAndAngle (Scalar length, Scalar radianAngle)
 Creates a Vector2D With the given length (Magnitude) and the given Angle.
static void FromLengthAndAngle (ref Scalar length, ref Scalar radianAngle, out Vector2D result)
static Vector2D Rotate (Scalar radianAngle, Vector2D source)
 Rotates a Vector2D.
static void Rotate (ref Scalar radianAngle, ref Vector2D source, out Vector2D result)
static Vector2D SetAngle (Vector2D source, Scalar radianAngle)
 Sets the Angle of a Vector2D without changing the Magnitude.
static void SetAngle (ref Vector2D source, ref Scalar radianAngle, out Vector2D result)
static Scalar GetAngle (Vector2D source)
 Determines the current Angle in radians of the Vector2D and Returns it.
static void GetAngle (ref Vector2D source, out Scalar result)
static Vector2D Add (Vector2D left, Vector2D right)
 Adds 2 Vectors2Ds.
static void Add (ref Vector2D left, ref Vector2D right, out Vector2D result)
static Vector2D Subtract (Vector2D left, Vector2D right)
 Subtracts 2 Vector2Ds.
static void Subtract (ref Vector2D left, ref Vector2D right, out Vector2D result)
static Vector2D Transform (Matrix3x3 matrix, Vector2D source)
 Uses a matrix multiplication to Transform the vector.
static void Transform (ref Matrix3x3 matrix, ref Vector2D source, out Vector2D result)
static Vector2D TransformNormal (Matrix3x3 matrix, Vector2D source)
static void TransformNormal (ref Matrix3x3 matrix, ref Vector2D source, out Vector2D result)
static Vector2D Transform (Matrix2x3 matrix, Vector2D source)
 Uses a matrix multiplication to Transform the vector.
static void Transform (ref Matrix2x3 matrix, ref Vector2D source, out Vector2D result)
static Vector2D TransformNormal (Matrix2x3 matrix, Vector2D source)
static void TransformNormal (ref Matrix2x3 matrix, ref Vector2D source, out Vector2D result)
static Vector2D Transform (Matrix2x2 matrix, Vector2D source)
 Uses a matrix multiplication to Transform the vector.
static void Transform (ref Matrix2x2 matrix, ref Vector2D source, out Vector2D result)
static Vector2D Multiply (Vector2D source, Scalar scalar)
 Does Scaler Multiplication on a Vector2D.
static void Multiply (ref Vector2D source, ref Scalar scalar, out Vector2D result)
static Vector2D Multiply (Scalar scalar, Vector2D source)
static void Multiply (ref Scalar scalar, ref Vector2D source, out Vector2D result)
static Scalar Dot (Vector2D left, Vector2D right)
 Does a Dot Operation Also know as an Inner Product.
static void Dot (ref Vector2D left, ref Vector2D right, out Scalar result)
static Scalar ZCross (Vector2D left, Vector2D right)
 Does a "2D" Cross Product also know as an Outer Product.
static void ZCross (ref Vector2D left, ref Vector2D right, out Scalar result)
static Vector2D ZCross (Scalar leftZ, Vector2D right)
 Does a "2D" Cross Product also know as an Outer Product.
static void ZCross (ref Scalar leftZ, ref Vector2D right, out Vector2D result)
static Vector2D ZCross (Vector2D left, Scalar rightZ)
 Does a "2D" Cross Product also know as an Outer Product.
static void ZCross (ref Vector2D left, ref Scalar rightZ, out Vector2D result)
static Scalar GetMagnitudeSq (Vector2D source)
 Gets the Squared Magnitude of the Vector2D that is passed.
static void GetMagnitudeSq (ref Vector2D source, out Scalar result)
static Scalar GetMagnitude (Vector2D source)
 Gets the Magnitude of the Vector2D that is passed.
static void GetMagnitude (ref Vector2D source, out Scalar result)
static Vector2D SetMagnitude (Vector2D source, Scalar magnitude)
 Sets the Magnitude of a Vector2D without changing the Angle.
static void SetMagnitude (ref Vector2D source, ref Scalar magnitude, out Vector2D result)
static Vector2D Negate (Vector2D source)
 Negates a Vector2D.
static void Negate (ref Vector2D source)
static void Negate (ref Vector2D source, out Vector2D result)
static Vector2D Normalize (Vector2D source)
 This returns the Normalized Vector2D that is passed. This is also known as a Unit Vector.
static void Normalize (ref Vector2D source, out Vector2D result)
static void Normalize (ref Vector2D source)
static Vector2D Normalize (Vector2D source, out Scalar magnitude)
 This returns the Normalized Vector2D that is passed. This is also known as a Unit Vector.
static void Normalize (ref Vector2D source, out Scalar magnitude, out Vector2D result)
static Vector2D Project (Vector2D left, Vector2D right)
 Thie Projects the left Vector2D onto the Right Vector2D.
static void Project (ref Vector2D left, ref Vector2D right, out Vector2D result)
static Vector2D GetRightHandNormal (Vector2D source)
 Gets a Vector2D that is perpendicular(orthogonal) to the passed Vector2D while staying on the XY Plane.
static void GetRightHandNormal (ref Vector2D source, out Vector2D result)
static Vector2D GetLeftHandNormal (Vector2D source)
 Gets a Vector2D that is perpendicular(orthogonal) to the passed Vector2D while staying on the XY Plane.
static void GetLeftHandNormal (ref Vector2D source, out Vector2D result)
static Vector2D Hermite (Vector2D value1, Vector2D tangent1, Vector2D value2, Vector2D tangent2, Scalar amount)
static void Hermite (ref Vector2D value1, ref Vector2D tangent1, ref Vector2D value2, ref Vector2D tangent2, Scalar amount, out Vector2D result)
static Vector2D CatmullRom (Vector2D value1, Vector2D value2, Vector2D value3, Vector2D value4, Scalar amount)
static void CatmullRom (ref Vector2D value1, ref Vector2D value2, ref Vector2D value3, ref Vector2D value4, Scalar amount, out Vector2D result)
static Vector2D Max (Vector2D value1, Vector2D value2)
static void Max (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
static Vector2D Min (Vector2D value1, Vector2D value2)
static void Min (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
static Vector2D operator+ (Vector2D left, Vector2D right)
 Adds 2 Vectors2Ds.
static Vector2D operator- (Vector2D left, Vector2D right)
 Subtracts 2 Vector2Ds.
static Vector2D operator* (Vector2D source, Scalar scalar)
 Does Scaler Multiplication on a Vector2D.
static Vector2D operator* (Scalar scalar, Vector2D source)
 Does Scaler Multiplication on a Vector2D.
static Scalar operator* (Vector2D left, Vector2D right)
 Does a Dot Operation Also know as an Inner Product.
static Vector2D operator* (Matrix2x3 matrix, Vector2D source)
static Vector2D operator* (Matrix3x3 matrix, Vector2D source)
static Vector2D operator* (Matrix2x2 matrix, Vector2D source)
static Vector2D operator- (Vector2D source)
 Negates a Vector2D.
static Scalar operator^ (Vector2D left, Vector2D right)
 Does a "2D" Cross Product also know as an Outer Product.
static Vector2D operator^ (Scalar leftZ, Vector2D right)
 Does a "2D" Cross Product also know as an Outer Product.
static Vector2D operator^ (Vector2D left, Scalar rightZ)
 Does a "2D" Cross Product also know as an Outer Product.
static bool operator== (Vector2D left, Vector2D right)
 Specifies whether the Vector2Ds contain the same coordinates.
static bool operator!= (Vector2D left, Vector2D right)
 Specifies whether the Vector2Ds do not contain the same coordinates.
static operator Vector2D (Vector3D source)
static bool TryParse (string s, out Vector2D result)
static Vector2D Parse (string s)
static bool Equals (Vector2D left, Vector2D right)
static bool Equals (ref Vector2D left, ref Vector2D right)

Julkiset attribuutit

const int Count = 2
 The number of Scalar values in the class.
const int Size = sizeof(Scalar) * Count
 The Size of the class in bytes;.
Scalar X
 This is the X value. (Usually represents a horizontal position or direction.)
Scalar Y
 This is the Y value. (Usually represents a vertical position or direction.)

Staattiset julkiset attribuutit

static readonly Vector2D One = new Vector2D(1,1)
 Vector2D(1,1)
static readonly Vector2D Zero = new Vector2D()
 Vector2D(0,0)
static readonly Vector2D XAxis = new Vector2D(1, 0)
 Vector2D(1,0)
static readonly Vector2D YAxis = new Vector2D(0, 1)
 Vector2D(0,1)
static readonly Vector2D XYAxis = new Vector2D((Scalar)0.7071067811865475244008443621052, (Scalar)0.7071067811865475244008443621052)
 Vector2D(0.707...,0.707...)

Ominaisuudet

Vector2D RightHandNormal [get]
 Gets A perpendicular(orthogonal) Vector2D using the Right Hand Rule.
Vector2D LeftHandNormal [get]
 Gets A perpendicular(orthogonal) Vector2D using the Left Hand Rule.
Scalar Magnitude [get, set]
 Gets or Sets the Magnitude (Length) of the Vector2D.
Scalar MagnitudeSq [get]
 Gets the Squared Magnitude of the Vector2D.
Scalar Angle [get, set]
 Gets or Sets the Angle in radians of the Vector2D.
Vector2D Normalized [get]
 Gets the Normalized Vector2D. (Unit Vector)
int IAdvanceValueType. Count [get]
 The Number of Variables accesable though the indexer.

Yksityiskohtainen selite

This is the Vector Class.


Rakentajien & purkajien dokumentaatio

Vector2D ( Scalar  X,
Scalar  Y 
) [inline]

Creates a New Vector2D Instance on the Stack.

Parametrit:
XThe X value.
YThe Y value.

Jäsenfunktioiden dokumentaatio

static Vector2D Add ( Vector2D  left,
Vector2D  right 
) [inline, static]

Adds 2 Vectors2Ds.

Parametrit:
leftThe left Vector2D operand.
rightThe right Vector2D operand.
Palauttaa:
The Sum of the 2 Vector2Ds.
static Vector2D Clamp ( Vector2D  value,
Vector2D  min,
Vector2D  max 
) [inline, static]

Binds a value to.

Parametrit:
value
lower
upper
Palauttaa:
void CopyFrom ( Scalar[]  array,
int  index 
) [inline]

Copies all the elements, up to the Length of the IAdvanceValueType, of the specified one-dimensional Array to the IAdvanceValueType.

Parametrit:
arrayThe one-dimensional Array that is the source of the elements copied to the IAdvanceValueType.
indexA 32-bit integer that represents the index in array at which copying begins.

Toteuttaa luokan IAdvanceValueType.

void CopyTo ( Scalar[]  array,
int  index 
) [inline]

Copies all the elements of the IAdvanceValueType to the specified one-dimensional Array of Scalar.

Parametrit:
arrayThe one-dimensional Array that is the destination of the elements copied from the IAdvanceValueType.
indexA 32-bit integer that represents the index in array at which copying begins.

Toteuttaa luokan IAdvanceValueType.

static Scalar Dot ( Vector2D  left,
Vector2D  right 
) [inline, static]

Does a Dot Operation Also know as an Inner Product.

Parametrit:
leftThe left Vector2D operand.
rightThe right Vector2D operand.
Palauttaa:
The Dot Product (Inner Product).
override bool Equals ( object  obj) [inline]

Compares this Vector to another object. This should be done because the equality operators (==, !=) have been overriden by this class.

Parametrit:
obj
Palauttaa:
static Vector2D FromLengthAndAngle ( Scalar  length,
Scalar  radianAngle 
) [inline, static]

Creates a Vector2D With the given length (Magnitude) and the given Angle.

Parametrit:
lengthThe length (Magnitude) of the Vector2D to be created
radianAngleThe angle of the from the (XAxis) in Radians
Palauttaa:
a Vector2D With the given length and angle.
FromLengthAndAngle(1,Math.PI/2)

would create a Vector2D equil to

new Vector2D(0,1)

. And

would create a Vector2D equil to

new Vector2D(1,0)

.

static Scalar GetAngle ( Vector2D  source) [inline, static]

Determines the current Angle in radians of the Vector2D and Returns it.

Parametrit:
sourceThe Vector2D of whos angle is to be Determined.
Palauttaa:
The Angle in radians of the Vector2D.
override int GetHashCode ( ) [inline]

Provides a unique hash code based on the member variables of this class. This should be done because the equality operators (==, !=) have been overriden by this class. The standard implementation is a simple XOR operation between all local member variables.

Palauttaa:
static Vector2D GetLeftHandNormal ( Vector2D  source) [inline, static]

Gets a Vector2D that is perpendicular(orthogonal) to the passed Vector2D while staying on the XY Plane.

Parametrit:
sourceThe Vector2D whose perpendicular(orthogonal) is to be determined.
Palauttaa:
An perpendicular(orthogonal) Vector2D using the Left Hand Rule (opposite of the Right hand Rule)
static Scalar GetMagnitude ( Vector2D  source) [inline, static]

Gets the Magnitude of the Vector2D that is passed.

Parametrit:
sourceThe Vector2D whos Magnitude is te be returned.
Palauttaa:
The Magnitude.
static Scalar GetMagnitudeSq ( Vector2D  source) [inline, static]

Gets the Squared Magnitude of the Vector2D that is passed.

Parametrit:
sourceThe Vector2D whos Squared Magnitude is te be returned.
Palauttaa:
The Squared Magnitude.
static Vector2D GetRightHandNormal ( Vector2D  source) [inline, static]

Gets a Vector2D that is perpendicular(orthogonal) to the passed Vector2D while staying on the XY Plane.

Parametrit:
sourceThe Vector2D whose perpendicular(orthogonal) is to be determined.
Palauttaa:
An perpendicular(orthogonal) Vector2D using the Right Hand Rule
static Vector2D Multiply ( Vector2D  source,
Scalar  scalar 
) [inline, static]

Does Scaler Multiplication on a Vector2D.

Parametrit:
scalarThe scalar value that will multiply the Vector2D.
sourceThe Vector2D to be multiplied.
Palauttaa:
The Product of the Scaler Multiplication.
static Vector2D Negate ( Vector2D  source) [inline, static]

Negates a Vector2D.

Parametrit:
sourceThe Vector2D to be Negated.
Palauttaa:
The Negated Vector2D.
static Vector2D Normalize ( Vector2D  source,
out Scalar  magnitude 
) [inline, static]

This returns the Normalized Vector2D that is passed. This is also known as a Unit Vector.

Parametrit:
sourceThe Vector2D to be Normalized.
magnitudethe magitude of the Vector2D passed
Palauttaa:
The Normalized Vector2D. (Unit Vector)
static Vector2D Normalize ( Vector2D  source) [inline, static]

This returns the Normalized Vector2D that is passed. This is also known as a Unit Vector.

Parametrit:
sourceThe Vector2D to be Normalized.
Palauttaa:
The Normalized Vector2D. (Unit Vector)
static bool operator!= ( Vector2D  left,
Vector2D  right 
) [inline, static]

Specifies whether the Vector2Ds do not contain the same coordinates.

Parametrit:
leftThe left Vector2D to test.
rightThe right Vector2D to test.
Palauttaa:
true if the Vector2Ds do not have the same coordinates; otherwise false
static Scalar operator* ( Vector2D  left,
Vector2D  right 
) [inline, static]

Does a Dot Operation Also know as an Inner Product.

Parametrit:
leftThe left Vector2D operand.
rightThe right Vector2D operand.
Palauttaa:
The Dot Product (Inner Product).
static Vector2D operator* ( Vector2D  source,
Scalar  scalar 
) [inline, static]

Does Scaler Multiplication on a Vector2D.

Parametrit:
sourceThe Vector2D to be multiplied.
scalarThe scalar value that will multiply the Vector2D.
Palauttaa:
The Product of the Scaler Multiplication.
static Vector2D operator* ( Scalar  scalar,
Vector2D  source 
) [inline, static]

Does Scaler Multiplication on a Vector2D.

Parametrit:
scalarThe scalar value that will multiply the Vector2D.
sourceThe Vector2D to be multiplied.
Palauttaa:
The Product of the Scaler Multiplication.
static Vector2D operator+ ( Vector2D  left,
Vector2D  right 
) [inline, static]

Adds 2 Vectors2Ds.

Parametrit:
leftThe left Vector2D operand.
rightThe right Vector2D operand.
Palauttaa:
The Sum of the 2 Vector2Ds.
static Vector2D operator- ( Vector2D  source) [inline, static]

Negates a Vector2D.

Parametrit:
sourceThe Vector2D to be Negated.
Palauttaa:
The Negated Vector2D.
static Vector2D operator- ( Vector2D  left,
Vector2D  right 
) [inline, static]

Subtracts 2 Vector2Ds.

Parametrit:
leftThe left Vector2D operand.
rightThe right Vector2D operand.
Palauttaa:
The Difference of the 2 Vector2Ds.
static bool operator== ( Vector2D  left,
Vector2D  right 
) [inline, static]

Specifies whether the Vector2Ds contain the same coordinates.

Parametrit:
leftThe left Vector2D to test.
rightThe right Vector2D to test.
Palauttaa:
true if the Vector2Ds have the same coordinates; otherwise false
static Vector2D operator^ ( Scalar  leftZ,
Vector2D  right 
) [inline, static]

Does a "2D" Cross Product also know as an Outer Product.

Parametrit:
leftZThe Z value of the left vector operand.
rightThe right Vector2D operand.
Palauttaa:
The Vector2D that fully represents the resulting vector.

This 2D Cross Product is using a cheat. Since the Cross product (in 3D space) always generates a vector perpendicular (orthogonal) to the 2 vectors used as arguments. The cheat is that the only vector that can be perpendicular to two vectors in the XY Plane will parallel to the Z Axis. Since any vector that is parallel to the Z Axis will have zeros in both the X and Y Fields I can represent the cross product of 2 vectors in the XY plane as single scalar: Z. Also the Cross Product of and Vector on the XY plan and that of one ont on the Z Axis will result in a vector on the XY Plane. So the ZCross Methods were well thought out and can be trusted.

static Scalar operator^ ( Vector2D  left,
Vector2D  right 
) [inline, static]

Does a "2D" Cross Product also know as an Outer Product.

Parametrit:
leftThe left Vector2D operand.
rightThe right Vector2D operand.
Palauttaa:
The Z value of the resulting vector.

This 2D Cross Product is using a cheat. Since the Cross product (in 3D space) always generates a vector perpendicular (orthogonal) to the 2 vectors used as arguments. The cheat is that the only vector that can be perpendicular to two vectors in the XY Plane will parallel to the Z Axis. Since any vector that is parallel to the Z Axis will have zeros in both the X and Y Fields I can represent the cross product of 2 vectors in the XY plane as single scalar: Z. Also the Cross Product of and Vector on the XY plan and that of one ont on the Z Axis will result in a vector on the XY Plane. So the ZCross Methods were well thought out and can be trusted.

static Vector2D operator^ ( Vector2D  left,
Scalar  rightZ 
) [inline, static]

Does a "2D" Cross Product also know as an Outer Product.

Parametrit:
leftThe left Vector2D operand.
rightZThe Z value of the right vector operand.
Palauttaa:
The Vector2D that fully represents the resulting vector.

This 2D Cross Product is using a cheat. Since the Cross product (in 3D space) always generates a vector perpendicular (orthogonal) to the 2 vectors used as arguments. The cheat is that the only vector that can be perpendicular to two vectors in the XY Plane will parallel to the Z Axis. Since any vector that is parallel to the Z Axis will have zeros in both the X and Y Fields I can represent the cross product of 2 vectors in the XY plane as single scalar: Z. Also the Cross Product of and Vector on the XY plan and that of one ont on the Z Axis will result in a vector on the XY Plane. So the ZCross Methods were well thought out and can be trusted.

static Vector2D Project ( Vector2D  left,
Vector2D  right 
) [inline, static]

Thie Projects the left Vector2D onto the Right Vector2D.

Parametrit:
leftThe left Vector2D operand.
rightThe right Vector2D operand.
Palauttaa:
The Projected Vector2D.
static Vector2D Rotate ( Scalar  radianAngle,
Vector2D  source 
) [inline, static]

Rotates a Vector2D.

Parametrit:
radianAngleThe Angle in radians of the amount it is to be rotated.
sourceThe Vector2D to be Rotated.
Palauttaa:
The Rotated Vector2D
static Vector2D SetAngle ( Vector2D  source,
Scalar  radianAngle 
) [inline, static]

Sets the Angle of a Vector2D without changing the Magnitude.

Parametrit:
sourceThe Vector2D to have its Angle set.
radianAngleThe angle of the from the (XAxis) in Radians
Palauttaa:
A Vector2D with a new Angle.
static Vector2D SetMagnitude ( Vector2D  source,
Scalar  magnitude 
) [inline, static]

Sets the Magnitude of a Vector2D without changing the Angle.

Parametrit:
sourceThe Vector2D whose Magnitude is to be changed.
magnitudeThe Magnitude.
Palauttaa:
A Vector2D with the new Magnitude
static Vector2D Subtract ( Vector2D  left,
Vector2D  right 
) [inline, static]

Subtracts 2 Vector2Ds.

Parametrit:
leftThe left Vector2D operand.
rightThe right Vector2D operand.
Palauttaa:
The Difference of the 2 Vector2Ds.
Scalar [] ToArray ( ) [inline]

Copies the elements of the IAdvanceValueType to a new array of Scalar .

Palauttaa:
An array containing copies of the elements of the IAdvanceValueType.

Toteuttaa luokan IAdvanceValueType.

string ToString ( string  format) [inline]

Converts the numeric value of this instance to its equivalent string representation, using the specified format.

Parametrit:
formatthe format for each scaler in this Vector
Palauttaa:

Toteuttaa luokan IAdvanceValueType.

static Vector2D Transform ( Matrix2x3  matrix,
Vector2D  source 
) [inline, static]

Uses a matrix multiplication to Transform the vector.

Parametrit:
matrixThe Transformation matrix
sourceThe Vector to be transformed
Palauttaa:
The transformed vector.
static Vector2D Transform ( Matrix2x2  matrix,
Vector2D  source 
) [inline, static]

Uses a matrix multiplication to Transform the vector.

Parametrit:
matrixThe rotation matrix
sourceThe Vector to be transformed
Palauttaa:
The transformed vector.
static Vector2D Transform ( Matrix3x3  matrix,
Vector2D  source 
) [inline, static]

Uses a matrix multiplication to Transform the vector.

Parametrit:
matrixThe Transformation matrix
sourceThe Vector to be transformed
Palauttaa:
The transformed vector.
static Scalar ZCross ( Vector2D  left,
Vector2D  right 
) [inline, static]

Does a "2D" Cross Product also know as an Outer Product.

Parametrit:
leftThe left Vector2D operand.
rightThe right Vector2D operand.
Palauttaa:
The Z value of the resulting vector.

This 2D Cross Product is using a cheat. Since the Cross product (in 3D space) always generates a vector perpendicular (orthogonal) to the 2 vectors used as arguments. The cheat is that the only vector that can be perpendicular to two vectors in the XY Plane will parallel to the Z Axis. Since any vector that is parallel to the Z Axis will have zeros in both the X and Y Fields I can represent the cross product of 2 vectors in the XY plane as single scalar: Z. Also the Cross Product of and Vector on the XY plan and that of one ont on the Z Axis will result in a vector on the XY Plane. So the ZCross Methods were well thought out and can be trusted.

static Vector2D ZCross ( Vector2D  left,
Scalar  rightZ 
) [inline, static]

Does a "2D" Cross Product also know as an Outer Product.

Parametrit:
leftThe left Vector2D operand.
rightZThe Z value of the right vector operand.
Palauttaa:
The Vector2D that fully represents the resulting vector.

This 2D Cross Product is using a cheat. Since the Cross product (in 3D space) always generates a vector perpendicular (orthogonal) to the 2 vectors used as arguments. The cheat is that the only vector that can be perpendicular to two vectors in the XY Plane will parallel to the Z Axis. Since any vector that is parallel to the Z Axis will have zeros in both the X and Y Fields I can represent the cross product of 2 vectors in the XY plane as single scalar: Z. Also the Cross Product of and Vector on the XY plan and that of one ont on the Z Axis will result in a vector on the XY Plane. So the ZCross Methods were well thought out and can be trusted.

static Vector2D ZCross ( Scalar  leftZ,
Vector2D  right 
) [inline, static]

Does a "2D" Cross Product also know as an Outer Product.

Parametrit:
leftZThe Z value of the left vector operand.
rightThe right Vector2D operand.
Palauttaa:
The Vector2D that fully represents the resulting vector.

This 2D Cross Product is using a cheat. Since the Cross product (in 3D space) always generates a vector perpendicular (orthogonal) to the 2 vectors used as arguments. The cheat is that the only vector that can be perpendicular to two vectors in the XY Plane will parallel to the Z Axis. Since any vector that is parallel to the Z Axis will have zeros in both the X and Y Fields I can represent the cross product of 2 vectors in the XY plane as single scalar: Z. Also the Cross Product of and Vector on the XY plan and that of one ont on the Z Axis will result in a vector on the XY Plane. So the ZCross Methods were well thought out and can be trusted.


Jäsendatan dokumentaatio

const int Count = 2

The number of Scalar values in the class.

Toteuttaa luokan IAdvanceValueType.

readonly Vector2D One = new Vector2D(1,1) [static]

Vector2D(1,1)

const int Size = sizeof(Scalar) * Count

The Size of the class in bytes;.

Scalar X

This is the X value. (Usually represents a horizontal position or direction.)

readonly Vector2D XAxis = new Vector2D(1, 0) [static]

Vector2D(1,0)

readonly Vector2D XYAxis = new Vector2D((Scalar)0.7071067811865475244008443621052, (Scalar)0.7071067811865475244008443621052) [static]

Vector2D(0.707...,0.707...)

Scalar Y

This is the Y value. (Usually represents a vertical position or direction.)

readonly Vector2D YAxis = new Vector2D(0, 1) [static]

Vector2D(0,1)

readonly Vector2D Zero = new Vector2D() [static]

Vector2D(0,0)


Ominaisuuksien dokumentaatio

Scalar Angle [get, set]

Gets or Sets the Angle in radians of the Vector2D.

If the Magnitude of the Vector is 1 then The Angles {0,Math.PI/2,Math.PI/2,3*Math.PI/2} would have the vectors {(1,0),(0,1),(-1,0),(0,-1)} respectively.

int IAdvanceValueType. Count [get]

The Number of Variables accesable though the indexer.

Toteuttaa luokan IAdvanceValueType.

Vector2D LeftHandNormal [get]

Gets A perpendicular(orthogonal) Vector2D using the Left Hand Rule.

Scalar Magnitude [get, set]

Gets or Sets the Magnitude (Length) of the Vector2D.

Toteuttaa luokan IVector< V >.

Scalar MagnitudeSq [get]

Gets the Squared Magnitude of the Vector2D.

Toteuttaa luokan IVector< V >.

Vector2D Normalized [get]

Gets the Normalized Vector2D. (Unit Vector)

Toteuttaa luokan IVector< V >.

Vector2D RightHandNormal [get]

Gets A perpendicular(orthogonal) Vector2D using the Right Hand Rule.


Dokumentaatio tälle tietueelle luotiin seuraavasta tiedostosta:
 Kaikki Luokat Nimiavaruudet Funktiot Muuttujat Luettelotyypit Ominaisuudet Tapahtumat