Evaluation function for Elongate modifier.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(elongate), | intent(in) | :: | this | |||
type(vector), | intent(in) | :: | pos |
Position to evaluate the modifier at |
pure elemental function eval_elongate(this, pos) result(res) !! Evaluation function for Elongate modifier. class(elongate), intent(in) :: this !> Position to evaluate the modifier at type(vector), intent(IN) :: pos real(kind=wp) :: res real(kind=wp) :: w type(vector) :: q q = abs(pos) - this%size w = min(max(q%x, max(q%y, q%z)), 0._wp) res = this%prim%evaluate(max(q, 0._wp)) + w end function eval_elongate