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