bend Derived Type

type, public, extends(sdf_base) :: bend

Bend a SDF.


Components

Type Visibility Attributes Name Initial
real(kind=wp), public :: k
integer, public :: layer

Layer ID of SDF

type(opticalProp_t), public :: optProps

Optical property of the SDF

class(sdf_base), public, pointer :: prim
real(kind=wp), public :: transform(4,4)

Transform to apply to SDF.


Constructor

public interface bend

  • 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)


Type-Bound Procedures

procedure, public :: evaluate => eval_bend

  • private pure elemental function eval_bend(this, pos) result(res)

    Evaluation function for Bend modifier.

    Arguments

    Type IntentOptional Attributes Name
    class(bend), intent(in) :: this
    type(vector), intent(in) :: pos

    Position to evaluate the modifier at

    Return Value real(kind=wp)

Source Code

    type, extends(sdf_base) :: bend
        real(kind=wp) :: k
        class(sdf_base), pointer :: prim
        contains
        procedure :: evaluate => eval_bend
    end type bend