Public Member Functions | |
Vector3f (float x, float y, float z) | |
Constructor. Defines the coordinates of the vector. | |
Vector3f (Vector3f other) | |
Constructor. Copies the other vector to a new vector. | |
Vector3f () | |
Constructor. All coordinates are set to 0. | |
void | LoadZero () |
Sets all coordinates to zero. | |
float | Dot (Vector3f v) |
Calculates the dot product of this vector and another vector. Does the same as the static method. | |
Vector3f | Cross (Vector3f v) |
Cross product of this vector with another vector. | |
bool | IsNormalized () |
Checks if the vector is normalized, i.e. it's norm has a value of 1.0. | |
float | Norm () |
Computes the norm (length) of the vector. | |
float | Norm2 () |
Computes the squared norm of this, that is the dot product of this vector with itself. | |
void | Normalize () |
Normalizes the vector. | |
float | Distance2 (Vector3f v) |
Squared distance between this position vector and another position vector (norm2 of the difference vector). | |
float | Distance (Vector3f v) |
Distance between this position vector and another position vector (norm of the difference vector). | |
Static Public Member Functions | |
static float | Dot (Vector3f lhs, Vector3f rhs) |
Calculates the dot product of two vectors. | |
static Vector3f | operator+ (Vector3f lhs, Vector3f rhs) |
Binary + operator. Adds each component of the first vector with the corresponding component of the second vector. | |
static Vector3f | operator- (Vector3f v) |
Unary - operator. Inverts all components of the vectors. | |
static Vector3f | operator- (Vector3f lhs, Vector3f rhs) |
Binary - operator. | |
static Vector3f | operator/ (Vector3f lhs, float rhs) |
Divides each element of the vector by the scalar. | |
static Vector3f | operator * (Vector3f lhs, float rhs) |
Multiplies each element of the vector with the scalar. | |
static Vector3f | operator * (Vector3f lhs, Vector3f rhs) |
Multiplies each element of the vector with the same element of the second vector. | |
static Vector3f | operator/ (Vector3f lhs, Vector3f rhs) |
Element-wise division. | |
static Vector3f | operator * (float lhs, Vector3f rhs) |
Multiplies each element of the vector with the scalar. | |
static bool | operator>= (Vector3f lhs, Vector3f rhs) |
returns true if all coordinates of lhs are greater or equal than rhs | |
static bool | operator<= (Vector3f lhs, Vector3f rhs) |
returns true if all coordinates of lhs are lower or equal than rhs | |
static implicit | operator float[] (Vector3f vector) |
Provides a cast operator to a float array which is needed e.g. for the glVertexfv method. | |
Properties | |
float | X [get, set] |
value of x-coordinate | |
float | Y [get, set] |
value of y-coordinate | |
float | Z [get, set] |
value of z-coordinate | |
float | this [int index] [get, set] |
Indexer for vector elements. |
FlowVis.Math.Vector3f.Vector3f | ( | float | x, | |
float | y, | |||
float | z | |||
) |
Constructor. Defines the coordinates of the vector.
x | x-coordinate of new vector | |
y | y-coordinate of new vector | |
z | z-coordinate of new vector |
FlowVis.Math.Vector3f.Vector3f | ( | Vector3f | other | ) |
Constructor. Copies the other vector to a new vector.
other | vector which should be copied |
FlowVis.Math.Vector3f.Vector3f | ( | ) |
Constructor. All coordinates are set to 0.
void FlowVis.Math.Vector3f.LoadZero | ( | ) |
Sets all coordinates to zero.
Calculates the dot product of two vectors.
lhs | ||
rhs |
float FlowVis.Math.Vector3f.Dot | ( | Vector3f | v | ) |
Calculates the dot product of this vector and another vector. Does the same as the static method.
v |
Cross product of this vector with another vector.
v | the other vector to calculate the cross product with |
bool FlowVis.Math.Vector3f.IsNormalized | ( | ) |
Checks if the vector is normalized, i.e. it's norm has a value of 1.0.
float FlowVis.Math.Vector3f.Norm | ( | ) |
Computes the norm (length) of the vector.
float FlowVis.Math.Vector3f.Norm2 | ( | ) |
Computes the squared norm of this, that is the dot product of this vector with itself.
void FlowVis.Math.Vector3f.Normalize | ( | ) |
Normalizes the vector.
float FlowVis.Math.Vector3f.Distance2 | ( | Vector3f | v | ) |
Squared distance between this position vector and another position vector (norm2 of the difference vector).
v | vector for which the distance to this vector should be calulated |
float FlowVis.Math.Vector3f.Distance | ( | Vector3f | v | ) |
Distance between this position vector and another position vector (norm of the difference vector).
v | vector for which the distance to this vector should be calulated |
Binary + operator. Adds each component of the first vector with the corresponding component of the second vector.
lhs | left-hand side operator of addition | |
rhs | right-hand side operator of addition |
Unary - operator. Inverts all components of the vectors.
v | vector which should be inverted |
Binary - operator.
lhs | left-hand side operator of subtraction | |
rhs | right-hand side operator of subtraction |
Divides each element of the vector by the scalar.
lhs | left-hand side operator of division | |
rhs | right-hand side operator of division |
Multiplies each element of the vector with the scalar.
lhs | left-hand side operator of multiplication | |
rhs | right-hand side operator of multiplication |
Multiplies each element of the vector with the same element of the second vector.
lhs | left-hand side operator of multiplication | |
rhs | right-hand side operator of multiplication |
Element-wise division.
lhs | left-hand side operator of division | |
rhs | right-hand side operator of division |
Multiplies each element of the vector with the scalar.
lhs | ||
rhs |
returns true if all coordinates of lhs are greater or equal than rhs
lhs | ||
rhs |
returns true if all coordinates of lhs are lower or equal than rhs
lhs | ||
rhs |
static implicit FlowVis.Math.Vector3f.operator float[] | ( | Vector3f | vector | ) | [static] |
Provides a cast operator to a float array which is needed e.g. for the glVertexfv method.
vector |
float FlowVis.Math.Vector3f.X [get, set] |
value of x-coordinate
float FlowVis.Math.Vector3f.Y [get, set] |
value of y-coordinate
float FlowVis.Math.Vector3f.Z [get, set] |
value of z-coordinate
float FlowVis.Math.Vector3f.this[int index] | ( | ) | [get, set] |
Indexer for vector elements.
index |