box Derived Type

type, public, extends(sdf_base) :: box

Box SDF


Components

Type Visibility Attributes Name Initial
integer, public :: layer

Layer ID of SDF

type(vector), public :: lengths

Length of each dimension of the box

type(opticalProp_t), public :: optProps

Optical property of the SDF

real(kind=wp), public :: transform(4,4)

Transform to apply to SDF.


Constructor

public interface box

Interface to box SDF initialising function

  • private function box_init(lengths, optProp, layer, transform) result(out)

    Initalising function for Box SDF.

    Arguments

    Type IntentOptional Attributes Name
    type(vector), intent(in) :: lengths

    Lengths of each dimension of the box

    type(opticalProp_t), intent(in) :: optProp

    Optical properties of the SDF

    integer, intent(in) :: layer

    ID number of sdf

    real(kind=wp), intent(in), optional :: transform(4,4)

    Optional transform to apply to SDF

    Return Value type(box)


Type-Bound Procedures

procedure, public :: evaluate => evaluate_box

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

    Evaluation function for Box SDF.

    Arguments

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

    vector position to evaluate SDF at

    Return Value real(kind=wp)

Source Code

    type, extends(sdf_base) :: box
        !> Length of each dimension of the box
        type(vector) :: lengths
        contains
        procedure :: evaluate => evaluate_box
    end type box