def start(): ## create scenegraph scenegraph = avango.gua.nodes.SceneGraph(Name = "scenegraph") ## init viewing setup viewingSetup = SimpleViewingSetup(SCENEGRAPH = scenegraph, PARENT_NODE = scenegraph.Root.value, STEREO_MODE = "mono") #viewingSetup = SimpleViewingSetup(SCENEGRAPH = scenegraph, PARENT_NODE = scenegraph.Root.value, STEREO_MODE = "anaglyph") ## init game avatar avatar = Avatar(PARENT_NODE = scenegraph.Root.value) ## init avatar movemer mover = Mover() mover.my_constructor(SCENEGRAPH = scenegraph, START_MATRIX = avango.gua.make_trans_mat(0.1, 0.14, 0.0), VIEWER = viewingSetup.viewer) ## init scene scene = Scene(PARENT_NODE = scenegraph.Root.value) ## init field connections avatar.avatar_transform.Transform.connect_from(mover.sf_mat) # connect mover output matrix to avatar matrix viewingSetup.connect_navigation_matrix(avatar.avatar_transform.Transform) # connect avatar matrix to camera matrix viewingSetup.viewer.DesiredFPS.connect_from(mover.input.sf_max_fps) # change viewer FPS during runtime ## start application/render loop viewingSetup.run(locals(), globals())
def start(): ## create scenegraph scenegraph = avango.gua.nodes.SceneGraph(Name="scenegraph") ## init viewing setup viewingSetup = SimpleViewingSetup(SCENEGRAPH=scenegraph, PARENT_NODE=scenegraph.Root.value, STEREO_MODE="mono") #viewingSetup = SimpleViewingSetup(SCENEGRAPH = scenegraph, PARENT_NODE = scenegraph.Root.value, STEREO_MODE = "anaglyph") ## init scene scene = Scene(PARENT_NODE=scenegraph.Root.value) ## init crane crane = Crane(PARENT_NODE=scenegraph.Root.value, TARGET_LIST=scene.box_list) ## init field connections viewingSetup.viewer.DesiredFPS.connect_from( crane.input.sf_max_fps) # change viewer FPS during runtime print_graph(scenegraph.Root.value) ## start application/render loop viewingSetup.run(locals(), globals())
def start(): ## create scenegraph scenegraph = avango.gua.nodes.SceneGraph(Name = "scenegraph") ## init scene scene = Scene(PARENT_NODE = scenegraph.Root.value) ## init navigation technique keyboardInput = KeyboardInput() keyboardInput.my_constructor("gua-device-keyboard0") steeringNavigation = SteeringNavigation() steeringNavigation.my_constructor(keyboardInput.mf_dof, keyboardInput.mf_buttons) # connect steering navigation with keyboard input ## init viewing setup viewingSetup = SimpleViewingSetup(SCENEGRAPH = scenegraph, STEREO_MODE = "mono") #viewingSetup = SimpleViewingSetup(SCENEGRAPH = scenegraph, STEREO_MODE = "anaglyph") viewingSetup.connect_navigation_matrix(steeringNavigation.sf_nav_mat) steeringNavigation.set_rotation_center_offset(viewingSetup.get_head_position()) ## init manipulation techniques manipulation_manager = ManipulationManager() manipulation_manager.my_constructor(PARENT_NODE = viewingSetup.navigation_node, SCENE_ROOT = scenegraph.Root.value, TARGET_LIST = scene.target_list) print_graph(scenegraph.Root.value) ## start application/render loop viewingSetup.run(locals(), globals())
def start(): ## create scenegraph scenegraph = avango.gua.nodes.SceneGraph(Name="scenegraph") ## init viewing setup viewingSetup = SimpleViewingSetup(SCENEGRAPH=scenegraph, STEREO_MODE="mono") #viewingSetup = SimpleViewingSetup(SCENEGRAPH = scenegraph, STEREO_MODE = "anaglyph") ## init game avatar avatar = Avatar(SCENEGRAPH=scenegraph, START_MATRIX=avango.gua.make_trans_mat(0.1, 0.14, 0.0)) ## init scene scene = Scene(PARENT_NODE=scenegraph.Root.value) print_graph(scenegraph.Root.value) keyboardInput = KeyboardInput() accumulator = Accumulator() viewingSetup.navigation_node.Transform.connect_from(accumulator.sf_mat) ## init field connections (dependency graph) viewingSetup.connect_navigation_matrix( avatar.avatar_transform.Transform ) # connect avatar matrix to camera matrix viewingSetup.viewer.DesiredFPS.connect_from( avatar.input.sf_max_fps ) # change viewer FPS during runtime (enforce slow/fast frame-rate rendering) ## start application/render loop viewingSetup.run(locals(), globals())
def start(): ## create scenegraph scenegraph = avango.gua.nodes.SceneGraph(Name="scenegraph") ## init viewing setup viewingSetup = SimpleViewingSetup(SCENEGRAPH=scenegraph, PARENT_NODE=scenegraph.Root.value, STEREO_MODE="mono") #viewingSetup = SimpleViewingSetup(SCENEGRAPH = scenegraph, PARENT_NODE = scenegraph.Root.value, STEREO_MODE = "anaglyph") ## init game avatar avatar = Avatar(PARENT_NODE=scenegraph.Root.value) ## init avatar movemer mover = Mover() mover.my_constructor(SCENEGRAPH=scenegraph, START_MATRIX=avango.gua.make_trans_mat( 0.1, 0.14, 0.0), VIEWER=viewingSetup.viewer) ## init scene scene = Scene(PARENT_NODE=scenegraph.Root.value) ## init field connections avatar.avatar_transform.Transform.connect_from( mover.sf_mat) # connect mover output matrix to avatar matrix viewingSetup.connect_navigation_matrix( avatar.avatar_transform.Transform ) # connect avatar matrix to camera matrix viewingSetup.viewer.DesiredFPS.connect_from( mover.input.sf_max_fps) # change viewer FPS during runtime ## start application/render loop viewingSetup.run(locals(), globals())
def start(): ## create scenegraph scenegraph = avango.gua.nodes.SceneGraph(Name = "scenegraph") ## init viewing setup viewingSetup = SimpleViewingSetup(SCENEGRAPH = scenegraph, PARENT_NODE = scenegraph.Root.value, STEREO_MODE = "mono") #viewingSetup = SimpleViewingSetup(SCENEGRAPH = scenegraph, PARENT_NODE = scenegraph.Root.value, STEREO_MODE = "anaglyph") ## init scene scene = Scene(PARENT_NODE = scenegraph.Root.value) ## init crane crane = Crane(PARENT_NODE = scenegraph.Root.value, TARGET_LIST = scene.box_list) ## init field connections viewingSetup.viewer.DesiredFPS.connect_from(crane.input.sf_max_fps) # change viewer FPS during runtime print_graph(scenegraph.Root.value) ## start application/render loop viewingSetup.run(locals(), globals())