bend_init Function

private function bend_init(prim, k) result(out)

Initialise the Bend modifier for a SDF.

Arguments

Type IntentOptional Attributes Name
class(sdf_base), target :: prim

SDF to modify

real(kind=wp), intent(in) :: k

Amoun to bend by.

Return Value type(bend)


Source Code

    type(bend) function bend_init(prim, k) result(out)
        !! Initialise the Bend modifier for a SDF.
        
        !> SDF to modify
        class(sdf_base), target :: prim
        !> Amoun to bend by.
        real(kind=wp), intent(IN) :: k

        out%k = k
        out%prim => prim

        out%optProps = prim%optProps

        out%layer = prim%layer
        out%transform = identity()

    end function bend_init