Collection of helper functions for SDFs:
This module defines transforms that can be applied to each SDF:
- Rotate_{x,y,z}
- Translate
- RotationAlign (not tested)
- RotMat (not tested)
- Identity
- SkewSymm
Functions
Returns the identity transformation matrix
Arguments
None
Return Value
real(kind=wp), (4,4)
rotation in the x-axis function from here
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
real(kind=wp),
|
intent(in) |
|
|
:: |
angle |
Angle to rotate by
|
Return Value
real(kind=wp), (4,4)
rotation in the y-axis function from here
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
real(kind=wp),
|
intent(in) |
|
|
:: |
angle |
Angle to rotate by
|
Return Value
real(kind=wp), (4,4)
rotation in the z-axis function from here
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
real(kind=wp),
|
intent(in) |
|
|
:: |
angle |
Angle to rotate by
|
Return Value
real(kind=wp), (4,4)
Calculate the rotation matrix to rotate vector a onto b
ref1
ref2
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
type(vector),
|
intent(in) |
|
|
:: |
a |
Vector to rotate. Unit vector
|
type(vector),
|
intent(in) |
|
|
:: |
b |
Vector to be rotated onto. Unit vector
|
Return Value
real(kind=wp), (4,4)
Rotate around around an axis by a given angle taken from here
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
type(vector),
|
intent(in) |
|
|
:: |
axis |
Axis to rotate around
|
real(kind=wp),
|
intent(in) |
|
|
:: |
angle |
Angle to rotate by in degrees
|
Return Value
real(kind=wp), (4,4)
Calculate the Skew Symmetric matrix for a given vector
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
type(vector),
|
intent(in) |
|
|
:: |
a |
Vector to calculate the skew symmetric matrix for.
|
Return Value
real(kind=wp), (4,4)
Returns the Translation matrix for a given vector translation.
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
type(vector),
|
intent(in) |
|
|
:: |
o |
Vector to translate by.
|
Return Value
real(kind=wp), (4,4)