tri-again

class tri_again.Scene(point_radius=1.0)[source]

Simple scenegraph for quickly debugging 3D meshes, polylines, and points.

Parameters:point_radius (float) – The desired radius of the markers that are rendered for points. The default is 1.0.
add_lines(*polylines, color='red')[source]

Add one or more polylines to the scene.

Parameters:
  • polylines (list) – One or more instances of polliwog.Polyline.
  • color (object) – A CSS named color or an tuple of RGB values, scaled from 0 to 1.
Returns:

Self for chaining.

add_meshes(*meshes)[source]

Add one or more meshes to the scene.

Parameters:meshes (list) – One or more instances of lacecore.Mesh.
Returns:Self for chaining.
add_points(*points, name=None, color='red')[source]

Add one or more points to the scene.

Parameters:
  • points (list) – One or more (3,) NumPy arrays or a kx3 array.
  • name (str) – The name of a point to add. Do not use this when providing more than one point.
  • color (object) – A CSS named color or an tuple of RGB values, scaled from 0 to 1.
Returns:

Self for chaining.

write(filename)[source]

Write a COLLADA file for this scene.

Parameters:filename (str) – The filename to write (e.g. debug.dae).