Represents a 3D vector of floats for use on both the CPU and GPU. More...
Functions | |
float3 (float m_x, float m_y, float m_z) | |
Constructor : Creates a float3 whose elements have the specified values. More... | |
float3 | add (float3 b) |
Returns the addition of two float3 More... | |
float3 | sub (float3 b) |
Returns the substraction of two float3 More... | |
void | divide (float a) |
Divides the float3 by a specified scalar value More... | |
float3 | multiply (float a) |
Multiplies the float3 by a specified scalar value More... | |
float | norm () |
Returns the length of the float3 More... | |
float | dot (float3 b) |
Returns the dot product of two vectors. More... | |
float3 | cross (float3 b) |
Returns the cross product of two vectors More... | |
Attributes | |
float | x |
The x component of the float3. More... | |
float | y |
the y component of the float3. More... | |
float | z |
the z component of the float3. More... | |
Represents a 3D vector of floats for use on both the CPU and GPU.
|
inline |
Constructor : Creates a float3 whose elements have the specified values.
m_x | value to assign to the x field. |
m_y | value to assign to the y field. |
m_z | value to assign to the z field |
Referenced by float3.add(), float3.cross(), float3.multiply(), and float3.sub().
|
inline |
Divides the float3 by a specified scalar value
a | The scalar value |
|
inline |
|
inline |
Returns the length of the float3
|
inline |
Returns the dot product of two vectors.
b | The second vector |
Returns the cross product of two vectors
b | The second vector |
float x |
The x component of the float3.
Referenced by float3.add(), float3.cross(), float3.divide(), float3.dot(), float3.float3(), float3.multiply(), Matrix3x3.multiply(), float3.norm(), and float3.sub().
float y |
the y component of the float3.
Referenced by float3.add(), float3.cross(), float3.divide(), float3.dot(), float3.float3(), float3.multiply(), Matrix3x3.multiply(), float3.norm(), and float3.sub().
float z |
the z component of the float3.
Referenced by float3.add(), float3.cross(), float3.divide(), float3.dot(), float3.float3(), float3.multiply(), Matrix3x3.multiply(), float3.norm(), and float3.sub().