Initialise the displacement modifier for a SDF.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(sdf_base), | target | :: | prim |
SDF to modify |
||
procedure(primitive) | :: | func |
Function to displace the SDF with. |
type(displacement) function displacement_init(prim, func) result(out) !! Initialise the displacement modifier for a SDF. !> SDF to modify class(sdf_base), target :: prim !> Function to displace the SDF with. procedure(primitive) :: func out%func => func out%prim => prim out%optProps = prim%optProps out%layer = prim%layer out%transform = identity() end function displacement_init