Commit db5ed605 authored by Isaak Lim's avatar Isaak Lim

pass keyword arguments as keyword arguments for immediate calls

parent e5bf8a4b
......@@ -5,21 +5,47 @@ Immediate drawing without explicitely creating a context.
from .context import Context
def display_faces(vertices, face_indices, normals=None, colors=None, uvs=None,
shading='flat', z_offset=0.5, texture=None, line_width=1, width=600, height=400,
background_color = '#dddddd', clipping_planes = [], show_bounds = False):
Context(width, height, background_color).draw_faces(vertices, face_indices, normals, colors, uvs, shading, z_offset, texture, line_width, clipping_planes).set_bounds(show_bounds).display()
shading='flat', z_offset=0.5, texture=None, line_width=1,
width=600, height=400, background_color='#dddddd',
clipping_planes=[], show_bounds=False):
Context(width, height, background_color).draw_faces(vertices, face_indices,
normals=normals,
colors=colors, uvs=uvs,
shading=shading,
z_offset=z_offset,
texture=texture,
line_width=line_width,
clipping_planes=clipping_planes).set_bounds(show_bounds).display()
def display_edges(vertices, edge_indices=None, colors=None, uvs=None,
z_offset=0, texture=None, line_width=1, width=600, height=400,
background_color = '#dddddd', clipping_planes = [], show_bounds = False):
Context(width, height, background_color).draw_edges(vertices, edge_indices, colors, uvs, z_offset, texture, line_width, clipping_planes).set_bounds(show_bounds).display()
background_color='#dddddd', clipping_planes=[],
show_bounds=False):
Context(width, height, background_color).draw_edges(vertices, edge_indices,
colors=colors, uvs=uvs,
z_offset=z_offset,
texture=texture,
line_width=line_width,
clipping_planes=clipping_planes).set_bounds(show_bounds).display()
def display_vertices(vertices, colors=None, uvs=None, point_size=1, z_offset=0, texture=None,
perspective=False, width=600, height=400,
background_color = '#dddddd', clipping_planes = [], show_bounds = False):
Context(width, height, background_color).draw_vertices(vertices, colors, uvs, point_size, z_offset, texture, perspective, clipping_planes).set_bounds(show_bounds).display()
def display_vertices(vertices, colors=None, uvs=None, point_size=1, z_offset=0,
texture=None, perspective=False, width=600, height=400,
background_color='#dddddd', clipping_planes=[],
show_bounds=False):
Context(width, height, background_color).draw_vertices(vertices, colors,
uvs=uvs,
point_size=point_size,
z_offset=z_offset,
texture=texture,
perspective=perspective,
clipping_planes=clipping_planes).set_bounds(show_bounds).display()
def display(obj, shading='flat', point_size=1, z_offset=0, texture=None,
perspective=False, width=600, height=400,
background_color = '#dddddd', clipping_planes = [], show_bounds = False):
Context(width, height, background_color).draw(obj, shading= shading, point_size = point_size, z_offset= z_offset, texture = texture, perspective = perspective, clipping_planes = clipping_planes).set_bounds(show_bounds).display()
background_color='#dddddd', clipping_planes=[], show_bounds=False):
Context(width, height, background_color).draw(obj, shading=shading,
point_size=point_size,
z_offset=z_offset,
texture=texture,
perspective=perspective,
clipping_planes=clipping_planes).set_bounds(show_bounds).display()
......@@ -4,20 +4,25 @@ from .immediate import display_faces
def display_openmesh(mesh, normals=None, colors=None, uvs=None, shading='flat',
z_offset=0.5, texture=None, width=600, height=400,
background_color='#dddddd', clipping_planes=[],
z_offset=0.5, texture=None, line_width=1, width=600,
height=400, background_color='#dddddd', clipping_planes=[],
show_bounds=False):
display_faces(mesh.points(), mesh.face_vertex_indices(), normals, colors,
uvs, shading, z_offset, texture, width, height,
background_color, clipping_planes, show_bounds)
display_faces(mesh.points(), mesh.face_vertex_indices(), normals=normals,
colors=colors, uvs=uvs, shading=shading, z_offset=z_offset,
texture=texture, line_width=line_width, width=width,
height=height, background_color=background_color,
clipping_planes=clipping_planes, show_bounds=show_bounds)
def display_file(path, normals=None, colors=None, uvs=None, shading='flat',
z_offset=0.5, texture=None, width=600, height=400,
background_color='#dddddd', clipping_planes=[],
z_offset=0.5, texture=None, line_width=1, width=600,
height=400, background_color='#dddddd', clipping_planes=[],
show_bounds=False):
m = om.TriMesh()
om.read_mesh(m, path)
display_openmesh(m, normals, colors, uvs, shading, z_offset, texture, width,
height, background_color, clipping_planes, show_bounds)
display_openmesh(m, normals=normals, colors=colors, uvs=uvs,
shading=shading, z_offset=z_offset, texture=texture,
line_width=line_width, width=width, height=height,
background_color=background_color,
clipping_planes=clipping_planes, show_bounds=show_bounds)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment