new_model Function

private function new_model(name, file, color) result(m)

A model frame named name (decorations of color color), with the model file file if given (see set_model).

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

the frame's name

character(len=*), intent(in), optional :: file

model file (3ds, obj, glTF, ...)

real(kind=wp), intent(in), optional :: color(:)

[r, g, b] or [r, g, b, a] (0 to 1)

Return Value type(Model)


Calls

proc~~new_model~~CallsGraph proc~new_model new_model proc~set_model Model%set_model proc~new_model->proc~set_model interface~vkf_model_read vkf_model_read proc~set_model->interface~vkf_model_read interface~vkf_node_bound vkf_node_bound proc~set_model->interface~vkf_node_bound

Called by

proc~~new_model~~CalledByGraph proc~new_model new_model interface~model Model interface~model->proc~new_model

Source Code

    function new_model(name, file, color) result(m)
        character(len=*), intent(in) :: name            !! the frame's name
        character(len=*), intent(in), optional :: file  !! model file (3ds, obj, glTF, ...)
        real(wp), intent(in), optional :: color(:)      !! [r, g, b] or [r, g, b, a] (0 to 1)
        type(Model) :: m
        logical :: ok
        m%ReferenceFrame = ReferenceFrame(name, color)
        if (present(file)) ok = m%set_model(file)
    end function new_model