Initalising function for Cylinder SDF.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector), | intent(in) | :: | a |
Vector position at centre of the bottom circle |
||
type(vector), | intent(in) | :: | b |
Vector position at centre of the top circle |
||
real(kind=wp), | intent(in) | :: | radius |
Radius of cylinder |
||
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 |
function cylinder_init(a, b, radius, optProp, layer, transform) result(out) !! Initalising function for Cylinder SDF. type(cylinder) :: out !> Radius of cylinder real(kind=wp), intent(in) :: radius !> Vector position at centre of the bottom circle type(vector), intent(IN) :: a !> Vector position at centre of the top circle type(vector), intent(IN) :: b !> ID number of sdf integer, intent(IN) :: layer !> Optional transform to apply to SDF real(kind=wp), optional, intent(IN) :: transform(4, 4) !> Optical properties of the SDF type(opticalProp_t), intent(in) :: optProp real(kind=wp) :: t(4, 4) if(present(transform))then t = transform else t = identity() end if out%a = a out%b = b out%radius = radius out%layer = layer out%transform = t out%optProps = optProp end function cylinder_init