4 dimensional floating point vector More...
Public Member Functions | |
void | Zero (void) |
Set all values to zero. | |
void | One (void) |
Set all values to 1.0f. | |
void | Identity (void) |
Initialize the vector elements to identity for a quaternion. | |
float | GetX (void) const |
Return the x component of the vector. | |
float | GetY (void) const |
Return the y component of the vector. | |
float | GetZ (void) const |
Return the z component of the vector. | |
float | GetW (void) const |
Return the w component of the vector. | |
void | SetX (float fX) |
Set the x component of the vector. | |
void | SetY (float fY) |
Set the y component of the vector. | |
void | SetZ (float fZ) |
Set the z component of the vector. | |
void | SetW (float fW) |
Set the w component of the vector. | |
void | Set (float fInput) |
Set all of the members to specific value. | |
void | Set (float fX, float fY) |
Set the values to specific values. | |
void | Set (float fX, float fY, float fZ) |
Set the values to specific values. | |
void | Set (float fX, float fY, float fZ, float fW) |
Set the values to specific values. | |
void | Set (const Vector4D_t *pInput) |
Copy a Vector4D_t. | |
void | Set (const FixedVector4D_t *pInput) |
Convert a fixed point vector into a floating point vector. | |
void | SetRect (float fX, float fY) |
Set the values to as if it's a rectangle. | |
void | SetRect (const Vector2D_t *pMinMax) |
Set the values to as if it's a rectangle. | |
void | SetRect (const Vector2D_t *pMin, const Vector2D_t *pMax) |
Set the values to as if it's a rectangle. | |
void | Negate (void) |
Negate a 4D vector. | |
void | Negate (float fX, float fY, float fZ, float fW) |
Negate the input and store it in this structure. | |
void | Negate (const Vector4D_t *pInput) |
Make a copy of the input after it's been negated. | |
void | Interpolate (const Vector4D_t *pFrom, const Vector4D_t *pTo, float fFactor) |
Interpolate between two vectors. | |
float | Dot (float fX, float fY, float fZ, float fW) const |
Return a dot product of two 4D vectors. | |
float | Dot (const Vector4D_t *pInput) const |
Return a dot product of two 4D vectors. | |
void | Add (const Vector4D_t *pInput) |
Add another vector to this one. | |
void | Add (float fInput) |
Add the same scalar value to each of member values. | |
void | Add (const Vector4D_t *pInput1, const Vector4D_t *pInput2) |
Add two vectors and store the result in this vector. | |
void | Add (const Vector4D_t *pInput, float fInput) |
Add a vector and a scalar to every member of the vector and store the result in this vector. | |
void | Sub (const Vector4D_t *pInput) |
Subtract another vector from this one. | |
void | Sub (float fInput) |
Subtract the same scalar value from each of member values. | |
void | Sub (const Vector4D_t *pInput1, const Vector4D_t *pInput2) |
Subtract two vectors and store the result in this vector. | |
void | Sub (const Vector4D_t *pInput, float fInput) |
Subtract a vector and a scalar to every member of the vector and store the result in this vector. | |
void | Mul (const Vector4D_t *pInput) |
Multiply another vector to this one. | |
void | Mul (float fInput) |
Multiply the same scalar value to each of member values. | |
void | Mul (const Vector4D_t *pInput1, const Vector4D_t *pInput2) |
Multiply two vectors and store the result in this vector. | |
void | Mul (const Vector4D_t *pInput, float fInput) |
Multiply a vector and a scalar to every member of the vector and store the result in this vector. | |
float | GetLengthSquared (void) const |
Returns the square of the length of a 4D vector. | |
float | GetLength (void) const |
Return the length of a vector (High precision) | |
float | GetLengthFast (void) const |
Return the length of a vector (Good precision) | |
void | SetLength (float fInput) |
Normalize a 4D vector to a specific length (High precision) | |
void | SetLengthFast (float fInput) |
Normalize a 3D vector to a specific length (Good precision) | |
float | GetDistanceSquared (float fX, float fY, float fZ, float fW) const |
Returns the square of the distance between two 4D points. | |
float | GetDistanceSquared (const Vector4D_t *pInput) const |
Returns the square of the distance between two 4D points. | |
float | GetDistance (float fX, float fY, float fZ, float fW) const |
Returns the square of the distance between two 4D points. | |
float | GetDistance (const Vector4D_t *pInput) const |
Returns the square of the distance between two 4D points. | |
float | GetDistanceFast (float fX, float fY, float fZ, float fW) const |
Returns the square of the distance between two 4D points (Good precision) | |
float | GetDistanceFast (const Vector4D_t *pInput) const |
Returns the square of the distance between two 4D points (Good precision) | |
void | Normalize (void) |
Normalize a 4D vector. | |
void | Normalize (float fX, float fY, float fZ, float fW) |
Copy a normalized 4D vector. | |
void | Normalize (const Vector4D_t *pInput) |
Copy a normalized 4D vector. | |
void | NormalizeFast (void) |
Normalize a 4D vector (Good precision) | |
void | NormalizeFast (float fX, float fY, float fZ, float fW) |
Copy a normalized 4D vector. | |
void | NormalizeFast (const Vector4D_t *pInput) |
Copy a normalized 4D vector. | |
float | Dot3 (float fX, float fY, float fZ) const |
Return a dot product of two 3D vectors. | |
float | Dot3 (const Vector4D_t *pInput) const |
Return a dot product of two 4D vectors using only x,y and z. | |
void | QuaternionNegate (void) |
Negate a quaternion. | |
void | QuaternionNegate (float fX, float fY, float fZ, float fW) |
Negate the input quaternion and store it in this structure. | |
void | QuaternionNegate (const Vector4D_t *pInput) |
Make a copy of the input quaternion after it's been negated. | |
void | QuaternionMul (const Vector4D_t *pInput) |
Multiply a quaternion by another quaternion. | |
void | QuaternionMul (const Vector4D_t *pInput1, const Vector4D_t *pInput2) |
Multiply a quaternion by another quaternion and store it here. | |
void | QuaternionMulNormalize (const Vector4D_t *pInput) |
Multiply a quaternion by another quaternion. | |
void | QuaternionMulNormalize (const Vector4D_t *pInput1, const Vector4D_t *pInput2) |
Multiply a quaternion by another quaternion and store it here. | |
uint_t | BitwiseEqual (const Vector4D_t *pInput) const |
Compare two Vector4D_t's for bitwise equality. | |
float & | operator[] (uint_t uInput) |
Access the members as an array. | |
const float & | operator[] (uint_t uInput) const |
Access the members as an array. | |
uint_t | operator== (const Vector4D_t &rInput) const |
Compare two Vector4D_t's for equality. | |
uint_t | operator!= (const Vector4D_t &rInput) const |
Compare two Vector4D_t's for inequality. | |
operator const float * () const | |
Convert to a const float pointer. | |
const Vector2D_t * | GetTopLeft (void) const |
Get the top left corner of the rectangle. | |
const Vector2D_t * | GetBottomRight (void) const |
Get the top left corner of the rectangle. | |
Vector2D_t * | GetTopLeft (void) |
Get the top left corner of the rectangle. | |
Vector2D_t * | GetBottomRight (void) |
Get the top left corner of the rectangle. | |
float | GetWidth (void) const |
Get the width of the rectangle. | |
float | GetHeight (void) const |
Get the height of the rectangle. | |
float | GetLeft (void) const |
Get the leftmost X coordinate of the rectangle. | |
float | GetTop (void) const |
Get the topmost Y coordinate of the rectangle. | |
float | GetRight (void) const |
Get the rightmost X coordinate of the rectangle. | |
float | GetBottom (void) const |
Get the bottommost Y coordinate of the rectangle. | |
void | SetWidth (float fWidth) |
Set the width of a rectangle. | |
void | SetHeight (float fHeight) |
Set the height of a rectangle. | |
void | SetSize (float fWidth, float fHeight) |
Set the size of a rectangle. | |
void | SetLeft (float fLeft) |
Set the left most X coordinate of a rectangle. | |
void | SetTop (float fTop) |
Set the top most Y coordinate of a rectangle. | |
void | SetRight (float fRight) |
Set the right most X coordinate of a rectangle. | |
void | SetBottom (float fBottom) |
Set the bottom most Y coordinate of a rectangle. | |
uint_t | IsInsideRect (float fX, float fY) const |
Test if a point is inside a rectangle. | |
uint_t | IsInsideRect (const Vector2D_t *pInput) const |
Test if a point is inside a rectangle. | |
void | ExpandRect (float fX, float fY) |
Enlarge a rectangle to encompass a point. | |
void | ExpandRect (const Vector2D_t *pInput) |
Enlarge a rectangle to encompass a point. | |
void | ExpandRect (const Vector4D_t *pInput) |
Enlarge a rectangle to encompass a rectangle. | |
Public Attributes | |
float | x |
32 bit floating point X value for the 4D Vector (LeftX) | |
float | y |
32 bit floating point Y value for the 4D Vector (TopY) | |
float | z |
32 bit floating point Z value for the 4D Vector (RightX) | |
float | w |
32 bit floating point W value for the 4D Vector (BottomY) | |
4 dimensional floating point vector
This 16 byte vector contains x,y,z and w 32 bit floating point coordinates. A set of common functions for simple 4 dimensional math are part of the structure.
It is expected to be 4 byte aligned and use scalar math. The members are hard coded to be "x", "y", "z" and "w" for maximum compatibility
|
inline |
Add another vector to this one.
pInput | Vector to add |
|
inline |
Add a vector and a scalar to every member of the vector and store the result in this vector.
Initialize this vector with the result of the addition of the input vector and a scalar applied to every member.
pInput | Vector to add the scalar to |
fInput | Scalar to add to the vector |
|
inline |
Add two vectors and store the result in this vector.
Initialize this vector with the result of the addition of the two input vectors.
pInput1 | First vector to add |
pInput2 | Second vector to add |
|
inline |
Add the same scalar value to each of member values.
fInput | Value to add |
uint_t BURGER_API Burger::Vector4D_t::BitwiseEqual | ( | const Vector4D_t * | pInput | ) | const |
Compare two Vector4D_t's for bitwise equality.
Unlike operator==(const Vector4D_t &) const, this function performs a bitwise comparison, which in some cases is faster if pure equality detection is desired.
pInput | Pointer to the Vector4D_t to compare against |
|
inline |
Return a dot product of two 4D vectors.
pInput | Valid pointer to a Vector4D_t structure to perform a dot product against |
|
inline |
Return a dot product of two 4D vectors.
fX | X value to dot against |
fY | Y value to dot against |
fZ | Z value to dot against |
fW | W value to dot against |
|
inline |
Return a dot product of two 4D vectors using only x,y and z.
Performs a dot product with the w term set to 0.0f
pInput | Valid pointer to a Vector4D_t structure to perform a three term dot product against |
|
inline |
Return a dot product of two 3D vectors.
fX | X value to dot against |
fY | Y value to dot against |
fZ | Z value to dot against |
Performs a dot product with the w term set to 0.0f
void BURGER_API Burger::Vector4D_t::ExpandRect | ( | const Vector2D_t * | pInput | ) |
Enlarge a rectangle to encompass a point.
If the x,y coordinate is inside the rectangle, no action will be performed. If it's outside, the rectangle will be enlarged just enough to encompass the new point.
pInput | Pointer to an X/Y coordinate to expand the rectangle with. |
void BURGER_API Burger::Vector4D_t::ExpandRect | ( | const Vector4D_t * | pInput | ) |
Enlarge a rectangle to encompass a rectangle.
If the left,top and right,bottom coordinates are inside the rectangle, no action will be performed. If it's outside, the rectangle will be enlarged just enough to encompass the new rectangle.
pInput | Pointer to an Left/Top/Right/Bottom coordinate to expand the rectangle with. |
void BURGER_API Burger::Vector4D_t::ExpandRect | ( | float | fX, |
float | fY ) |
Enlarge a rectangle to encompass a point.
If the x,y coordinate is inside the rectangle, no action will be performed. If it's outside, the rectangle will be enlarged just enough to encompass the new point.
fX | X coordinate to expand the x and z elements with |
fY | Y coordinate to expand the y and w elements width |
|
inline |
Get the bottommost Y coordinate of the rectangle.
Returns the bottommost Y component of the rectangle. The w value shadows the BottomY value.
|
inline |
Get the top left corner of the rectangle.
This function casts a pointer to the z and w elements of the Vector4D_t to a Vector2D_t which represents the bottom-right corner of a rectangle.
|
inline |
Get the top left corner of the rectangle.
This function casts a pointer to the z and w elements of the Vector4D_t to a Vector2D_t which represents the bottom-right corner of a rectangle.
float BURGER_API Burger::Vector4D_t::GetDistance | ( | const Vector4D_t * | pInput | ) | const |
Returns the square of the distance between two 4D points.
Create a vector from the difference of two 4D points and return the vector's length
pInput | Valid pointer to a Vector4D_t structure that contains the other 4D point |
float BURGER_API Burger::Vector4D_t::GetDistance | ( | float | fX, |
float | fY, | ||
float | fZ, | ||
float | fW ) const |
Returns the square of the distance between two 4D points.
Create a vector from the difference of two 4D points and return the vector's length
fX | X value of the other 4D point |
fY | Y value of the other 4D point |
fZ | Z value of the other 4D point |
fW | W value of the other 4D point |
float BURGER_API Burger::Vector4D_t::GetDistanceFast | ( | const Vector4D_t * | pInput | ) | const |
Returns the square of the distance between two 4D points (Good precision)
Create a vector from the difference of two 4D points and return the vector's length
On some systems, lower precision instructions are used to increase speed at the cost of precision. If the calculation doesn't rely on high precision, use this function for higher performance
pInput | Valid pointer to a Vector4D_t structure that contains the other 4D point |
float BURGER_API Burger::Vector4D_t::GetDistanceFast | ( | float | fX, |
float | fY, | ||
float | fZ, | ||
float | fW ) const |
Returns the square of the distance between two 4D points (Good precision)
Create a vector from the difference of two 4D points and return the vector's length
On some systems, lower precision instructions are used to increase speed at the cost of precision. If the calculation doesn't rely on high precision, use this function for higher performance
fX | X value of the other 4D point |
fY | Y value of the other 4D point |
fZ | Z value of the other 4D point |
fW | W value of the other 4D point |
float BURGER_API Burger::Vector4D_t::GetDistanceSquared | ( | const Vector4D_t * | pInput | ) | const |
Returns the square of the distance between two 4D points.
Create a vector from the difference of two 4D points and return the vector's length squared
pInput | Valid pointer to a Vector4D_t structure that contains the other 4D point |
float BURGER_API Burger::Vector4D_t::GetDistanceSquared | ( | float | fX, |
float | fY, | ||
float | fZ, | ||
float | fW ) const |
Returns the square of the distance between two 4D points.
Create a vector from the difference of two 4D points and return the vector's length squared
fX | X value of the other 4D point |
fY | Y value of the other 4D point |
fZ | Z value of the other 4D point |
fW | W value of the other 4D point |
|
inline |
Get the height of the rectangle.
This function subtracts the y component from the w component to create the height of the rectangle.
|
inline |
Get the leftmost X coordinate of the rectangle.
Returns the leftmost X component of the rectangle. The x value shadows the LeftX value.
|
inline |
Return the length of a vector (High precision)
|
inline |
Return the length of a vector (Good precision)
On some systems, lower precision instructions are used to increase speed at the cost of precision. If the calculation doesn't rely on high precision, use this function for higher performance
|
inline |
Returns the square of the length of a 4D vector.
|
inline |
Get the rightmost X coordinate of the rectangle.
Returns the rightmost X component of the rectangle. The z value shadows the RightX value.
|
inline |
Get the topmost Y coordinate of the rectangle.
Returns the topmost Y component of the rectangle. The y value shadows the TopY value.
|
inline |
Get the top left corner of the rectangle.
This function casts a pointer to the x and y elements of the Vector4D_t to a Vector2D_t which represents the top-left corner of a rectangle.
|
inline |
Get the top left corner of the rectangle.
This function casts a pointer to the x and y elements of the Vector4D_t to a Vector2D_t which represents the top-left corner of a rectangle.
|
inline |
|
inline |
Get the width of the rectangle.
This function subtracts the x component from the z component to create the width of the rectangle.
|
inline |
|
inline |
|
inline |
|
inline |
Initialize the vector elements to identity for a quaternion.
Fills x, y, and z with 0.0f and w is filled in with 1.0f. Thereby initializing the structure to the equivalant of a quaternion identity..
void BURGER_API Burger::Vector4D_t::Interpolate | ( | const Vector4D_t * | pFrom, |
const Vector4D_t * | pTo, | ||
float | fFactor ) |
Interpolate between two vectors.
Given a factor between 0.0f and 1.0f inclusive, perform a linear scale between the two vectors and return pFrom if the factor is 0.0f and pTo if the factor is 1.0f
No clamping is performed.
pFrom | Valid pointer to a Vector4D_t structure for a factor of 0.0f |
pTo | Valid pointer to a Vector4D_t structure for a factor of 1.0f |
fFactor | Scale value between 0.0f and 1.0f inclusive |
|
inline |
Test if a point is inside a rectangle.
Test the x,y coordinate in the Vector2D_t if it inside the rectangle this Vector4D_t represents.
pInput | Pointer to a two dimensional point |
|
inline |
Test if a point is inside a rectangle.
Test the x,y coordinate if it inside the rectangle this Vector4D_t represents.
fX | X coordinate to test |
fY | Y coordinate to test |
|
inline |
Multiply another vector to this one.
pInput | Vector to multiply |
|
inline |
Multiply a vector and a scalar to every member of the vector and store the result in this vector.
Initialize this vector with the result of the multiplication of the input vector and a scalar applied to every member.
pInput | Vector to multiply the scalar to |
fInput | Scalar to multiply to the vector |
|
inline |
Multiply two vectors and store the result in this vector.
Initialize this vector with the result of the multiplication of the two input vectors.
pInput1 | First vector to multiply |
pInput2 | Second vector to multiply |
|
inline |
Multiply the same scalar value to each of member values.
fInput | Value to multiply |
|
inline |
Make a copy of the input after it's been negated.
Copy the input data and negate it.
pInput | Valid pointer to a Vector4D_t structure to copy and negate |
|
inline |
Negate the input and store it in this structure.
Set the x,y,z and w values to -fX,-fY,-fZ and -fW respectively
fX | X value to negate |
fY | Y value to negate |
fZ | Z value to negate |
fW | W value to negate |
|
inline |
Negate a 4D vector.
Set the x,y,z and w values to -x,-y,-z and -w respectively
void BURGER_API Burger::Vector4D_t::Normalize | ( | const Vector4D_t * | pInput | ) |
Copy a normalized 4D vector.
Make a copy of a 4D vector and set the copy's length to 1.0f
pInput | Valid pointer to a Vector4D_t structure that will be copied and normalize |
void BURGER_API Burger::Vector4D_t::Normalize | ( | float | fX, |
float | fY, | ||
float | fZ, | ||
float | fW ) |
Copy a normalized 4D vector.
Make a copy of a 4D vector and set the copy's length to 1.0f
fX | X value of the 4D vector to normalize |
fY | Y value of the 4D vector to normalize |
fZ | Z value of the 4D vector to normalize |
fW | W value of the 4D vector to normalize |
void BURGER_API Burger::Vector4D_t::Normalize | ( | void | ) |
Normalize a 4D vector.
Set the 4D vector's length to 1.0f
void BURGER_API Burger::Vector4D_t::NormalizeFast | ( | const Vector4D_t * | pInput | ) |
Copy a normalized 4D vector.
Make a copy of a 4D vector and set the copy's length to 1.0f
On some systems, lower precision instructions are used to increase speed at the cost of precision. If the calculation doesn't rely on high precision, use this function for higher performance
pInput | Valid pointer to a Vector4D_t structure that will be copied and normalize |
void BURGER_API Burger::Vector4D_t::NormalizeFast | ( | float | fX, |
float | fY, | ||
float | fZ, | ||
float | fW ) |
Copy a normalized 4D vector.
Make a copy of a 4D vector and set the copy's length to 1.0f
On some systems, lower precision instructions are used to increase speed at the cost of precision. If the calculation doesn't rely on high precision, use this function for higher performance
fX | X value of the 4D vector to normalize |
fY | Y value of the 4D vector to normalize |
fZ | Z value of the 4D vector to normalize |
fW | W value of the 4D vector to normalize |
void BURGER_API Burger::Vector4D_t::NormalizeFast | ( | void | ) |
Normalize a 4D vector (Good precision)
Set the 4D vector's length to 1.0f
On some systems, lower precision instructions are used to increase speed at the cost of precision. If the calculation doesn't rely on high precision, use this function for higher performance
|
inline |
|
inline |
Convert to a const float pointer.
This convenience operator converts the Vector4D_t into a float pointer to pass to other APIs that treat this as an array of 32 bit floats.
|
inline |
Compare two Vector4D_t's for inequality.
rInput | Reference to the Vector4D_t to compare against |
|
inline |
Compare two Vector4D_t's for equality.
rInput | Reference to the Vector4D_t to compare against |
|
inline |
Access the members as an array.
uInput | 0 for x, 1 for y, 2 for z, 3 for w, any other value is an error |
|
inline |
Access the members as an array.
uInput | 0 for x, 1 for y, 2 for z, 3 for w, any other value is an error |
void BURGER_API Burger::Vector4D_t::QuaternionMul | ( | const Vector4D_t * | pInput | ) |
Multiply a quaternion by another quaternion.
Apply the multiplication using this formula from Wikipedia http://en.wikipedia.org/wiki/Quaternion#Ordered_list_form
Quaternion 1 is this instance and Quaternion2 is the parameter
pInput | Valid pointer to a Vector4D_t quaternion to multiply against |
void BURGER_API Burger::Vector4D_t::QuaternionMul | ( | const Vector4D_t * | pInput1, |
const Vector4D_t * | pInput2 ) |
Multiply a quaternion by another quaternion and store it here.
Apply the multiplication using this formula from Wikipedia http://en.wikipedia.org/wiki/Quaternion#Ordered_list_form
Quaternion 1 is the first parameter and Quaternion2 is the second parameter
pInput1 | Valid pointer to a Vector4D_t quaternion to multiply with |
pInput2 | Valid pointer to a Vector4D_t quaternion to multiply against |
void BURGER_API Burger::Vector4D_t::QuaternionMulNormalize | ( | const Vector4D_t * | pInput | ) |
Multiply a quaternion by another quaternion.
Apply the multiplication using this formula from Wikipedia http://en.wikipedia.org/wiki/Quaternion#Ordered_list_form
Quaternion 1 is this instance and Quaternion2 is the parameter
Afterwards, the quaternion is normalized
pInput | Valid pointer to a Vector4D_t quaternion to multiply against |
void BURGER_API Burger::Vector4D_t::QuaternionMulNormalize | ( | const Vector4D_t * | pInput1, |
const Vector4D_t * | pInput2 ) |
Multiply a quaternion by another quaternion and store it here.
Apply the multiplication using this formula from Wikipedia http://en.wikipedia.org/wiki/Quaternion#Ordered_list_form
Quaternion 1 is the first parameter and Quaternion2 is the second parameter
Afterwards, the quaternion is normalized
pInput1 | Valid pointer to a Vector4D_t quaternion to multiply with |
pInput2 | Valid pointer to a Vector4D_t quaternion to multiply against |
|
inline |
Make a copy of the input quaternion after it's been negated.
Copy the input data and negate it in the form of -x, -y, -z and w
pInput | Valid pointer to a Vector4D_t structure to copy and negate as a quaternion |
|
inline |
Negate the input quaternion and store it in this structure.
Set the x,y,z and w values to -fX,-fY,-fZ and fW respectively
fX | X value to negate |
fY | Y value to negate |
fZ | Z value to negate |
fW | W value to negate |
|
inline |
Negate a quaternion.
Set the x,y,z and w values to -x,-y,-z and w respectively
void BURGER_API Burger::Vector4D_t::Set | ( | const FixedVector4D_t * | pInput | ) |
Convert a fixed point vector into a floating point vector.
pInput | Valid pointer to a FixedVector4D_t structure to copy |
|
inline |
Copy a Vector4D_t.
Make a copy of a Vector4D_t
pInput | Valid pointer to a Vector4D_t structure to copy |
|
inline |
Set all of the members to specific value.
Sets the x,y,z and w values to a specific value
fInput | New value for all members |
|
inline |
Set the values to specific values.
Sets the x and y values to specific values. z is set to 0.0f and w is set to 1.0f
fX | New x value |
fY | New y value |
|
inline |
Set the values to specific values.
Sets the x, y and z values to specific values. w is set to 1.0f
fX | New x value |
fY | New y value |
fZ | New z value |
|
inline |
Set the values to specific values.
Sets the x, y, z and w values to specific values.
fX | New x value |
fY | New y value |
fZ | New z value |
fW | New w value |
|
inline |
Set the bottom most Y coordinate of a rectangle.
Set the bottom most Y coordinate to a specific value. No bounds checking is performed to prevent unsorted rectangles.
fBottom | Requested bottom most Y coordinate of the rectangle. |
|
inline |
Set the height of a rectangle.
Set the bottom most Y coordinate so the rectangle will be the requested height. No bounds checking is performed, so unsorted rectangles are possible on overflow or underflow input.
fHeight | Requested height of the rectangle. |
|
inline |
Set the left most X coordinate of a rectangle.
Set the left most X coordinate to a specific value. No bounds checking is performed to prevent unsorted rectangles.
fLeft | Requested left most X coordinate of the rectangle. |
void BURGER_API Burger::Vector4D_t::SetLength | ( | float | fInput | ) |
Normalize a 4D vector to a specific length (High precision)
Set the 4D vector's length to fInput
fInput | Length to set the vector to |
void BURGER_API Burger::Vector4D_t::SetLengthFast | ( | float | fInput | ) |
Normalize a 3D vector to a specific length (Good precision)
Set the 3D vector's length to fInput
On some systems, lower precision instructions are used to increase speed at the cost of precision. If the calculation doesn't rely on high precision, use this function for higher performance
fInput | Length to set the vector to |
|
inline |
Set the values to as if it's a rectangle.
Sets the x and y values to pMin and z and w to pMax. This treats the Vector4D_t as if it's a rectangle.
pMin | Pointer to a point that will be used as the upper left corner. |
pMax | Pointer to a point that will be used as the lower right corner. |
|
inline |
Set the values to as if it's a rectangle.
Sets the x and z values to pMinMax->x and y and w to pMinMax->y. This treats the Vector4D_t as if it's a rectangle that's a single point.
pMinMax | Pointer to a point that will be used as the minimum and maximum size. |
|
inline |
Set the values to as if it's a rectangle.
Sets the x and z values to fX and y and w to fY. This treats the Vector4D_t as if it's a rectangle that's a single point.
fX | New x and z value |
fY | New y and w value |
|
inline |
Set the right most X coordinate of a rectangle.
Set the right most X coordinate to a specific value. No bounds checking is performed to prevent unsorted rectangles.
fRight | Requested right most X coordinate of the rectangle. |
|
inline |
Set the size of a rectangle.
Set the right most X coordinate and the bottom most Y coordinate so the rectangle will be the requested width and height. No bounds checking is performed, so unsorted rectangles are possible on overflow or underflow input.
fWidth | Requested width of the rectangle. |
fHeight | Requested height of the rectangle. |
|
inline |
Set the top most Y coordinate of a rectangle.
Set the top most X coordinate to a specific value. No bounds checking is performed to prevent unsorted rectangles.
fTop | Requested top most Y coordinate of the rectangle. |
|
inline |
Set the w component of the vector.
fW | The new w component of the vector. |
|
inline |
Set the width of a rectangle.
Set the right most X coordinate so the rectangle will be the requested width. No bounds checking is performed, so unsorted rectangles are possible on overflow or underflow input.
fWidth | Requested width of the rectangle. |
|
inline |
Set the x component of the vector.
fX | The new x component of the vector. |
|
inline |
Set the y component of the vector.
fY | The new y component of the vector. |
|
inline |
Set the z component of the vector.
fZ | The new z component of the vector. |
|
inline |
Subtract another vector from this one.
pInput | Vector to subtract |
|
inline |
Subtract a vector and a scalar to every member of the vector and store the result in this vector.
Initialize this vector with the result of the subtraction of the input vector and a scalar applied to every member.
pInput | Vector to subtract the scalar from |
fInput | Scalar to subtract from the vector |
|
inline |
Subtract two vectors and store the result in this vector.
Initialize this vector with the result of the subtraction of the two input vectors.
pInput1 | First vector to subtract from |
pInput2 | Second vector to subtract with |
|
inline |
Subtract the same scalar value from each of member values.
fInput | Value to subtract |
|
inline |
float Burger::Vector4D_t::w |
32 bit floating point W value for the 4D Vector (BottomY)
float Burger::Vector4D_t::x |
32 bit floating point X value for the 4D Vector (LeftX)
float Burger::Vector4D_t::y |
32 bit floating point Y value for the 4D Vector (TopY)
float Burger::Vector4D_t::z |
32 bit floating point Z value for the 4D Vector (RightX)