< GeeXLab Reference Guide />

> Back to Reference Guide Index


gh_polyline library

Description

gh_polyline is the module that manages polylines (a set of non-connected lines).


Number of functions: 8

  1. gh_polyline.create_v2 (Lua - Python)
  2. gh_polyline.set_vertex_color (Lua - Python)
  3. gh_polyline.set_vertex_draw_range (Lua - Python)
  4. gh_polyline.set_vertex_position (Lua - Python)
  5. gh_polyline.wideline_add_point (Lua - Python)
  6. gh_polyline.wideline_create (Lua - Python)
  7. gh_polyline.wideline_set_line_width (Lua - Python)
  8. gh_polyline.wideline_reset_points (Lua - Python)



create_v2

Description

Creates a polyline.


Syntax

pl = gh_polyline.create_v2(
 num_vertices,
 line_mode
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
pl = gh_polyline.create_v2(num_vertices, line_mode)
            


set_vertex_color

Description

Sets the color of a particular vertex in the polyline.


Syntax

gh_polyline.set_vertex_color(
 pl,
 vertex_index,
 r, g, b, a
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_polyline.set_vertex_color(pl, vertex_index, r, g, b, a)
            


set_vertex_draw_range

Description

Sets the start vertex index and the number of vertices to render.


Syntax

gh_polyline.set_vertex_draw_range(
 pl,
 start_index,
 num_vertices
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_polyline.set_vertex_draw_range(pl, 0, 2)
            


set_vertex_position

Description

Sets the position of a particular vertex in the polyline.


Syntax

gh_polyline.set_vertex_position(
 pl,
 vertex_index,
 x, y, z, w
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_polyline.set_vertex_position(pl, vertex_index, x0, y0, z0, 1.0)
            


wideline_add_point

Description

Adds a point to a wideline.


Syntax

gh_polyline.wideline_add_point(
 pl,
 x, y, z, w,
 r, g, b, a
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_polyline.wideline_add_point(pl, x, y, z, w, r, g, b, a)
            


wideline_create

Description

Creates a wideline polyline.


Syntax

pl = gh_polyline.wideline_create(
 num_vertices,
 line_width
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
pl = gh_polyline.wideline_create(num_vertices, 5.0)
            


wideline_set_line_width

Description

Adds a point to a wideline.


Syntax

gh_polyline.wideline_set_line_width(
 pl,
 line_width
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_polyline.wideline_set_line_width(pl, line_width)
            


wideline_reset_points

Description

Resets (clears) all points of a wideline.


Syntax

gh_polyline.wideline_reset_points(
 pl
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample

    
gh_polyline.wideline_reset_points(pl)
            






GeeXLab Rootard Guide | Downloads | Contact | Newsletter