Vector class module. Defines a vector type (x, y, z) and associated operations on vectors and other types.
Overload of the abs intrinsic for a vec3
Overload of the max intrinsic for a vec3
Get the max value elementwise between a vec3 and a scalar
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector), | intent(in) | :: | this |
Input vector |
||
real(kind=wp), | intent(in) | :: | val |
Input max value |
Get the max value in a vec3
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector), | intent(in) | :: | this |
Input vector |
Overload of the min intrinsic for a vec3
Get the min value elementwise between a vec3 and a scalar
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector), | intent(in) | :: | this |
Input vector |
||
real(kind=wp), | intent(in) | :: | val |
Input minimum value |
Get the min value in a vec3
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector), | intent(in) | :: | this |
Input vector |
Vector class
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=wp), | public | :: | x |
vector components |
|||
real(kind=wp), | public | :: | y |
vector components |
|||
real(kind=wp), | public | :: | z |
vector components |
procedure, public :: length | ../../ Returns the length of the vector |
procedure, public :: magnitude | ../../ Returns the magnitude of the vector |
generic, public :: operator(*) => vec_mult_vec, vec_mult_scal, scal_mult_vec | ../../ Overloads the Multiplication operator for vec3 |
generic, public :: operator(**) => vec_mult_exp_scal_int, vec_mult_exp_scal_r4, vec_mult_exp_scal_r8 | ../../ Overloads the exponential operator for vec3 |
generic, public :: operator(+) => vec_add_vec, vec_add_scal, scal_add_vec | ../../ Overloads the Addition operator for vec3 |
generic, public :: operator(-) => vec_minus_vec, vec_minus_scal, scal_minus_vec | ../../ Overloads the Subtraction operator for vec3 |
generic, public :: operator(.cross.) => vec_cross_vec | ../../ .cross. operator. Cross product |
generic, public :: operator(.dot.) => vec_dot_vec, vec_dot_mat | ../../ .dot. operator. Dot product |
generic, public :: operator(/) => vec_div_scal_r4, vec_div_scal_r8, vec_div_scal_int | ../../ Overloads the Division operator for vec3 |
generic, public :: operator(==) => vec_equal_vec | ../../ Overloads the equal operator for vec3 |
procedure, private, pass(b) :: scal_add_vec | |
procedure, private, pass(b) :: scal_minus_vec | |
procedure, private, pass(b) :: scal_mult_vec | |
procedure, private, pass(a) :: vec_add_scal | |
procedure, private, pass(a) :: vec_add_vec | |
procedure, private, pass(a) :: vec_cross_vec | |
procedure, private, pass(a) :: vec_div_scal_int | |
procedure, private, pass(a) :: vec_div_scal_r4 | |
procedure, private, pass(a) :: vec_div_scal_r8 | |
procedure, private, pass(a) :: vec_dot_mat | |
procedure, private, pass(a) :: vec_dot_vec | |
procedure, private, pass(a) :: vec_equal_vec | |
procedure, private, pass(a) :: vec_minus_scal | |
procedure, private, pass(a) :: vec_minus_vec | |
procedure, private, pass(a) :: vec_mult_exp_scal_int | |
procedure, private, pass(a) :: vec_mult_exp_scal_r4 | |
procedure, private, pass(a) :: vec_mult_exp_scal_r8 | |
procedure, private, pass(a) :: vec_mult_scal | |
procedure, private, pass(a) :: vec_mult_vec |
Returns the length of a vec3
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(vector), | intent(in) | :: | this |
Get the max value in a vec3
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector), | intent(in) | :: | this |
Input vector |
Get the min value in a vec3
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector), | intent(in) | :: | this |
Input vector |