revolution Derived Type

type, public, extends(sdf_base) :: revolution

Revoloution modifier. Revolves an SDF around the z axis (need to check this!!)


Components

Type Visibility Attributes Name Initial
integer, public :: layer

Layer ID of SDF

real(kind=wp), public :: o
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 revolution

  • private function revolution_init(prim, o) result(out)

    Initialise the Revolution modifier for a SDF.

    Arguments

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

    SDF to modify

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

    Amount to revolve by.

    Return Value type(revolution)


Type-Bound Procedures

procedure, public :: evaluate => eval_revolution

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

    Evaluation function for Revolution modifier.

    Arguments

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