onion Derived Type

type, public, extends(sdf_base) :: onion

Carves or gives thickness to SDFs


Components

Type Visibility Attributes Name Initial
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 :: thickness
real(kind=wp), public :: transform(4,4)

Transform to apply to SDF.


Constructor

public interface onion

  • private function onion_init(prim, thickness) result(out)

    Initialise the Onion modifier for a SDF.

    Arguments

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

    SDF to modify

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

    Thickned to onion by.

    Return Value type(onion)


Type-Bound Procedures

procedure, public :: evaluate => eval_onion

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

    Evaluation function for Onion modifier.

    Arguments

    Type IntentOptional Attributes Name
    class(onion), 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) :: onion
        real(kind=wp) :: thickness
        class(sdf_base), pointer :: prim
        contains
        procedure :: evaluate => eval_onion
    end type onion