#NEWLINE# def _generate_scene_dict( self ) : #NEWLINE# #INDENT# 'Generates a dictionary containing all of the information needed\n        to build the scene.' #NEWLINE# self . _scene_info = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _scene_info [ 'source' ] = 'PyDy' #NEWLINE# self . _scene_info [ 'name' ] = self . name #NEWLINE# self . _scene_info [ 'newtonian_frame' ] = str ( self . reference_frame ) #NEWLINE# self . _scene_info [ 'workspaceSize' ] = 0.2 #NEWLINE# self . _scene_info [ 'objects' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _scene_info [ 'cameras' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _scene_info [ 'lights' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for frame in self . visualization_frames : #NEWLINE# #INDENT# if ( self . system is None ) : #NEWLINE# #INDENT# constants = self . constants #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# constants = self . system . constants #NEWLINE# #UNINDENT# object_info = frame . generate_scene_dict ( constant_map = constants ) #NEWLINE# self . _scene_info [ 'objects' ] . update ( object_info ) #NEWLINE# #UNINDENT# for camera in self . cameras : #NEWLINE# #INDENT# object_info = camera . generate_scene_dict ( ) #NEWLINE# self . _scene_info [ 'cameras' ] . update ( self ) #NEWLINE# #UNINDENT# for light in self . lights : #NEWLINE# #INDENT# object_info = light . generate_scene_dict ( ) #NEWLINE# self . _scene_info [ 'lights' ] . update ( object_info )