A polyhedron named name, of color color (its faces, edges and
vertices), with no faces yet (set_faces, set_triangles or set_grid).
| Type | Intent | Optional | 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) |
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