[This is preliminary documentation and is subject to change.]
The Vector type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| Vector | Overloaded. |
Methods
| Name | Description | |
|---|---|---|
| Angle |
Return the Euler Angle (in Radians) between this vector and vector B
| |
| AngleCosine |
Return the Dot Product between this vector and Vector B
| |
| ClassifyVector |
Classify where a point is in relation to a plane (defined by a point/normal).
Returns:
0 if approximately perpendicular
1 if in "front"
-1 if "behind"
| |
| Combine | ||
| CrossProduct |
Set this vector to the cross product of A and B
| |
| DistanceTo |
Compute the distance from this vector to vector B
| |
| DotProduct |
Return the Dot product of this Vector and Vector B;
| |
| Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType.) | |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| GetHashCode | Returns the hash code for this instance. (Inherited from ValueType.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| Invert |
Invert this vector
| |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| Minus |
Subtracts Vector B from this Vector
| |
| Normal | Overloaded. | |
| Normalize |
Make this vector of length 1
| |
| Plus |
Add Vector B to this vector, overriding this vector.
| |
| Render |
Render the Vector data as an OpenGL Vertex
| |
| RenderAsNormal |
Render the vector as an OpenGL Normal
| |
| Rotate | Overloaded. | |
| Scale |
Scale the vector by a given value
| |
| ScaleVector |
Scale a vector using another vector as reference. X multiplies by scalefactor.X, etc..
| |
| ToString |
Convert the vector to a string, in the format "(X,Y,Z)", i.e.
(-0.14,45,23.5)
(Overrides ValueType..::.ToString()()().) | |
| Transform |
Transform the vector by a given 4x4 matrix
|
Operators
| Name | Description | |
|---|---|---|
| Addition |
A plus B, results in new Vector C
| |
| BitwiseOr | ||
| Equality |
Determines whether Vector A equals Vector B
| |
| Inequality |
Determines whether Vector A does NOT equal Vector B
| |
| Multiply | Overloaded. | |
| Subtraction |
A minus B, results in new vector C
|
Fields
| Name | Description | |
|---|---|---|
| Data |
Internal array of 4 doubles representing the vector
|
Properties
| Name | Description | |
|---|---|---|
| fData |
Return the Data structure as 4 floats/singles instead of doubles
| |
| isZero |
Returns true if the vector is zero.
| |
| Item |
Make the Data the default property for the struct
| |
| Length |
Get or Set the length of the vector
| |
| X |
Set/Get the X value of the vector
| |
| Y |
Set/Get the Y value of the vector
| |
| Z |
Set/Get the Z value of the vector
|