private subroutine set_vertex_colors(self, colors)
A color per vertex (4, n) or (3, n) ([r, g, b(, a)], 0 to 1), for the
faces, blended across them (in place of the face color; the opacity
still applies). Dropped when the faces are set again.
Type Bound
Polyhedron
Arguments
Type
Intent Optional Attributes
Name
class(Polyhedron ),
intent(inout)
::
self
real(kind=wp),
intent(in)
::
colors (:,:)
(4, n) or (3, n): [r, g, b(, a)] (0 to 1)
proc~~set_vertex_colors~~CallsGraph
proc~set_vertex_colors
Polyhedron%set_vertex_colors
proc~make_polyhedron
make_polyhedron
proc~set_vertex_colors->proc~make_polyhedron
proc~name
ReferenceFrame%name
proc~set_vertex_colors->proc~name
proc~set_rgba
set_rgba
proc~set_vertex_colors->proc~set_rgba
interface~vkf_switch_create
vkf_switch_create
proc~make_polyhedron->interface~vkf_switch_create
proc~add
add
proc~make_polyhedron->proc~add
proc~line_node
line_node
proc~make_polyhedron->proc~line_node
proc~marker_node
marker_node
proc~make_polyhedron->proc~marker_node
proc~replace
ShapeNodes%replace
proc~make_polyhedron->proc~replace
proc~surface_node
surface_node
proc~make_polyhedron->proc~surface_node
proc~unit_normal
unit_normal
proc~make_polyhedron->proc~unit_normal
proc~vertex_normals
vertex_normals
proc~make_polyhedron->proc~vertex_normals
proc~vertices_sphere
vertices_sphere
proc~make_polyhedron->proc~vertices_sphere
interface~vkf_node_add_child
vkf_node_add_child
proc~add->interface~vkf_node_add_child
interface~vkf_node_delete
vkf_node_delete
proc~add->interface~vkf_node_delete
proc~check_status
check_status
proc~add->proc~check_status
interface~vkf_line_create
vkf_line_create
proc~line_node->interface~vkf_line_create
proc~line_node->proc~check_status
proc~line_set_points
line_set_points
proc~line_node->proc~line_set_points
proc~line_set_segments
line_set_segments
proc~line_node->proc~line_set_segments
proc~line_set_style
line_set_style
proc~line_node->proc~line_set_style
interface~vkf_marker_create
vkf_marker_create
proc~marker_node->interface~vkf_marker_create
proc~marker_node->proc~check_status
proc~marker_node->proc~line_set_points
proc~marker_set_style
marker_set_style
proc~marker_node->proc~marker_set_style
interface~vkf_compile_node
vkf_compile_node
proc~replace->interface~vkf_compile_node
proc~replace->interface~vkf_node_add_child
proc~replace->interface~vkf_node_delete
interface~vkf_node_remove_child
vkf_node_remove_child
proc~replace->interface~vkf_node_remove_child
proc~replace->proc~check_status
interface~vkf_mesh_array
vkf_mesh_array
proc~surface_node->interface~vkf_mesh_array
interface~vkf_mesh_create
vkf_mesh_create
proc~surface_node->interface~vkf_mesh_create
interface~vkf_mesh_set_bound
vkf_mesh_set_bound
proc~surface_node->interface~vkf_mesh_set_bound
proc~surface_node->proc~check_status
proc~mesh_arrays
mesh_arrays
proc~surface_node->proc~mesh_arrays
proc~cross
cross
proc~unit_normal->proc~cross
proc~vertex_normals->proc~cross
interface~vkf_line_points
vkf_line_points
proc~line_set_points->interface~vkf_line_points
interface~vkf_line_points_changed
vkf_line_points_changed
proc~line_set_points->interface~vkf_line_points_changed
interface~vkf_line_style
vkf_line_style
proc~line_set_segments->interface~vkf_line_style
interface~vkf_line_style_changed
vkf_line_style_changed
proc~line_set_segments->interface~vkf_line_style_changed
proc~line_set_style->interface~vkf_line_style
proc~line_set_style->interface~vkf_line_style_changed
proc~marker_set_style->interface~vkf_line_style
proc~marker_set_style->interface~vkf_line_style_changed
proc~mesh_arrays->interface~vkf_mesh_array
Nodes of different colours represent the following:
Graph Key
Subroutine
Subroutine
Function
Function
Interface
Interface
Type Bound Procedure
Type Bound Procedure
Unknown Procedure Type
Unknown Procedure Type
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Source Code
subroutine set_vertex_colors ( self , colors )
class ( Polyhedron ), intent ( inout ) :: self
real ( wp ), intent ( in ) :: colors (:,:) !! (4, n) or (3, n): [r, g, b(, a)] (0 to 1)
integer :: i
if ( size ( colors , 2 ) /= size ( self % v , 2 ) . or . size ( colors , 1 ) < 3 ) then
write ( * , '(a)' ) 'vkframes: Polyhedron ' // self % name () // ': set_vertex_colors needs a color per vertex'
return
end if
if ( allocated ( self % vertex_colors_ )) deallocate ( self % vertex_colors_ )
allocate ( self % vertex_colors_ ( 4 , size ( colors , 2 )))
do i = 1 , size ( colors , 2 )
call set_rgba ( self % vertex_colors_ (:, i ), colors (:, i ))
end do
call make_polyhedron ( self )
end subroutine set_vertex_colors