Commit 3b49882a authored by Dario Seyb's avatar Dario Seyb
Browse files

basic display_openmesh

parent 37bbe083
import openmesh as om
from .openmesh_utils import *
except ImportError as e:
print('OpenMesh not available')
from pythreejs import *
def test():
import openmesh as om
from pythreejs import *
def display_openmesh(mesh):
meshGeom = PlainGeometry(vertices=mesh.points(), faces=mesh.face_indices())
meshObj = Mesh(geometry=meshGeom, material=LambertMaterial())
cam = PerspectiveCamera(position=[3,3,3], fov=20)
meshScene = Scene(children=[meshObj, AmbientLight(color='#dddddd')])
obc = OrbitControls(controlling=cam)
meshRenderer = Renderer(camera=cam, background='black', background_opacity=1, scene=meshScene, controls=[obc] )
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