new_polyhedron Function

private function new_polyhedron(name, color) result(p)

A polyhedron named name, of color color (its faces, edges and vertices), with no faces yet (set_faces, set_triangles or set_grid).

Arguments

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

the frame's name

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

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

Return Value type(Polyhedron)


Calls

proc~~new_polyhedron~~CallsGraph proc~new_polyhedron new_polyhedron proc~color~2 ReferenceFrame%color proc~new_polyhedron->proc~color~2

Called by

proc~~new_polyhedron~~CalledByGraph proc~new_polyhedron new_polyhedron interface~polyhedron Polyhedron interface~polyhedron->proc~new_polyhedron

Source Code

    function new_polyhedron(name, color) result(p)
        character(len=*), intent(in) :: name                !! the frame's name
        real(wp), intent(in), optional :: color(:)          !! [r, g, b] or [r, g, b, a] (0 to 1)
        type(Polyhedron) :: p
        p%ReferenceFrame = ReferenceFrame(name, color)
        p%face_color_ = p%color()
        p%line_color_ = p%color()
        p%point_color_ = p%color()
        allocate(p%v(3, 0), p%tri(3, 0), p%edge(2, 0))
    end function new_polyhedron