cone Derived Type

type, public, extends(sdf_base) :: cone

Cone SDF


Components

Type Visibility Attributes Name Initial
type(vector), public :: a
type(vector), public :: b
integer, public :: layer

Layer ID of SDF

type(opticalProp_t), public :: optProps

Optical property of the SDF

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

Transform to apply to SDF.


Constructor

public interface cone

Interface to cone SDF initialising function

  • private function cone_init(a, b, ra, rb, optProp, layer, transform) result(out)

    Initalising function for Capped Cone SDF.

    Arguments

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

    Centre of base of Cone

    type(vector), intent(in) :: b

    Tip of cone

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

    Radius of Cones base

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

    Radius of Cones tip. For rb = 0.0 get normal uncapped cone.

    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(cone)


Type-Bound Procedures

procedure, public :: evaluate => evaluate_cone

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

    Evaluation function for Cone SDF.

    Arguments

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

    Return Value real(kind=wp)

Source Code

    type, extends(sdf_base) :: cone
        type(vector)  :: a, b
        real(kind=wp) :: ra, rb
        contains
        procedure :: evaluate => evaluate_cone
    end type cone